/*
 * Generated by the ICS builderXcessory (BX).
 *
 *
 * Builder Xcessory 3.0A.
 *
 */
/*
 * MOTIF include files needed for widget creation.
 */
#include <Xm/Xm.h>
#include <Xm/Separator.h>
#include <Xm/PushB.h>
#include <Xm/ToggleB.h>
#include <Xm/Label.h>
#include <Xm/Frame.h>
#include <Xm/Form.h>
#include <Xm/RowColumn.h>
#include <Xm/FontS.h>

/*
 * User supplied include files.
 * (This is the C Output Include Information).
 */
#include "fontsel.h"



/*
 * Function: BxRegisterConverters()
 *     Registers all the converters for all widgets.
 */
static void
BxRegisterConverters()
{
    XtInitializeWidgetClass(xmSeparatorWidgetClass);
    XtInitializeWidgetClass(xmPushButtonWidgetClass);
    XtInitializeWidgetClass(xmToggleButtonWidgetClass);
    XtInitializeWidgetClass(xmLabelWidgetClass);
    XtInitializeWidgetClass(xmFrameWidgetClass);
    XtInitializeWidgetClass(xmFormWidgetClass);
    XtInitializeWidgetClass(xmRowColumnWidgetClass);
    XtInitializeWidgetClass(xmFontSelectorWidgetClass);
    XtInitializeWidgetClass(topLevelShellWidgetClass);
}

/*
 * Function prototypes for routines
 * located in utilities file.
 */
extern XtPointer CONVERT();
extern void MENU_POST();


/*
 * Callback procedure declarations
 */
extern void CreateHypeLabel();
extern void ShowFontValChCB();
extern void ExplainCB();
extern void ShowCurFont();
extern void ShowOtherCB();
extern void QuitCB();

/*
 * Function: CreateDemoForm()
 *        Create form hierarchy of widgets.
 */
