/* ALL RIGHTS RESERVED
 *
 * This file is provided for demonstration and educational uses only.
 * Permission to use, copy, modify and distribute this file for
 * any purpose and without fee is hereby granted, provided that the
 * above copyright notice and this permission notice appear in all
 * copies, and that the name of KL Group not be used in advertising
 * or publicity pertaining to this material without the specific,
 * prior written permission of an authorized representative of
 * KL Group.
 *
 * KL GROUP MAKES NO REPRESENTATIONS AND EXTENDS NO WARRANTIES, EX-
 * PRESS OR IMPLIED, WITH RESPECT TO THE SOFTWARE, INCLUDING, BUT
 * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 * FITNESS FOR ANY PARTICULAR PURPOSE, AND THE WARRANTY AGAINST IN-
 * FRINGEMENT OF PATENTS OR OTHER INTELLECTUAL PROPERTY RIGHTS.  THE
 * SOFTWARE IS PROVIDED "AS IS", AND IN NO EVENT SHALL KL GROUP OR
 * ANY OF ITS AFFILIATES BE LIABLE FOR ANY DAMAGES, INCLUDING ANY
 * LOST PROFITS OR OTHER INCIDENTAL OR CONSEQUENTIAL DAMAGES
 * RELATING TO THE USE OF THIS SOFTWARE.
 *
 *
 * XRT widget XDesigner integration file
 *
 *  SCCSID -- @(#)XRT_iface.c	1.5    96/01/13 KL Group Inc.
 */

/*****************************************************************************
				XRT_iface.c
*****************************************************************************/

#include <X11/X.h>
#include <X11/Xatom.h>
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <Xm/Xm.h>
#include <xwidget.h>
#include <ctype.h>

#ifdef HASXRT3D
#include <Xm/Xrt3d.h>
#endif /* HASXRT3D */

/*
** XRT Widget XDesigner Integration Code
*/

char *
XRT_Xm_defined_name(name)
char *name;
{
	static char new_name[100];

	strcpy (new_name, "XmN");
	strcat (new_name, name);
	
	return new_name ;
}

#ifdef HASXRT3D
Boolean
Xrt3dText_appropriate_parent (w, class)
Widget		w;
WidgetClass	class;
{
	if (XtClass (w) == xtXrt3dWidgetClass) {
		return True;
	}
	else {
		return False;
	}
}

Boolean
Xrt3d_can_add_child (xw, class)
XWidget_p	xw;
WidgetClass	class;
{
	if (class == NULL) {
		return;
	}

	if (class == xtXrt3dTextObjectClass) {
		return True;
	}
	else {
		return False;
	}
}
#endif /* HASXRT3D */

#ifdef HASXRTGEAR
/*
** Use this to override the creation functionto give container
** widgets some inital width and height
*/

Widget
sizedCreate ( name, class, parent, args, arg_count )
char *name;
WidgetClass class;
Widget parent;
char *args;
int arg_count;
{
	Widget w;
	
	w = XtVaCreateWidget(name, class, parent,
						 XtVaTypedArg,
						 XmNlabelString,XmRString,"X R T",strlen("X R T")+1,
						 NULL);
	return w;
}

#endif /* HASXRTGEAR */
