Ejemplo n.º 1
0
/**
 * Create the mb3dsdg_mainWindow hierarchy of widgets.
 */
Widget
Createmb3dsdg_mainWindow(Widget parent)
{
    Cardinal ac = 0;
    Arg      args[256];
    Cardinal cdc = 0;
    Boolean  argok = False;
    Widget   mb3dsdg_mainWindow;
    Widget   mb3dsdg_dialogShell;
    static Mb3dsdgData mb3dsdg;

    /**
     * Register the converters for the widgets.
     */
    RegisterBxConverters(XtWidgetToApplicationContext(parent));
    XtInitializeWidgetClass((WidgetClass)xmMainWindowWidgetClass);
    XtInitializeWidgetClass((WidgetClass)xmDialogShellWidgetClass);
    XtInitializeWidgetClass((WidgetClass)xmFormWidgetClass);

    ac = 0;
    XtSetArg(args[ac], XmNx, 747); ac++;
    XtSetArg(args[ac], XmNy, 78); ac++;
    XtSetArg(args[ac], XmNwidth, 197); ac++;
    XtSetArg(args[ac], XmNheight, 104); ac++;
    mb3dsdg_mainWindow = XmCreateMainWindow(parent,
        (char *)"mb3dsdg_mainWindow",
        args,
        ac);
    XtAddCallback(mb3dsdg_mainWindow, XmNdestroyCallback, BxExitCB, (XtPointer)0);

    ac = 0;
    XtSetArg(args[ac], XmNwidth, 1011); ac++;
    XtSetArg(args[ac], XmNheight, 660); ac++;
    XtSetArg(args[ac], XmNdeleteResponse, XmDO_NOTHING); ac++;
    mb3dsdg_dialogShell = XmCreateDialogShell(mb3dsdg_mainWindow,
        (char *)"mb3dsdg_dialogShell",
        args,
        ac);

    Mb3dsdgCreate(&(mb3dsdg),
        mb3dsdg_dialogShell,
        "mb3dsdg",
        args,
        ac);
    ac = 0;
    XtSetArg(args[ac], XmNx, 0); ac++;
    XtSetArg(args[ac], XmNy, 1007); ac++;
    XtSetArg(args[ac], XmNwidth, 1011); ac++;
    XtSetArg(args[ac], XmNheight, 660); ac++;
    XtSetValues(mb3dsdg.Mb3dsdg, args, ac);


    /* Begin user code block <end_Createmb3dsdg_mainWindow> */
    /* End user code block <end_Createmb3dsdg_mainWindow> */
    return( mb3dsdg_mainWindow );
}
Ejemplo n.º 2
0
/**
 * Create the mbpingedit_window hierarchy of widgets.
 */