Widget
CreateDemoForm( parent)
Widget parent;
{
    Arg    	args[512];
    Cardinal   	argcnt;
    Boolean   	argok;
    Widget 	retval;
    Widget	form;
    Widget	font_frame;
    Widget	fontsel;
    Widget	hype_frame;
    Widget	hype_label;
    Widget	control_frame;
    Widget	control_rc;
    Widget	show_font_tog;
    Widget	explain_showfont;
    Widget	separator;
    Widget	cur_font_pb;
    Widget	explain_curfont;
    Widget	separator1;
    Widget	other_pb;
    Widget	separator2;
    Widget	quit_pb;

    argok = False;

    BxRegisterConverters();

    argcnt = 0;
    XtSetArg(args[argcnt], XmNresizePolicy, XmRESIZE_ANY); argcnt++;
    form = XtCreateWidget("form",
		xmFormWidgetClass,
		parent,
		args,
		argcnt);
    retval = form;

    argcnt = 0;
    XtSetArg(args[argcnt], XmNtopAttachment, XmATTACH_FORM); argcnt++;
    XtSetArg(args[argcnt], XmNbottomAttachment, XmATTACH_NONE); argcnt++;
    XtSetArg(args[argcnt], XmNleftAttachment, XmATTACH_FORM); argcnt++;
    XtSetArg(args[argcnt], XmNrightAttachment, XmATTACH_FORM); argcnt++;
    XtSetArg(args[argcnt], XmNtopOffset, 20); argcnt++;
    XtSetArg(args[argcnt], XmNbottomOffset, 0); argcnt++;
    XtSetArg(args[argcnt], XmNleftOffset, 0); argcnt++;
    XtSetArg(args[argcnt], XmNrightOffset, 20); argcnt++;
    control_frame = XtCreateWidget("control_frame",
		xmFrameWidgetClass,
		form,
		args,
		argcnt);
    XtManageChild(control_frame);

    argcnt = 0;
    XtSetArg(args[argcnt], XmNtopAttachment, XmATTACH_FORM); argcnt++;
    XtSetArg(args[argcnt], XmNleftAttachment, XmATTACH_FORM); argcnt++;
    XtSetArg(args[argcnt], XmNrightAttachment, XmATTACH_FORM); argcnt++;
    XtSetArg(args[argcnt], XmNtopOffset, 20); argcnt++;
    XtSetArg(args[argcnt], XmNleftOffset, 20); argcnt++;
    XtSetArg(args[argcnt], XmNrightOffset, 20); argcnt++;
    XtSetArg(args[argcnt], XmNx, 20); argcnt++;
    XtSetArg(args[argcnt], XmNy, 20); argcnt++;
    hype_frame = XtCreateWidget("hype_frame",
		xmFrameWidgetClass,
		form,
		args,
		argcnt);
    XtManageChild(hype_frame);

    argcnt = 0;
    XtSetArg(args[argcnt], XmNtopAttachment, XmATTACH_FORM); argcnt++;
    XtSetArg(args[argcnt], XmNbottomAttachment, XmATTACH_POSITION); argcnt++;
    XtSetArg(args[argcnt], XmNleftAttachment, XmATTACH_FORM); argcnt++;
    XtSetArg(args[argcnt], XmNrightAttachment, XmATTACH_NONE); argcnt++;
    XtSetArg(args[argcnt], XmNbottomPosition, 95); argcnt++;
    XtSetArg(args[argcnt], XmNtopOffset, 20); argcnt++;
    XtSetArg(args[argcnt], XmNleftOffset, 0); argcnt++;
    XtSetArg(args[argcnt], XmNrightOffset, 0); argcnt++;
    XtSetArg(args[argcnt], XmNtopAttachment, XmATTACH_WIDGET); argcnt++;
    XtSetArg(args[argcnt], XmNtopWidget, control_frame); argcnt++;
    XtSetArg(args[argcnt], XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET); argcnt++;
    XtSetArg(args[argcnt], XmNleftWidget, control_frame); argcnt++;
    font_frame = XtCreateWidget("font_frame",
		xmFrameWidgetClass,
		form,
		args,
		argcnt);
    XtManageChild(font_frame);

    argcnt = 0;
    fontsel = XtCreateWidget("fontsel",
		xmFontSelectorWidgetClass,
		font_frame,
		args,
		argcnt);
    XtManageChild(fontsel);

    argcnt = 0;
    hype_label = XtCreateWidget("hype_label",
		xmLabelWidgetClass,
		hype_frame,
		args,
		argcnt);

    CreateHypeLabel(hype_label, (XtPointer)0, (XtPointer)0);
    XtManageChild(hype_label);

    argcnt = 0;
    XtSetArg(args[argcnt], XmNorientation, XmHORIZONTAL); argcnt++;
    XtSetArg(args[argcnt], XmNrowColumnType, XmWORK_AREA); argcnt++;
    control_rc = XtCreateWidget("control_rc",
		xmRowColumnWidgetClass,
		control_frame,
		args,
		argcnt);
    XtManageChild(control_rc);

    argcnt = 0;
    show_font_tog = XtCreateWidget("show_font_tog",
		xmToggleButtonWidgetClass,
		control_rc,
		args,
		argcnt);

    XtAddCallback(show_font_tog, XmNvalueChangedCallback, ShowFontValChCB, (XtPointer)0);
    XtManageChild(show_font_tog);

    argcnt = 0;
    explain_showfont = XtCreateWidget("explain_showfont",
		xmPushButtonWidgetClass,
		control_rc,
		args,
		argcnt);

    XtAddCallback(explain_showfont, XmNactivateCallback, ExplainCB, (XtPointer)EXPLAIN_SHOWFONT);
    XtManageChild(explain_showfont);

    argcnt = 0;
    XtSetArg(args[argcnt], XmNseparatorType, XmSHADOW_ETCHED_OUT); argcnt++;
    XtSetArg(args[argcnt], XmNorientation, XmVERTICAL); argcnt++;
    separator = XtCreateWidget("separator",
		xmSeparatorWidgetClass,
		control_rc,
		args,
		argcnt);
    XtManageChild(separator);

    argcnt = 0;
    cur_font_pb = XtCreateWidget("cur_font_pb",
		xmPushButtonWidgetClass,
		control_rc,
		args,
		argcnt);

    XtAddCallback(cur_font_pb, XmNactivateCallback, ShowCurFont, (XtPointer)0);
    XtManageChild(cur_font_pb);

    argcnt = 0;
    explain_curfont = XtCreateWidget("explain_curfont",
		xmPushButtonWidgetClass,
		control_rc,
		args,
		argcnt);

    XtAddCallback(explain_curfont, XmNactivateCallback, ExplainCB, (XtPointer)EXPLAIN_CURFONT);
    XtManageChild(explain_curfont);

    argcnt = 0;
    XtSetArg(args[argcnt], XmNseparatorType, XmSHADOW_ETCHED_OUT); argcnt++;
    XtSetArg(args[argcnt], XmNorientation, XmVERTICAL); argcnt++;
    separator1 = XtCreateWidget("separator1",
		xmSeparatorWidgetClass,
		control_rc,
		args,
		argcnt);
    XtManageChild(separator1);

    argcnt = 0;
    other_pb = XtCreateWidget("other_pb",
		xmPushButtonWidgetClass,
		control_rc,
		args,
		argcnt);

    XtAddCallback(other_pb, XmNactivateCallback, ShowOtherCB, (XtPointer)0);
    XtManageChild(other_pb);

    argcnt = 0;
    XtSetArg(args[argcnt], XmNseparatorType, XmSHADOW_ETCHED_OUT); argcnt++;
    XtSetArg(args[argcnt], XmNorientation, XmVERTICAL); argcnt++;
    separator2 = XtCreateWidget("separator2",
		xmSeparatorWidgetClass,
		control_rc,
		args,
		argcnt);
    XtManageChild(separator2);

    argcnt = 0;
    quit_pb = XtCreateWidget("quit_pb",
		xmPushButtonWidgetClass,
		control_rc,
		args,
		argcnt);

    XtAddCallback(quit_pb, XmNactivateCallback, QuitCB, (XtPointer)0);
    XtManageChild(quit_pb);

    argcnt = 0;
    XtSetArg(args[argcnt], XmNtopOffset, 20); argcnt++;
    XtSetArg(args[argcnt], XmNtopAttachment, XmATTACH_WIDGET); argcnt++;
    XtSetArg(args[argcnt], XmNtopWidget, hype_frame); argcnt++;
    XtSetArg(args[argcnt], XmNleftOffset, 0); argcnt++;
    XtSetArg(args[argcnt], XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET); argcnt++;
    XtSetArg(args[argcnt], XmNleftWidget, hype_frame); argcnt++;
    XtSetValues(control_frame, args, argcnt);

    return( retval );
}