Widget
Creatembpingedit_window(Widget parent)
{
    Cardinal ac = 0;
    Arg      args[256];
    Cardinal cdc = 0;
    Boolean  argok = False;
    Widget   mbpingedit_dialogShell;
    static MBpeditData mBpedit;

    /**
     * Register the converters for the widgets.
     */
    RegisterBxConverters(XtWidgetToApplicationContext(parent));
    XtInitializeWidgetClass((WidgetClass)xmMainWindowWidgetClass);
    XtInitializeWidgetClass((WidgetClass)xmDialogShellWidgetClass);
    XtInitializeWidgetClass((WidgetClass)xmFormWidgetClass);

    ac = 0;
    XtSetArg(args[ac], XmNx, 135); ac++;
    XtSetArg(args[ac], XmNy, 180); ac++;
    XtSetArg(args[ac], XmNwidth, 143); ac++;
    XtSetArg(args[ac], XmNheight, 52); ac++;
    mbpingedit_window = XmCreateMainWindow(parent,
        (char *)"mbpingedit_window",
        args,
        ac);

    ac = 0;
    XtSetArg(args[ac], XmNtitle, "MBeditviz Swath View"); ac++;
    XtSetArg(args[ac], XmNwidth, 1004); ac++;
    XtSetArg(args[ac], XmNheight, 694); ac++;
    XtSetArg(args[ac], XmNdeleteResponse, XmDO_NOTHING); ac++;
    mbpingedit_dialogShell = XmCreateDialogShell(mbpingedit_window,
        (char *)"mbpingedit_dialogShell",
        args,
        ac);

    MBpeditCreate(&(mBpedit),
        mbpingedit_dialogShell,
        "mBpedit",
        args,
        ac);
    ac = 0;
    XtSetArg(args[ac], XmNx, 518); ac++;
    XtSetArg(args[ac], XmNy, 310); ac++;
    XtSetArg(args[ac], XmNwidth, 1004); ac++;
    XtSetArg(args[ac], XmNheight, 694); ac++;
    XtSetValues(mBpedit.MBpedit, args, ac);


    /* Begin user code block <end_Creatembpingedit_window> */
    /* End user code block <end_Creatembpingedit_window> */
    return( mbpingedit_window );
}
Ejemplo n.º 3
0
MB3DNavListDataPtr
MB3DNavListCreate ( MB3DNavListDataPtr class_in, Widget parent, String name, ArgList args_in, Cardinal ac_in)
{
    Cardinal ac = 0;
    Arg      args[256];
    Boolean  argok = False;

    /**
     * Register the converters for the widgets.
     */
    RegisterBxConverters(XtWidgetToApplicationContext(parent));
    XtInitializeWidgetClass((WidgetClass)xmFormWidgetClass);
    XtInitializeWidgetClass((WidgetClass)xmLabelWidgetClass);
    XtInitializeWidgetClass((WidgetClass)xmPushButtonWidgetClass);
    XtInitializeWidgetClass((WidgetClass)xmScrolledWindowWidgetClass);
    XtInitializeWidgetClass((WidgetClass)xmListWidgetClass);
    /**
     * Setup app-defaults fallback table if not already done.
     */
    if (doInitAppDefaults)
    {
        InitAppDefaults(parent, appDefaults);
        doInitAppDefaults = False;
    }
    /**
     * Now set the app-defaults for this instance.
     */
    SetAppDefaults(parent, appDefaults, name, False);

    ac = 0;
    XtSetArg(args[ac], XmNresizePolicy, XmRESIZE_GROW); ac++;
    XtSetArg(args[ac], XmNx, 76); ac++;
    XtSetArg(args[ac], XmNy, 548); ac++;
    XtSetArg(args[ac], XmNwidth, 415); ac++;
    XtSetArg(args[ac], XmNheight, 243); ac++;
    class_in->MB3DNavList = XmCreateForm(parent,
        (char *)name,
        args,
        ac);

    ac = 0;
    {
        XmString    tmp0;

        tmp0 = (XmString) BX_CONVERT(class_in->MB3DNavList, (char *)"Navigation List:",
                XmRXmString, 0, &argok);
        XtSetArg(args[ac], XmNlabelString, tmp0); if (argok) ac++;
        XtSetArg(args[ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++;
        XtSetArg(args[ac], XmNx, 10); ac++;
        XtSetArg(args[ac], XmNy, 10); ac++;
        XtSetArg(args[ac], XmNwidth, 390); ac++;
        XtSetArg(args[ac], XmNheight, 30); ac++;
        XtSetArg(args[ac], XmNfontList,
            BX_CONVERT(class_in->MB3DNavList, (char *)"-*-"SANS"-bold-r-*-*-*-140-75-75-*-*-iso8859-1",
            XmRFontList, 0, &argok)); if (argok) ac++;
        class_in->mbview_navlist_label = XmCreateLabel(class_in->MB3DNavList,
            (char *)"mbview_navlist_label",
            args,
            ac);
        XtManageChild(class_in->mbview_navlist_label);

        /**
         * Free any memory allocated for resources.
         */
        XmStringFree((XmString)tmp0);
    }


    ac = 0;
    {
        XmString    tmp0;

        tmp0 = (XmString) BX_CONVERT(class_in->MB3DNavList, (char *)"Delete Selected Navigation",
                XmRXmString, 0, &argok);
        XtSetArg(args[ac], XmNlabelString, tmp0); if (argok) ac++;
        XtSetArg(args[ac], XmNx, 10); ac++;
        XtSetArg(args[ac], XmNy, 200); ac++;
        XtSetArg(args[ac], XmNwidth, 210); ac++;
        XtSetArg(args[ac], XmNheight, 30); ac++;
        XtSetArg(args[ac], XmNfontList,
            BX_CONVERT(class_in->MB3DNavList, (char *)"-*-"SANS"-bold-r-*-*-*-140-75-75-*-*-iso8859-1",
            XmRFontList, 0, &argok)); if (argok) ac++;
        class_in->mbview_pushButton_navlist_delete = XmCreatePushButton(class_in->MB3DNavList,
            (char *)"mbview_pushButton_navlist_delete",
            args,
            ac);
        XtManageChild(class_in->mbview_pushButton_navlist_delete);

        /**
         * Free any memory allocated for resources.
         */
        XmStringFree((XmString)tmp0);
    }

    XtAddCallback(class_in->mbview_pushButton_navlist_delete, XmNactivateCallback, do_mbview_navlist_delete, (XtPointer)0);

    ac = 0;
    {
        XmString    tmp0;

        tmp0 = (XmString) BX_CONVERT(class_in->MB3DNavList, (char *)"Dismiss",
                XmRXmString, 0, &argok);
        XtSetArg(args[ac], XmNlabelString, tmp0); if (argok) ac++;
        XtSetArg(args[ac], XmNx, 290); ac++;
        XtSetArg(args[ac], XmNy, 200); ac++;
        XtSetArg(args[ac], XmNwidth, 110); ac++;
        XtSetArg(args[ac], XmNheight, 30); ac++;
        XtSetArg(args[ac], XmNfontList,
            BX_CONVERT(class_in->MB3DNavList, (char *)"-*-"SANS"-bold-r-*-*-*-140-75-75-*-*-iso8859-1",
            XmRFontList, 0, &argok)); if (argok) ac++;
        class_in->mbview_pushButton_navlist_dismiss = XmCreatePushButton(class_in->MB3DNavList,
            (char *)"mbview_pushButton_navlist_dismiss",
            args,
            ac);
        XtManageChild(class_in->mbview_pushButton_navlist_dismiss);

        /**
         * Free any memory allocated for resources.
         */
        XmStringFree((XmString)tmp0);
    }

    XtAddCallback(class_in->mbview_pushButton_navlist_dismiss, XmNactivateCallback, do_mbview_navlist_popdown, (XtPointer)0);

    ac = 0;
    XtSetArg(args[ac], XmNscrollingPolicy, XmAPPLICATION_DEFINED); ac++;
    XtSetArg(args[ac], XmNx, 10); ac++;
    XtSetArg(args[ac], XmNy, 40); ac++;
    XtSetArg(args[ac], XmNwidth, 390); ac++;
    XtSetArg(args[ac], XmNheight, 150); ac++;
    class_in->mbview_scrolledWindow_navlist = XmCreateScrolledWindow(class_in->MB3DNavList,
        (char *)"mbview_scrolledWindow_navlist",
        args,
        ac);
    XtManageChild(class_in->mbview_scrolledWindow_navlist);

    ac = 0;
    XtSetArg(args[ac], XmNselectionPolicy, XmEXTENDED_SELECT); ac++;
    XtSetArg(args[ac], XmNwidth, 390); ac++;
    XtSetArg(args[ac], XmNheight, 150); ac++;
    XtSetArg(args[ac], XmNfontList,
        BX_CONVERT(class_in->mbview_scrolledWindow_navlist, (char *)"-*-"SANS"-bold-r-*-*-*-140-75-75-*-*-iso8859-1",
        XmRFontList, 0, &argok)); if (argok) ac++;
    class_in->mbview_list_navlist = XmCreateList(class_in->mbview_scrolledWindow_navlist,
        (char *)"mbview_list_navlist",
        args,
        ac);
    XtManageChild(class_in->mbview_list_navlist);
    XtAddCallback(class_in->mbview_list_navlist, XmNsingleSelectionCallback, do_mbview_navlistselect, (XtPointer)0);
    XtAddCallback(class_in->mbview_list_navlist, XmNextendedSelectionCallback, do_mbview_navlistselect, (XtPointer)0);
    XtAddCallback(class_in->mbview_list_navlist, XmNbrowseSelectionCallback, do_mbview_navlistselect, (XtPointer)0);
    ac = 0;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
    XtSetArg(args[ac], XmNleftOffset, 10); ac++;
    XtSetArg(args[ac], XmNrightOffset, 15); ac++;
    XtSetArg(args[ac], XmNtopOffset, 10); ac++;
    XtSetValues(class_in->mbview_navlist_label, args, ac);

    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
    XtSetArg(args[ac], XmNbottomOffset, 13); ac++;
    XtSetArg(args[ac], XmNleftOffset, 10); ac++;
    XtSetValues(class_in->mbview_pushButton_navlist_delete, args, ac);

    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_NONE); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_NONE); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
    XtSetArg(args[ac], XmNbottomOffset, 13); ac++;
    XtSetArg(args[ac], XmNrightOffset, 15); ac++;
    XtSetValues(class_in->mbview_pushButton_navlist_dismiss, args, ac);

    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_FORM); ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_FORM); ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_FORM); ac++;
    XtSetArg(args[ac], XmNbottomOffset, 53); ac++;
    XtSetArg(args[ac], XmNleftOffset, 10); ac++;
    XtSetArg(args[ac], XmNrightOffset, 15); ac++;
    XtSetArg(args[ac], XmNtopOffset, 0); ac++;
    XtSetArg(args[ac], XmNtopWidget, class_in->mbview_navlist_label); ac++;
    XtSetValues(class_in->mbview_scrolledWindow_navlist, args, ac);


    /*
     * Assign functions to class record
     */


    /* Begin user code block <end_MB3DNavListCreate> */
    /* End user code block <end_MB3DNavListCreate> */

    return( class_in );
}
Ejemplo n.º 4
0
int main( int argc, char **argv)
{
    Widget       parent;
    XtAppContext app;
    Arg          args[256];
    Cardinal     ac;
    Boolean      argok=False;
    Widget   topLevelShell;
    Widget   mb3dsdg_mainWindow;

    /* Begin user code block <declarations> */
    /* End user code block <declarations> */

    /*
     * Initialize Xt.
     */

    // XtSetLanguageProc(NULL, (XtLanguageProc) NULL, NULL);

    /*
     * The applicationShell is created as an unrealized
     * parent for multiple topLevelShells.  The topLevelShells
     * are created as popup children of the applicationShell.
     * This is a recommendation of Paul Asente & Ralph Swick in
     * _X_Window_System_Toolkit_ p. 677.
     */

    parent = XtVaOpenApplication ( &app,
                                   BX_APP_CLASS,
                                   NULL,
                                   0,
                                   &argc,
                                   argv,
                                   NULL,
                                   sessionShellWidgetClass,
                                   NULL );

    RegisterBxConverters(app);
    XmRepTypeInstallTearOffModelConverter();

    /* Begin user code block <create_shells> */
    /* End user code block <create_shells> */

    /*
     * Create classes and widgets used in this program.
     */

    /* Begin user code block <create_topLevelShell> */
    /* End user code block <create_topLevelShell> */

    ac = 0;
    XtSetArg(args[ac], XmNtitle, "MBgrdviz"); ac++;
    XtSetArg(args[ac], XmNx, 747); ac++;
    XtSetArg(args[ac], XmNy, 78); ac++;
    XtSetArg(args[ac], XmNwidth, 197); ac++;
    XtSetArg(args[ac], XmNheight, 104); ac++;
    topLevelShell = XtCreatePopupShell((char *)"topLevelShell",
        topLevelShellWidgetClass,
        parent,
        args,
        ac);
    mb3dsdg_mainWindow = (Widget)Createmb3dsdg_mainWindow(topLevelShell);
    XtManageChild(mb3dsdg_mainWindow);
    XtPopup(XtParent(mb3dsdg_mainWindow), XtGrabNone);

    /* Begin user code block <app_procedures> */
    /* End user code block <app_procedures> */

    /* Begin user code block <main_loop> */
    /* End user code block <main_loop> */

    XtAppMainLoop(app);

    /*
     * A return value regardless of whether or not the main loop ends.
     */
     return(0);
}
Ejemplo n.º 5
0
int main( int argc, char **argv)
{
    Widget       parent;
    XtAppContext app;
    Arg          args[256];
    Cardinal     ac;
    Boolean      argok=False;
    Widget   topLevelShell;
    Widget   mainWindow_mbgrdviz;
    
    /* Begin user code block <declarations> */
	int	error = MB_ERROR_NO_ERROR;
	int	verbose = 0;
	int	ifileflag = 0;
	int	jfileflag = 0;
	int	testflag = 0;

	/* process argument list */
	while ((c = getopt(argc, argv, "VvHhI:i:J:j:Tt")) != -1)
	  {
	  switch (c) 
		{
		case 'H':
		case 'h':
			help++;
			break;
		case 'V':
		case 'v':
			verbose++;
			break;
		case 'I':
		case 'i':
			sscanf (optarg,"%s", ifile);
			flag++;
			ifileflag++;
			break;
		case 'J':
		case 'j':
			sscanf (optarg,"%s", jfile);
			flag++;
			jfileflag++;
			break;
		case 'T':
		case 't':
			flag++;
			testflag++;
			break;
		case '?':
			errflg++;
		}
	    }

	/* if error flagged then print it and exit */
	if (errflg)
		{
		fprintf(stderr,"usage: %s\n", usage_message);
		fprintf(stderr,"\nProgram <%s> Terminated\n",
			program_name);
		error = MB_ERROR_BAD_USAGE;
		exit(error);
		}

	/* print starting message */
	if (verbose == 1 || help)
		{
		fprintf(stderr,"\nProgram %s\n",program_name);
		fprintf(stderr,"MB-system Version %s\n",MB_VERSION);
		}

	/* print starting message */
	if (help)
		{
		fprintf(stderr,"\n%s\n\nUsage: %s\n", help_message, usage_message);
		error = MB_ERROR_NO_ERROR;
		exit(error);
		}
    
    /* End user code block <declarations> */
    
    /*
     * Initialize Xt. 
     */
    
    XtSetLanguageProc(NULL, (XtLanguageProc) NULL, NULL); 
    
    /*
     * The applicationShell is created as an unrealized
     * parent for multiple topLevelShells.  The topLevelShells
     * are created as popup children of the applicationShell.
     * This is a recommendation of Paul Asente & Ralph Swick in
     * _X_Window_System_Toolkit_ p. 677.
     */
    
    parent = XtVaOpenApplication ( &app, 
                                   BX_APP_CLASS, 
                                   NULL, 
                                   0, 
                                   &argc, 
                                   argv, 
                                   NULL, 
                                   sessionShellWidgetClass, 
                                   NULL );
    
    RegisterBxConverters(app);
    XmRepTypeInstallTearOffModelConverter();
    
    /* Begin user code block <create_shells> */
    /* End user code block <create_shells> */
    
    /*
     * Create classes and widgets used in this program. 
     */
    
    /* Begin user code block <create_topLevelShell> */
    /* End user code block <create_topLevelShell> */
    
    ac = 0;
    XtSetArg(args[ac], XmNtitle, "MBgrdviz"); ac++;
    XtSetArg(args[ac], XmNx, 108); ac++;
    XtSetArg(args[ac], XmNy, 241); ac++;
    XtSetArg(args[ac], XmNwidth, 260); ac++;
    XtSetArg(args[ac], XmNheight, 215); ac++;
    topLevelShell = XtCreatePopupShell((char *)"topLevelShell",
        topLevelShellWidgetClass,
        parent,
        args, 
        ac);
    XtAddCallback(topLevelShell, XmNdestroyCallback, do_mbgrdviz_quit, (XtPointer)0);
    XtAddCallback(topLevelShell, XmNdestroyCallback, BxExitCB, (XtPointer)0);
    mainWindow_mbgrdviz = (Widget)CreatemainWindow_mbgrdviz(topLevelShell);
    XtManageChild(mainWindow_mbgrdviz);
    XtPopup(XtParent(mainWindow_mbgrdviz), XtGrabNone);
    
    /* Begin user code block <app_procedures> */
    
    /* set top level widget */
    mainWindow = mainWindow_mbgrdviz;
    
    /* End user code block <app_procedures> */
    
    /* Begin user code block <main_loop> */
    
    /* initialize the vizualization widgets code */
    mbview_startup(verbose, parent, app, &error);
        
    /* open the file specified on the command line */
    do_mbgrdviz_init(argc,argv, verbose);
    if (ifileflag > 0)
    	{
    	do_mbgrdviz_openprimary(ifile);
	if (jfileflag > 0)
		{
		do_mbgrdviz_openoverlay(0,jfile);
		}
	}
    else if (testflag > 0)
    	{
        do_mbgrdviz_openprimary(NULL);
	}
    /* End user code block <main_loop> */
    
    XtAppMainLoop(app);
    
    /*
     * A return value regardless of whether or not the main loop ends. 
     */
     return(0); 
}
Ejemplo n.º 6
0
/*
 * Create the form hierarchy of widgets.
 */
Widget
Createform(Widget parent)
{
    Arg      args[256];
    Cardinal ac=0;
    Boolean  argok=False;
    Widget   form;
    Widget   tabStack;
    Widget   scrolledWindow;
    Widget   text;
    Widget   form1;
    Widget   frame;
    Widget   form2;
    Widget   radioBox1;
    Widget   toggleButton4;
    Widget   toggleButton5;
    Widget   toggleButton6;
    Widget   label4;
    Widget   radioBox;
    Widget   toggleButton;
    Widget   toggleButton1;
    Widget   toggleButton2;
    Widget   toggleButton3;
    Widget   label3;
    Widget   tabStack1;
    Widget   label;
    Widget   label1;
    Widget   label2;
    Widget   separator;
    Widget   pushButton;

    /*
     * Register the converters for the widgets.
     */
    RegisterBxConverters(XtWidgetToApplicationContext(parent));
    XtInitializeWidgetClass(xmFormWidgetClass);
    XtInitializeWidgetClass(xmTabStackWidgetClass);
    XtInitializeWidgetClass(xmScrolledWindowWidgetClass);
    XtInitializeWidgetClass(xmTextWidgetClass);
    XtInitializeWidgetClass(xmFrameWidgetClass);
    XtInitializeWidgetClass(xmRowColumnWidgetClass);
    XtInitializeWidgetClass(xmToggleButtonWidgetClass);
    XtInitializeWidgetClass(xmLabelWidgetClass);
    XtInitializeWidgetClass(xmSeparatorWidgetClass);
    XtInitializeWidgetClass(xmPushButtonWidgetClass);

    ac = 0;
    XtSetArg(args[ac], XmNresizePolicy, XmRESIZE_GROW);
    ac++;
    XtSetArg(args[ac], XmNdialogTitle,
             CONVERT(parent, "EnhancementPak TabStack Demo",
                     XmRXmString, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNx, 333);
    ac++;
    XtSetArg(args[ac], XmNy, 277);
    ac++;
    XtSetArg(args[ac], XmNwidth, 839);
    ac++;
    XtSetArg(args[ac], XmNheight, 508);
    ac++;
    XtSetArg(args[ac], XmNbackground,
             CONVERT(parent, "#ccc",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNforeground,
             CONVERT(parent, "Black",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    form = XmCreateForm(parent,
                        "form",
                        args,
                        ac);

    ac = 0;
    XtSetArg(args[ac], XmNresizePolicy, XmRESIZE_GROW);
    ac++;
    XtSetArg(args[ac], XmNx, 10);
    ac++;
    XtSetArg(args[ac], XmNy, 10);
    ac++;
    XtSetArg(args[ac], XmNwidth, 818);
    ac++;
    XtSetArg(args[ac], XmNheight, 436);
    ac++;
    XtSetArg(args[ac], XmNbackground,
             CONVERT(parent, "#ccc",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNfontList,
             CONVERT(parent, "-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-1",
                     XmRFontList, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNforeground,
             CONVERT(parent, "Black",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    tabStack = XmCreateTabStack(form,
                                "tabStack",
                                args,
                                ac);
    XtManageChild(tabStack);

    ac = 0;
    XtSetArg(args[ac], XmNscrollingPolicy, XmAPPLICATION_DEFINED);
    ac++;
    XtSetArg(args[ac], XmNx, -794);
    ac++;
    XtSetArg(args[ac], XmNy, 56);
    ac++;
    XtSetArg(args[ac], XmNbackground,
             CONVERT(parent, "#ccc",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNforeground,
             CONVERT(parent, "Black",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    scrolledWindow = XmCreateScrolledWindow(tabStack,
                                            "scrolledWindow",
                                            args,
                                            ac);
    XtManageChild(scrolledWindow);

    ac = 0;
    XtSetArg(args[ac], XmNbackground,
             CONVERT(parent, "LightBlue",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNvalue, "The XmTabStack widget manages a group of widgets such that only one widget\n\
in the group is visible at a time. Each child is associated with a \"tab\"\n\
that displays a text label and/or a pixmap. By selecting the \"tab\" the user\n\
interactively determines which child is displayed. This widget exhibits\n\
behavior similar to the Microsoft Windows(TM) Tab Control.\n\
\n\
The tabs can be configured to appear above, below, to the right, and to the\n\
left of a work area with the text oriented in any of the four cardinal\n\
directions.\n\
\n\
The TabStack allows the user to select, either by pointer or keyboard\n\
traversal, tabs.  When a tab is selected it changes appearance so that it\n\
appears to be raised above the other tabs.  When a tab is selected the\n\
child associated with the tab is made visible. One tab is selected at all\n\
times."); 
    ac++;
    XtSetArg(args[ac], XmNeditMode, XmMULTI_LINE_EDIT);
    ac++;
    XtSetArg(args[ac], XmNfontList,
             CONVERT(parent, "-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-1",
                     XmRFontList, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNforeground,
             CONVERT(parent, "Black",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    text = XmCreateText(scrolledWindow,
                        "text",
                        args,
                        ac);
    XtManageChild(text);

    ac = 0;
    XtSetArg(args[ac], XmNresizePolicy, XmRESIZE_GROW);
    ac++;
    XtSetArg(args[ac], XmNx, 12);
    ac++;
    XtSetArg(args[ac], XmNy, 56);
    ac++;
    XtSetArg(args[ac], XmNbackground,
             CONVERT(parent, "#ccc",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNforeground,
             CONVERT(parent, "Black",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    form1 = XmCreateForm(tabStack,
                         "form1",
                         args,
                         ac);
    XtManageChild(form1);

    ac = 0;
    XtSetArg(args[ac], XmNshadowType, XmSHADOW_IN);
    ac++;
    XtSetArg(args[ac], XmNx, 484);
    ac++;
    XtSetArg(args[ac], XmNy, 10);
    ac++;
    XtSetArg(args[ac], XmNbackground,
             CONVERT(parent, "#ccc",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNforeground,
             CONVERT(parent, "Black",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    frame = XmCreateFrame(form1,
                          "frame",
                          args,
                          ac);
    XtManageChild(frame);

    ac = 0;
    XtSetArg(args[ac], XmNresizePolicy, XmRESIZE_GROW);
    ac++;
    XtSetArg(args[ac], XmNx, 2);
    ac++;
    XtSetArg(args[ac], XmNy, 2);
    ac++;
    XtSetArg(args[ac], XmNbackground,
             CONVERT(parent, "#ccc",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNforeground,
             CONVERT(parent, "Black",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    form2 = XmCreateForm(frame,
                         "form2",
                         args,
                         ac);
    XtManageChild(form2);

    ac = 0;
    XtSetArg(args[ac], XmNisHomogeneous, False);
    ac++;
    XtSetArg(args[ac], XmNnumColumns, 2);
    ac++;
    XtSetArg(args[ac], XmNx, 89);
    ac++;
    XtSetArg(args[ac], XmNy, 89);
    ac++;
    XtSetArg(args[ac], XmNbackground,
             CONVERT(parent, "#ccc",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNforeground,
             CONVERT(parent, "Black",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    radioBox1 = XmCreateRadioBox(form2,
                                 "radioBox1",
                                 args,
                                 ac);
    XtManageChild(radioBox1);

    ac = 0;
    XtSetArg(args[ac], XmNlabelString,
             CONVERT(parent, "Round",
                     XmRXmString, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNbackground,
             CONVERT(parent, "#ccc",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNfontList,
             CONVERT(parent, "-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-1",
                     XmRFontList, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNforeground,
             CONVERT(parent, "Black",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    toggleButton4 = XmCreateToggleButton(radioBox1,
                                         "toggleButton4",
                                         args,
                                         ac);
    XtManageChild(toggleButton4);
    XtAddCallback(toggleButton4, XmNvalueChangedCallback, BxSetValuesCB, (XtPointer)"tabStack1.tabStyle=rounded");

    ac = 0;
    XtSetArg(args[ac], XmNlabelString,
             CONVERT(parent, "Beveled",
                     XmRXmString, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNset, True);
    ac++;
    XtSetArg(args[ac], XmNbackground,
             CONVERT(parent, "#ccc",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNfontList,
             CONVERT(parent, "-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-1",
                     XmRFontList, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNforeground,
             CONVERT(parent, "Black",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    toggleButton5 = XmCreateToggleButton(radioBox1,
                                         "toggleButton5",
                                         args,
                                         ac);
    XtManageChild(toggleButton5);
    XtAddCallback(toggleButton5, XmNvalueChangedCallback, BxSetValuesCB, (XtPointer)"tabStack1.tabStyle=beveled");

    ac = 0;
    XtSetArg(args[ac], XmNlabelString,
             CONVERT(parent, "Square",
                     XmRXmString, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNbackground,
             CONVERT(parent, "#ccc",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNfontList,
             CONVERT(parent, "-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-1",
                     XmRFontList, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNforeground,
             CONVERT(parent, "Black",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    toggleButton6 = XmCreateToggleButton(radioBox1,
                                         "toggleButton6",
                                         args,
                                         ac);
    XtManageChild(toggleButton6);
    XtAddCallback(toggleButton6, XmNvalueChangedCallback, BxSetValuesCB, (XtPointer)"tabStack1.tabStyle=squared");

    ac = 0;
    XtSetArg(args[ac], XmNlabelString,
             CONVERT(parent, "Corners:",
                     XmRXmString, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNx, 10);
    ac++;
    XtSetArg(args[ac], XmNy, 89);
    ac++;
    XtSetArg(args[ac], XmNbackground,
             CONVERT(parent, "#ccc",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNfontList,
             CONVERT(parent, "-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-1",
                     XmRFontList, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNforeground,
             CONVERT(parent, "Black",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    label4 = XmCreateLabel(form2,
                           "label4",
                           args,
                           ac);
    XtManageChild(label4);

    ac = 0;
    XtSetArg(args[ac], XmNisHomogeneous, False);
    ac++;
    XtSetArg(args[ac], XmNnumColumns, 2);
    ac++;
    XtSetArg(args[ac], XmNx, 92);
    ac++;
    XtSetArg(args[ac], XmNy, 10);
    ac++;
    XtSetArg(args[ac], XmNbackground,
             CONVERT(parent, "#ccc",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNforeground,
             CONVERT(parent, "Black",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    radioBox = XmCreateRadioBox(form2,
                                "radioBox",
                                args,
                                ac);
    XtManageChild(radioBox);

    ac = 0;
    XtSetArg(args[ac], XmNlabelString,
             CONVERT(parent, "Top",
                     XmRXmString, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNset, True);
    ac++;
    XtSetArg(args[ac], XmNbackground,
             CONVERT(parent, "#ccc",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNfontList,
             CONVERT(parent, "-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-1",
                     XmRFontList, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNforeground,
             CONVERT(parent, "Black",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    toggleButton = XmCreateToggleButton(radioBox,
                                        "toggleButton",
                                        args,
                                        ac);
    XtManageChild(toggleButton);
    XtAddCallback(toggleButton, XmNvalueChangedCallback, BxSetValuesCB, (XtPointer)"tabStack1.tabSide=top");

    ac = 0;
    XtSetArg(args[ac], XmNlabelString,
             CONVERT(parent, "Bottom",
                     XmRXmString, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNbackground,
             CONVERT(parent, "#ccc",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNfontList,
             CONVERT(parent, "-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-1",
                     XmRFontList, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNforeground,
             CONVERT(parent, "Black",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    toggleButton1 = XmCreateToggleButton(radioBox,
                                         "toggleButton1",
                                         args,
                                         ac);
    XtManageChild(toggleButton1);
    XtAddCallback(toggleButton1, XmNvalueChangedCallback, BxSetValuesCB, (XtPointer)"tabStack1.tabSide=bottom");

    ac = 0;
    XtSetArg(args[ac], XmNlabelString,
             CONVERT(parent, "Right",
                     XmRXmString, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNbackground,
             CONVERT(parent, "#ccc",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNfontList,
             CONVERT(parent, "-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-1",
                     XmRFontList, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNforeground,
             CONVERT(parent, "Black",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    toggleButton2 = XmCreateToggleButton(radioBox,
                                         "toggleButton2",
                                         args,
                                         ac);
    XtManageChild(toggleButton2);
    XtAddCallback(toggleButton2, XmNvalueChangedCallback, BxSetValuesCB, (XtPointer)"tabStack1.tabSide=right");

    ac = 0;
    XtSetArg(args[ac], XmNlabelString,
             CONVERT(parent, "Left",
                     XmRXmString, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNbackground,
             CONVERT(parent, "#ccc",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNfontList,
             CONVERT(parent, "-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-1",
                     XmRFontList, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNforeground,
             CONVERT(parent, "Black",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    toggleButton3 = XmCreateToggleButton(radioBox,
                                         "toggleButton3",
                                         args,
                                         ac);
    XtManageChild(toggleButton3);
    XtAddCallback(toggleButton3, XmNvalueChangedCallback, BxSetValuesCB, (XtPointer)"tabStack1.tabSide=left");

    ac = 0;
    XtSetArg(args[ac], XmNlabelString,
             CONVERT(parent, "Tabs On:",
                     XmRXmString, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNx, 10);
    ac++;
    XtSetArg(args[ac], XmNy, 10);
    ac++;
    XtSetArg(args[ac], XmNbackground,
             CONVERT(parent, "#ccc",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNfontList,
             CONVERT(parent, "-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-1",
                     XmRFontList, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNforeground,
             CONVERT(parent, "Black",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    label3 = XmCreateLabel(form2,
                           "label3",
                           args,
                           ac);
    XtManageChild(label3);

    ac = 0;
    XtSetArg(args[ac], XmNresizePolicy, XmRESIZE_GROW);
    ac++;
    XtSetArg(args[ac], XmNheight, 276);
    ac++;
    XtSetArg(args[ac], XmNbackground,
             CONVERT(parent, "#ccc",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNfontList,
             CONVERT(parent, "-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-1",
                     XmRFontList, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNforeground,
             CONVERT(parent, "Black",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    tabStack1 = XmCreateTabStack(form1,
                                 "tabStack1",
                                 args,
                                 ac);
    XtManageChild(tabStack1);

    ac = 0;
    XtSetArg(args[ac], XmNlabelString,
             CONVERT(parent, ":::t\"Sample TabStack\"\"Label One\"",
                     XmRXmString, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNx, 12);
    ac++;
    XtSetArg(args[ac], XmNy, 50);
    ac++;
    XtSetArg(args[ac], XmNbackground,
             CONVERT(parent, "#ccc",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNfontList,
             CONVERT(parent, "-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-1",
                     XmRFontList, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNforeground,
             CONVERT(parent, "Black",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    label = XmCreateLabel(tabStack1,
                          "label",
                          args,
                          ac);
    XtManageChild(label);

    ac = 0;
    XtSetArg(args[ac], XmNlabelString,
             CONVERT(parent, ":::t\"Sample TabStack\"\"Label Two\"",
                     XmRXmString, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNx, -441);
    ac++;
    XtSetArg(args[ac], XmNy, 50);
    ac++;
    XtSetArg(args[ac], XmNbackground,
             CONVERT(parent, "#ccc",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNfontList,
             CONVERT(parent, "-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-1",
                     XmRFontList, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNforeground,
             CONVERT(parent, "Black",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    label1 = XmCreateLabel(tabStack1,
                           "label1",
                           args,
                           ac);
    XtManageChild(label1);

    ac = 0;
    XtSetArg(args[ac], XmNlabelString,
             CONVERT(parent, ":::t\"Sample TabStack\"\"Label Three\"",
                     XmRXmString, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNx, -441);
    ac++;
    XtSetArg(args[ac], XmNy, 50);
    ac++;
    XtSetArg(args[ac], XmNbackground,
             CONVERT(parent, "#ccc",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNfontList,
             CONVERT(parent, "-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-1",
                     XmRFontList, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNforeground,
             CONVERT(parent, "Black",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    label2 = XmCreateLabel(tabStack1,
                           "label2",
                           args,
                           ac);
    XtManageChild(label2);

    ac = 0;
    XtSetArg(args[ac], XmNx, 9);
    ac++;
    XtSetArg(args[ac], XmNy, 456);
    ac++;
    XtSetArg(args[ac], XmNbackground,
             CONVERT(parent, "#ccc",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNforeground,
             CONVERT(parent, "Black",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    separator = XmCreateSeparator(form,
                                  "separator",
                                  args,
                                  ac);
    XtManageChild(separator);

    ac = 0;
    XtSetArg(args[ac], XmNlabelString,
             CONVERT(parent, "Quit",
                     XmRXmString, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNx, 784);
    ac++;
    XtSetArg(args[ac], XmNy, 468);
    ac++;
    XtSetArg(args[ac], XmNbackground,
             CONVERT(parent, "#ccc",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNfontList,
             CONVERT(parent, "-*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-1",
                     XmRFontList, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNforeground,
             CONVERT(parent, "Black",
                     XmRPixel, 0, &argok));
    if (argok) ac++;
    pushButton = XmCreatePushButton(form,
                                    "pushButton",
                                    args,
                                    ac);
    XtManageChild(pushButton);
    XtAddCallback(pushButton, XmNactivateCallback, BxExitCB, (XtPointer)0);

    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_FORM);
    ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_WIDGET);
    ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_FORM);
    ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_FORM);
    ac++;
    XtSetArg(args[ac], XmNbottomWidget, separator);
    ac++;
    XtSetArg(args[ac], XmNtopOffset, 10);
    ac++;
    XtSetArg(args[ac], XmNbottomOffset, 10);
    ac++;
    XtSetArg(args[ac], XmNleftOffset, 10);
    ac++;
    XtSetArg(args[ac], XmNrightOffset, 11);
    ac++;
    XtSetValues(tabStack, args, ac);

    ac = 0;
    XtSetArg(args[ac], XmNtabLabelString,
             CONVERT(parent, "Description",
                     XmRXmString, 0, &argok));
    if (argok) ac++;
    XtSetValues(scrolledWindow, args, ac);

    ac = 0;
    XtSetArg(args[ac], XmNtabLabelString,
             CONVERT(parent, "Resources",
                     XmRXmString, 0, &argok));
    if (argok) ac++;
    XtSetArg(args[ac], XmNtabLabelPixmap, XPM_PIXMAP(parent, allviewpix_icon));
    ac++;
    XtSetValues(form1, args, ac);

    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_FORM);
    ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_FORM);
    ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_NONE);
    ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_FORM);
    ac++;
    XtSetArg(args[ac], XmNtopOffset, 10);
    ac++;
    XtSetArg(args[ac], XmNbottomOffset, 10);
    ac++;
    XtSetArg(args[ac], XmNrightOffset, 10);
    ac++;
    XtSetValues(frame, args, ac);

    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_WIDGET);
    ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_NONE);
    ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION);
    ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_FORM);
    ac++;
    XtSetArg(args[ac], XmNtopWidget, radioBox);
    ac++;
    XtSetArg(args[ac], XmNleftPosition, 30);
    ac++;
    XtSetArg(args[ac], XmNtopOffset, 10);
    ac++;
    XtSetArg(args[ac], XmNbottomOffset, 0);
    ac++;
    XtSetArg(args[ac], XmNrightOffset, 10);
    ac++;
    XtSetValues(radioBox1, args, ac);

    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET);
    ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET);
    ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_FORM);
    ac++;
    XtSetArg(args[ac], XmNtopWidget, radioBox1);
    ac++;
    XtSetArg(args[ac], XmNbottomWidget, radioBox1);
    ac++;
    XtSetArg(args[ac], XmNtopOffset, 0);
    ac++;
    XtSetArg(args[ac], XmNbottomOffset, 0);
    ac++;
    XtSetArg(args[ac], XmNleftOffset, 10);
    ac++;
    XtSetValues(label4, args, ac);

    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_FORM);
    ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_POSITION);
    ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_FORM);
    ac++;
    XtSetArg(args[ac], XmNleftPosition, 31);
    ac++;
    XtSetArg(args[ac], XmNtopOffset, 10);
    ac++;
    XtSetArg(args[ac], XmNrightOffset, 10);
    ac++;
    XtSetValues(radioBox, args, ac);

    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET);
    ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET);
    ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_FORM);
    ac++;
    XtSetArg(args[ac], XmNtopWidget, radioBox);
    ac++;
    XtSetArg(args[ac], XmNbottomWidget, radioBox);
    ac++;
    XtSetArg(args[ac], XmNtopOffset, 0);
    ac++;
    XtSetArg(args[ac], XmNbottomOffset, 0);
    ac++;
    XtSetArg(args[ac], XmNleftOffset, 10);
    ac++;
    XtSetValues(label3, args, ac);

    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_FORM);
    ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_FORM);
    ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_FORM);
    ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_WIDGET);
    ac++;
    XtSetArg(args[ac], XmNrightWidget, frame);
    ac++;
    XtSetArg(args[ac], XmNtopOffset, 10);
    ac++;
    XtSetArg(args[ac], XmNbottomOffset, 82);
    ac++;
    XtSetArg(args[ac], XmNleftOffset, 9);
    ac++;
    XtSetArg(args[ac], XmNrightOffset, 10);
    ac++;
    XtSetValues(tabStack1, args, ac);

    ac = 0;
    XtSetArg(args[ac], XmNtabLabelString,
             CONVERT(parent, "One",
                     XmRXmString, 0, &argok));
    if (argok) ac++;
    XtSetValues(label, args, ac);

    ac = 0;
    XtSetArg(args[ac], XmNtabLabelString,
             CONVERT(parent, "Two",
                     XmRXmString, 0, &argok));
    if (argok) ac++;
    XtSetValues(label1, args, ac);

    ac = 0;
    XtSetArg(args[ac], XmNtabLabelString,
             CONVERT(parent, "Three",
                     XmRXmString, 0, &argok));
    if (argok) ac++;
    XtSetValues(label2, args, ac);

    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_NONE);
    ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_WIDGET);
    ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_FORM);
    ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_FORM);
    ac++;
    XtSetArg(args[ac], XmNbottomWidget, pushButton);
    ac++;
    XtSetArg(args[ac], XmNbottomOffset, 10);
    ac++;
    XtSetArg(args[ac], XmNleftOffset, 9);
    ac++;
    XtSetArg(args[ac], XmNrightOffset, 10);
    ac++;
    XtSetValues(separator, args, ac);

    ac = 0;
    XtSetArg(args[ac], XmNtopAttachment, XmATTACH_NONE);
    ac++;
    XtSetArg(args[ac], XmNbottomAttachment, XmATTACH_FORM);
    ac++;
    XtSetArg(args[ac], XmNleftAttachment, XmATTACH_NONE);
    ac++;
    XtSetArg(args[ac], XmNrightAttachment, XmATTACH_FORM);
    ac++;
    XtSetArg(args[ac], XmNbottomOffset, 10);
    ac++;
    XtSetArg(args[ac], XmNrightOffset, 10);
    ac++;
    XtSetValues(pushButton, args, ac);

    return( form );
}
Ejemplo n.º 7
0
int main( int argc, char **argv)
{
    Widget       parent;
    XtAppContext app;
    Arg          args[256];
    Cardinal     ac;
    Widget   topLevelShell;
    Widget   mainWindow;

    /* Begin user code block <declarations> */

    /* make sure that the argc that goes to XtVaAppInitialize
       is 1 so that no options are removed by its option parsing */
    int		 argc_save;
    argc_save = argc;
    argc = 1;

    /* End user code block <declarations> */

    /*
     * Initialize Xt.
     */

    XtSetLanguageProc(NULL, (XtLanguageProc) NULL, NULL);

    /*
     * The applicationShell is created as an unrealized
     * parent for multiple topLevelShells.  The topLevelShells
     * are created as popup children of the applicationShell.
     * This is a recommendation of Paul Asente & Ralph Swick in
     * _X_Window_System_Toolkit_ p. 677.
     */

    parent = XtVaOpenApplication ( &app,
                                   BX_APP_CLASS,
                                   NULL,
                                   0,
                                   &argc,
                                   argv,
                                   NULL,
                                   sessionShellWidgetClass,
                                   NULL );

    RegisterBxConverters(app);
    XmRepTypeInstallTearOffModelConverter();

    /* Begin user code block <create_shells> */
    /* End user code block <create_shells> */

    /*
     * Create classes and widgets used in this program.
     */

    /* Begin user code block <create_topLevelShell> */
    /* End user code block <create_topLevelShell> */

    ac = 0;
    XtSetArg(args[ac], XmNtitle, "MBnavadjust"); ac++;
    XtSetArg(args[ac], XmNiconName, "MBnavadjust"); ac++;
    XtSetArg(args[ac], XmNx, 82); ac++;
    XtSetArg(args[ac], XmNy, 396); ac++;
    XtSetArg(args[ac], XmNwidth, 962); ac++;
    XtSetArg(args[ac], XmNheight, 400); ac++;
    topLevelShell = XtCreatePopupShell((char *)"topLevelShell",
        topLevelShellWidgetClass,
        parent,
        args,
        ac);
    XtAddCallback(topLevelShell, XmNdestroyCallback, BxExitCB, (XtPointer)0);
    mainWindow = (Widget)CreatemainWindow(topLevelShell);
    XtManageChild(mainWindow);
    XtPopup(XtParent(mainWindow), XtGrabNone);

    /* Begin user code block <app_procedures> */

    /* initialize app value and wait until view realized */
    do_wait_until_viewed(app);

    /* initialize everything */
    do_mbnavadjust_init(argc_save,argv);

    /* End user code block <app_procedures> */

    /* Begin user code block <main_loop> */
    /* End user code block <main_loop> */

    XtAppMainLoop(app);

    /*
     * A return value regardless of whether or not the main loop ends.
     */
     return(0);
}
Ejemplo n.º 8
0
int main( int argc, char **argv)
{
    Widget       parent;
    XtAppContext app;
    Arg          args[256];
    Cardinal     ac;
    Widget   topLevelShell;
    Widget   mainWindow_mbeditviz;

    /* Begin user code block <declarations> */

    int		argcsave;
    argcsave = argc;
    argc = 1;

    /* End user code block <declarations> */

    /*
     * Initialize Xt.
     */

    XtSetLanguageProc(NULL, (XtLanguageProc) NULL, NULL);

    /*
     * The applicationShell is created as an unrealized
     * parent for multiple topLevelShells.  The topLevelShells
     * are created as popup children of the applicationShell.
     * This is a recommendation of Paul Asente & Ralph Swick in
     * _X_Window_System_Toolkit_ p. 677.
     */

    parent = XtVaOpenApplication ( &app,
                                   BX_APP_CLASS,
                                   NULL,
                                   0,
                                   &argc,
                                   argv,
                                   NULL,
                                   sessionShellWidgetClass,
                                   NULL );

    RegisterBxConverters(app);
    XmRepTypeInstallTearOffModelConverter();

    /* Begin user code block <create_shells> */
    /* End user code block <create_shells> */

    /*
     * Create classes and widgets used in this program.
     */

    /* Begin user code block <create_topLevelShell> */
    /* End user code block <create_topLevelShell> */

    ac = 0;
    XtSetArg(args[ac], XmNtitle, "MBeditviz"); ac++;
    XtSetArg(args[ac], XmNx, 180); ac++;
    XtSetArg(args[ac], XmNy, 583); ac++;
    XtSetArg(args[ac], XmNwidth, 453); ac++;
    XtSetArg(args[ac], XmNheight, 557); ac++;
    topLevelShell = XtCreatePopupShell((char *)"topLevelShell",
        topLevelShellWidgetClass,
        parent,
        args,
        ac);
    XtAddCallback(topLevelShell, XmNdestroyCallback, do_mbeditviz_quit, (XtPointer)0);
    XtAddCallback(topLevelShell, XmNdestroyCallback, BxExitCB, (XtPointer)0);
    mainWindow_mbeditviz = (Widget)CreatemainWindow_mbeditviz(topLevelShell);
    XtManageChild(mainWindow_mbeditviz);
    XtPopup(XtParent(mainWindow_mbeditviz), XtGrabNone);

    /* Begin user code block <app_procedures> */

    /* End user code block <app_procedures> */

    /* Begin user code block <main_loop> */

    /* initialize the gui code */
    do_mbeditviz_init(parent, app);

    /* initialize the vizualization widgets code */
    mbview_startup(mbev_verbose, parent, app, &mbev_error);
    mb3dsoundings_startup(mbev_verbose, parent, app, &mbev_error);
    mb3dsoundings_set_dismiss_notify(mbev_verbose, mbeditviz_mb3dsoundings_dismiss, &mbev_error);
    mb3dsoundings_set_edit_notify(mbev_verbose, mbeditviz_mb3dsoundings_edit, &mbev_error);

    /* initialize the program code */
    mbeditviz_init(argcsave,argv);

    /* End user code block <main_loop> */

    XtAppMainLoop(app);

    /*
     * A return value regardless of whether or not the main loop ends.
     */
     return(0);
}
Ejemplo n.º 9
0
/*
 * Main Program
 */
int main(int argc, char **argv)
{
    Display *display;
    Arg args[256];
    Cardinal ac;
    /*SUPPRESS 591*/
    Boolean argok;
    XtAppContext context;
    Widget w;
    Widget parent;
    
    /* Begin user code block <declarations> */
    /* End user code block <declarations> */
    
    /*
     * Hierarchy variable declarations
     * Set "*newMrmStyle:False" in ~/.bxrc for bx25 style declarations
     */
    
    MrmHierarchy HierarchyID;
    MrmType MrmWClass;
    static char *UidFile [] = { BX_UID_FILE_NAME };
    MRMRegisterArg NamesList[49];
    Cardinal Nlac;
    Nlac = 0;
    NamesList[Nlac].name = "CloseTree";
    NamesList[Nlac++].value = (XtPointer) CloseTree;
    NamesList[Nlac].name = "CommandEntered";
    NamesList[Nlac++].value = (XtPointer) CommandEntered;
    NamesList[Nlac].name = "CreateTree";
    NamesList[Nlac++].value = (XtPointer) CreateTree;
    NamesList[Nlac].name = "MDisplayData";
    NamesList[Nlac++].value = (XtPointer) MDisplayData;
    NamesList[Nlac].name = "MDoAction";
    NamesList[Nlac++].value = (XtPointer) MDoAction;
    NamesList[Nlac].name = "MessageClear";
    NamesList[Nlac++].value = (XtPointer) MessageClear;
    NamesList[Nlac].name = "MessageDismiss";
    NamesList[Nlac++].value = (XtPointer) MessageDismiss;
    NamesList[Nlac].name = "ModifyData";
    NamesList[Nlac++].value = (XtPointer) ModifyData;
    NamesList[Nlac].name = "MenuUnmap";
    NamesList[Nlac++].value = (XtPointer) MenuUnmap;
    NamesList[Nlac].name = "BxManageCB";
    NamesList[Nlac++].value = (XtPointer) BxManageCB;
    NamesList[Nlac].name = "MSetupDevice";
    NamesList[Nlac++].value = (XtPointer) MSetupDevice;
    NamesList[Nlac].name = "SetDefault";
    NamesList[Nlac++].value = (XtPointer) SetDefault;
    NamesList[Nlac].name = "MModifyData";
    NamesList[Nlac++].value = (XtPointer) MModifyData;
    NamesList[Nlac].name = "DisplayNci";
    NamesList[Nlac++].value = (XtPointer) DisplayNci;
    NamesList[Nlac].name = "BxExitCB";
    NamesList[Nlac++].value = (XtPointer) BxExitCB;
    NamesList[Nlac].name = "MTurnOnOff";
    NamesList[Nlac++].value = (XtPointer) MTurnOnOff;
    NamesList[Nlac].name = "DisplayData";
    NamesList[Nlac++].value = (XtPointer) DisplayData;
    NamesList[Nlac].name = "MSetDefault";
    NamesList[Nlac++].value = (XtPointer) MSetDefault;
    NamesList[Nlac].name = "MDisplayNci";
    NamesList[Nlac++].value = (XtPointer) MDisplayNci;
    NamesList[Nlac].name = "TurnOnOff";
    NamesList[Nlac++].value = (XtPointer) TurnOnOff;
    NamesList[Nlac].name = "DoAction";
    NamesList[Nlac++].value = (XtPointer) DoAction;
    NamesList[Nlac].name = "OpenTree";
    NamesList[Nlac++].value = (XtPointer) OpenTree;
    NamesList[Nlac].name = "AddListTree";
    NamesList[Nlac++].value = (XtPointer) AddListTree;
    NamesList[Nlac].name = "SetupDevice";
    NamesList[Nlac++].value = (XtPointer) SetupDevice;
    NamesList[Nlac].name = "AddNode";
    NamesList[Nlac++].value = (XtPointer) AddNode;
#ifdef __hpux
    NamesList[Nlac].name = "AddListTree";
    NamesList[Nlac++].value = (XtPointer) AddListTree;
#endif
    NamesList[Nlac].name = "AddNodeApply";
    NamesList[Nlac++].value = (XtPointer) AddNodeApply;
    NamesList[Nlac].name = "AddNodeDismiss";
    NamesList[Nlac++].value = (XtPointer) AddNodeDismiss;
    NamesList[Nlac].name = "SetUsage";
    NamesList[Nlac++].value = (XtPointer) SetUsage;
    NamesList[Nlac].name = "AddDeviceDismiss";
    NamesList[Nlac++].value = (XtPointer) AddDeviceDismiss;
    NamesList[Nlac].name = "CreateAddDevice";
    NamesList[Nlac++].value = (XtPointer) CreateAddDevice;
    NamesList[Nlac].name = "AddDevice";
    NamesList[Nlac++].value = (XtPointer) AddDevice;
    NamesList[Nlac].name = "WriteTree";
    NamesList[Nlac++].value = (XtPointer) WriteTree;
    NamesList[Nlac].name = "ModifyTags";
    NamesList[Nlac++].value = (XtPointer) ModifyTags;
    NamesList[Nlac].name = "tag_button_proc";
    NamesList[Nlac++].value = (XtPointer) tag_button_proc;
    NamesList[Nlac].name = "tag_selection_proc";
    NamesList[Nlac++].value = (XtPointer) tag_selection_proc;
#ifdef __hpux
    NamesList[Nlac].name = "WriteTree";
    NamesList[Nlac++].value = (XtPointer) WriteTree;
#endif
    NamesList[Nlac].name = "DeleteNode";
    NamesList[Nlac++].value = (XtPointer) DeleteNode;
    NamesList[Nlac].name = "DeleteNodeNow";
    NamesList[Nlac++].value = (XtPointer) DeleteNodeNow;
    NamesList[Nlac].name = "RenameNode";
    NamesList[Nlac++].value = (XtPointer) RenameNode;
    NamesList[Nlac].name = "AddNodeStart";
    NamesList[Nlac++].value = (XtPointer) AddNodeStart;
 
    NamesList[Nlac].name = NULL;
    NamesList[Nlac].value = NULL;
    
    
    MrmInitialize();
    XtToolkitInitialize();
    context = XtCreateApplicationContext();
    display = XtOpenDisplay(context, 0, BX_APP_NAME, BX_APP_CLASS,
#ifndef XtSpecificationRelease
        options, XtNumber(options), (Cardinal*)&argc, argv);
#else
#if XtSpecificationRelease == 4
        options, XtNumber(options), (Cardinal*)&argc, argv);
#else
        options, XtNumber(options), &argc, argv);
#endif
#endif
    if(display == NULL)
    {
        XtWarning("cannot open display");
        exit(1);
    }
    /*
     * So converters work.
     */

    XtInitializeWidgetClass(applicationShellWidgetClass);

    /*
     * Install the tearOffModel resource converter
     */
#if (XmVersion >= 1002)
    XmRepTypeInstallTearOffModelConverter();
#endif
    
    /*
     * Register special BuilderXcessory converters
     */
    RegisterBxConverters(context);
    
    
    /* Begin user code block <create_shells> */
    XmdsInitialize();
    /* End user code block <create_shells> */
    /*
     * The applicationShell is created as an unrealized
     * parent for multiple topLevelShells.  The topLevelShells
     * are created as popup children of the applicationShell.
     * This is a recommendation of Paul Asente & Ralph Swick in
     * _X_Window_System_Toolkit_ p. 677.
     */
    ac = 0;
    AppShell = parent = XtAppCreateShell( BX_APP_NAME, BX_APP_CLASS,
                  applicationShellWidgetClass, display, args, ac);
    
    MrmRegisterNames(NamesList, Nlac);
    
    HierarchyID = 0;
    MrmOpenHierarchy((MrmCount)(1), UidFile, 0, &HierarchyID);
    XtInitializeWidgetClass(topLevelShellWidgetClass);
    ac = 0;
    XtSetArg(args[ac], XmNtitle, "Traverser"); ac++;
    XtSetArg(args[ac], XmNiconName, "Traverser"); ac++;
    XtSetArg(args[ac], XmNx, 947); ac++;
    XtSetArg(args[ac], XmNy, 349); ac++;
    XtSetArg(args[ac], XmNwidth, 509); ac++;
    XtSetArg(args[ac], XmNheight, 672); ac++;
    TopLevelShell = XtCreatePopupShell( "topLevelShell",
                        topLevelShellWidgetClass, AppShell, args, ac);
    MainWindow = NULL;
    MrmFetchWidget(HierarchyID, "mainWindow", TopLevelShell,
            &MainWindow, &MrmWClass);
    
    WriteDialog = NULL;
    MrmFetchWidget(HierarchyID, "writeDialog", MainWindow,
            &WriteDialog, &MrmWClass);
    
    AddDialog = NULL;
    MrmFetchWidget(HierarchyID, "addDialog", MainWindow,
            &AddDialog, &MrmWClass);
    
    AddDeviceDialog = NULL;
    MrmFetchWidget(HierarchyID, "addDeviceDialog", MainWindow,
            &AddDeviceDialog, &MrmWClass);
    
    OpenDialog = NULL;
    MrmFetchWidget(HierarchyID, "openDialog", MainWindow,
            &OpenDialog, &MrmWClass);
    
    MrmCloseHierarchy(HierarchyID);
    
    XtManageChild(MainWindow);
    XtPopup(XtParent(MainWindow), XtGrabNone);
    
    /* Begin user code block <app_procedures> */
    /* End user code block <app_procedures> */
    
    /* Begin user code block <main_loop> */
    /* End user code block <main_loop> */
XtVaSetValues(TopLevelShell,XmNdeleteResponse, XmDO_NOTHING, NULL);
XmAddWMProtocolCallback(TopLevelShell,XmInternAtom(XtDisplay(TopLevelShell),"WM_DELETE_WINDOW",True),(XtCallbackProc)CloseWindow,NULL);
    
    XtAppMainLoop(context);
    
    /*
     * A return value even though XtAppMainLoop never ends. 
     */
     return(0); 
}