void appIcon_Init(Widget* w_TopLevel, int argc, char* argv[]) { Position x, y; Dimension w, h; appLList = (struct NODE *)malloc(sizeof(struct NODE)); appLList->ptrData = NULL; appLList->next = NULL; XtSetLanguageProc (NULL, NULL, NULL); *w_TopLevel = XtVaOpenApplication (&GXIM_App, "gXipmsg", NULL, 0, &argc, argv, NULL,sessionShellWidgetClass, NULL); APPICON_Form = XmCreateForm (*w_TopLevel, "ipmsgForm", NULL, 0); // Create list holder APPICON_List_Users = XmCreateScrolledList (APPICON_Form, "List", NULL, 0); XtVaGetValues (APPICON_Form, XmNforeground, &fg, XmNbackground, &bg, NULL); pixmap =XmGetPixmap (XtScreen (APPICON_Form), "ipmsg.xpm", fg, bg); if(pixmap == XmUNSPECIFIED_PIXMAP) { pixmap = XmGetPixmap (XtScreen (APPICON_Form), "/etc/gXipmsg/ipmsg.xpm", fg, bg); } // Create icon button n = 0; XtSetArg (args[n], XmNlabelType, XmPIXMAP); n++; XtSetArg (args[n], XmNlabelPixmap, pixmap); n++; APPICON_BtnG_Icon = XmCreatePushButtonGadget (APPICON_Form, "ipmsgButton", args, n); XtAddCallback (APPICON_BtnG_Icon, XmNactivateCallback, appIcon_IconCallBack, APPICON_List_Users); XtManageChild (APPICON_BtnG_Icon); XtManageChild (APPICON_Form); x = WidthOfScreen (XtScreen (*w_TopLevel)); y = HeightOfScreen (XtScreen (*w_TopLevel)); XtVaGetValues(*w_TopLevel, XmNwidth, &w, XmNheight, &h, NULL); x = x - (w+150); y = y - (h+150); XtVaSetValues (*w_TopLevel, XmNmwmDecorations, MWM_DECOR_TITLE | MWM_DECOR_MENU, XmNmwmFunctions, MWM_FUNC_CLOSE | MWM_FUNC_MOVE, XmNtitle, "gXip", XmNx, x, XmNy, y, NULL); // Materialize major widgets XtRealizeWidget (*w_TopLevel); }
int main(int argc, char **argv) { Widget toplevel, spb, bb, list, tf; XtAppContext app; XmString item; Arg al[10]; int ac; XtSetLanguageProc(NULL, NULL, NULL); toplevel = XtVaAppInitialize(&app, "SpinBox", NULL, 0, &argc, argv, NULL, NULL); bb = XmCreateForm(toplevel, "bb", NULL, 0); XtManageChild(bb); XtRealizeWidget(toplevel); ac = 0; spb = XmCreateSpinBox(bb, "spinbox", al, ac); XtAddCallback(spb, XmNvalueChangedCallback, ModifyVerify, NULL); ac = 0; XtSetArg(al[ac], XmNspinBoxChildType, XmNUMERIC); ac++; XtSetArg(al[ac], XmNdecimalPoints, 1); ac++; tf = XmCreateTextField(spb, "tf", al, ac); XtManageChild(tf); XtManageChild(spb); LessTifTestMainLoop(toplevel); exit(0); }
Widget create_labeled_textfield(Widget *parent, char *label_string) { Widget form_widget; Widget label_widget; Widget text_widget; Arg args[8]; int n = 0; XtSetArg(args[n], XmNfractionBase, 10); n++; XtSetArg(args[n], XmNnavigationType, XmNONE); n++; form_widget = XmCreateForm(*parent, "form", args, n); n = 0; XtSetArg(args[n], XmNtopAttachment, XmATTACH_FORM); n++; XtSetArg(args[n], XmNbottomAttachment, XmATTACH_FORM); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_POSITION); n++; XtSetArg(args[n], XmNrightPosition, 3); n++; XtSetArg(args[n], XmNalignment, XmALIGNMENT_END); n++; XtSetArg(args[n], XmNnavigationType, XmNONE); n++; label_widget = XmCreateLabelGadget(form_widget, label_string, args, n); XtManageChild(label_widget); n = 0; XtSetArg(args[n], XmNtraversalOn, True); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_POSITION); n++; XtSetArg(args[n], XmNleftPosition, 4); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); n++; XtSetArg(args[n], XmNnavigationType, XmTAB_GROUP); n++; text_widget = XmCreateTextField(form_widget, "text", args, n); XtManageChild(text_widget); XtManageChild(form_widget); return text_widget; }
//========================================================================= // // Description: // Buils the editor layout // // Use: protected // //========================================================================= Widget InvAnnotationEditor::buildWidget(Widget parent) { Arg args[12]; // create a top level form to hold everything together XtSetArg(args[0], XmNfractionBase, 100); Widget form = XmCreateForm(parent, (char *)"", args, 1); Widget fr1 = XtVaCreateManagedWidget( (char *)"Frame1", xmFrameWidgetClass, form, XmNleftAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_FORM, XmNleftOffset, 5, XmNrightOffset, 5, XmNbottomOffset, 5, XmNtopOffset, 5, XmNtopAttachment, XmATTACH_FORM, XmNbottomAttachment, XmATTACH_WIDGET, //XmNbottomWidget, push_button, NULL); createEditLine(fr1); return form; }
// // Create the work area for this window. // Widget DXAnchorWindow::createWorkArea (Widget parent) { int n; Arg args[20]; XmString xmstr; n = 0; this->form = XmCreateForm (parent, "frame", args, n); XtManageChild (this->form); //const char *cp = theDXApplication->getCopyrightNotice(); const char *cp = ""; char buf[256]; strcpy (buf, cp); xmstr = XmStringCreateLtoR (buf, "bold"); n = 0; XtSetArg (args[n], XmNlabelString, xmstr); n++; this->label = XmCreateLabel (this->form, "copyright", args, n); XtManageChild (this->label); XmStringFree(xmstr); this->resetWindowTitle(); return form; }
Widget awt_util_createWarningWindow(Widget parent, char *warning) { Widget warningWindow; #ifdef NETSCAPE extern Widget FE_MakeAppletSecurityChrome(Widget parent, char* message); warningWindow = FE_MakeAppletSecurityChrome(parent, warning); #else Widget label; int32_t argc; #define MAX_ARGC 10 Arg args[MAX_ARGC]; int32_t screen = 0; int32_t i; AwtGraphicsConfigDataPtr adata; extern int32_t awt_numScreens; Pixel gray; Pixel black; for (i = 0; i < awt_numScreens; i++) { if (ScreenOfDisplay(awt_display, i) == XtScreen(parent)) { screen = i; break; } } adata = getDefaultConfig(screen); gray = adata->AwtColorMatch(192, 192, 192, adata); black = adata->AwtColorMatch(0, 0, 0, adata); argc = 0; XtSetArg(args[argc], XmNbackground, gray); argc++; XtSetArg(args[argc], XmNmarginHeight, 0); argc++; XtSetArg(args[argc], XmNmarginWidth, 0); argc++; XtSetArg (args[argc], XmNscreen, XtScreen(parent)); argc++; DASSERT(!(argc > MAX_ARGC)); warningWindow = XmCreateForm(parent, "main", args, argc); XtManageChild(warningWindow); label = XtVaCreateManagedWidget(warning, xmLabelWidgetClass, warningWindow, XmNhighlightThickness, 0, XmNbackground, gray, XmNforeground, black, XmNalignment, XmALIGNMENT_CENTER, XmNrecomputeSize, False, NULL); XtVaSetValues(label, XmNbottomAttachment, XmATTACH_FORM, XmNtopAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_FORM, NULL); #endif return warningWindow; }
/* -------------------------------------------------------------------- */ static void CreatePreferences() { int i; Cardinal n; Arg args[2]; Widget frame, RC, plRC, label, b[3]; PreferShell = XtCreatePopupShell("prefParmsShell", topLevelShellWidgetClass, AppShell, NULL, 0); PreferWindow = XmCreateRowColumn(PreferShell, (char *)"prefRC", NULL, 0); n = 0; frame = XmCreateFrame(PreferWindow, (char *)"prefFrame", args, n); XtManageChild(frame); n = 0; RC = XmCreateRowColumn(frame, (char *)"prefRC", args, n); for (i = 0; i < TOTAL_PREFERS; ++i) { plRC = XmCreateRowColumn(RC, (char *)"plRC", args, n); XtManageChild(plRC); sprintf(buffer, "prefer%d", i); label = XmCreateLabel(plRC, buffer, args, n); XtManageChild(label); prefText[i] = XmCreateTextField(plRC, (char *)"prefText", args, n); XtManageChild(prefText[i]); XtAddCallback(prefText[i], XmNlosingFocusCallback, ApplyPreferences, NULL); } /* Command buttons. */ n = 0; frame = XmCreateFrame(PreferWindow, (char *)"buttonFrame", args, 0); XtManageChild(frame); n = 0; plRC = XmCreateForm(frame, (char *)"buttonRC", args, n); n = 0; b[0] = XmCreatePushButton(plRC, (char *)"dismissButton", args, n); XtAddCallback(b[0], XmNactivateCallback, DismissWindow, PreferWindow); n = 0; b[1] = XmCreatePushButton(plRC, (char *)"saveButton", args, n); XtAddCallback(b[1], XmNactivateCallback, SavePreferences, NULL); XtManageChildren(b, 2); XtManageChild(plRC); XtManageChild(RC); } /* END CREATEPREFERENCES */
int main(int argc, char **argv) { XtAppContext app; Arg arg[1]; toplevel = XtVaAppInitialize(&app, "listTest", NULL, 0, &argc, argv, fallbacks, NULL); formw = XmCreateForm(toplevel, "form", NULL, 0); button1 = XmCreatePushButton(formw, "button", NULL, 0); listw = XmCreateScrolledList(formw, "list", arg, 0); XtVaSetValues(XtParent(listw), XmNtopAttachment, XmATTACH_FORM, XmNbottomAttachment, XmATTACH_WIDGET, XmNbottomWidget, button1, XmNleftAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_FORM, NULL); XtVaSetValues(button1, XmNtopAttachment, XmATTACH_NONE, XmNbottomAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_FORM, NULL); XtManageChild(formw); XtManageChild(button1); XtManageChild(listw); XtRealizeWidget(toplevel); XtAddCallback(button1, XmNactivateCallback, button_cb1, NULL); XdbPrintTree(toplevel); { static XtWidgetGeometry Expected[] = { CWWidth | CWHeight , 56, 72, 78, 131, 0,0,0, /* form */ CWWidth | CWHeight | CWX | CWY, 0, 106, 78, 25, 0,0,0, /* button */ CWWidth | CWHeight | CWX | CWY, 0, 0, 78, 106, 0,0,0, /* listSW */ CWWidth | CWHeight | CWX | CWY, 63, 0, 15, 87, 0,0,0, /* VertScrollBar */ CWWidth | CWHeight | CWX | CWY, 0, 91, 59, 15, 0,0,0, /* HorScrollBar */ CWWidth | CWHeight | CWX | CWY, 0, 0, 59, 87, 0,0,0, /* list */ }; /* toplevel should be replaced with to correct applicationShell */ PrintDetails(toplevel, Expected); } LessTifTestMainLoop(toplevel); exit(0); }
int main(int argc, char **argv) { Widget toplevel, widget, bb, list; XtAppContext app; XmString item; Arg args[10]; int n = 0; XtSetLanguageProc(NULL, NULL, NULL); toplevel = XtVaAppInitialize(&app, "ComBox", NULL, 0, &argc, argv, NULL, NULL); bb = XmCreateForm(toplevel, "bb", NULL, 0); XtManageChild(bb); widget = XmCreateDropDownComboBox(bb, "combo", args, n); XtVaSetValues(widget, XmNtopAttachment, XmATTACH_FORM, XmNbottomAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_FORM, NULL); /* use list routine to add items */ list = CB_List(widget); item = XmStringCreateSimple("Item 1"); XmListAddItem(list,item,0); item = XmStringCreateSimple("Item 2"); XmListAddItem(list,item,0); item = XmStringCreateSimple("Item 3"); XmListAddItem(list,item,0); item = XmStringCreateSimple("Item 4"); XmListAddItem(list,item,0); item = XmStringCreateSimple("Item 5"); XmListAddItem(list,item,0); XmComboBoxUpdate(widget); XtManageChild(widget); XtRealizeWidget(toplevel); #if 0 XdbPrintResources(CB_ListShell(widget)); XdbPrintResources(widget); #endif check_geometry(widget); LessTifTestMainLoop(toplevel); exit(0); }
int main (int argc, char **argv) { XtAppContext theApp; Widget dialog, rc, label; XmString xmstr; toplevel = XtVaAppInitialize (&theApp, "drawingArea", NULL, 0, &argc, argv, NULL, NULL); XtVaSetValues(toplevel, XmNallowShellResize, True, NULL); dialog = XmCreateMessageBox(toplevel, "MyDialog", NULL, 0); xmstr = XmStringCreateLtoR("Hello World\n\nIf you hit OK on this dialog, another one" "\nshould appear, positioned to the lower right of this one.", XmFONTLIST_DEFAULT_TAG); XtVaSetValues(dialog, XmNmessageString, xmstr, NULL); #if 1 rc = XmCreateRowColumn(dialog, "rc", NULL, 0); #else rc = XmCreateForm(dialog, "rc", NULL, 0); #endif label = XmCreateLabel(rc, "label", NULL, 0); XtVaSetValues(label, XmNborderWidth, 1, NULL); XtManageChild(label); XtManageChild(rc); XtManageChild (dialog); XtRealizeWidget (toplevel); { static XtWidgetGeometry Expected[] = { CWWidth | CWHeight , 56, 72, 368, 176, 0,0,0, /* MyDialog */ CWWidth | CWHeight | CWX | CWY, 0, 0, 4, 4, 0,0,0, /* Symbol */ CWWidth | CWHeight | CWX | CWY, 11, 11, 346, 56, 0,0,0, /* Message */ CWWidth | CWHeight | CWX | CWY, 0, 112, 368, 2, 0,0,0, /* Separator */ CWWidth | CWHeight | CWX | CWY, 11, 124, 64, 41, 0,0,0, /* OK */ CWWidth | CWHeight | CWX | CWY, 152, 124, 64, 41, 0,0,0, /* Cancel */ CWWidth | CWHeight | CWX | CWY, 293, 124, 64, 41, 0,0,0, /* Help */ CWWidth | CWHeight | CWX | CWY, 11, 77, 346, 25, 0,0,0, /* rc */ CWWidth | CWHeight | CWX | CWY, 3, 3, 338, 17, 0,0,0, /* label */ }; /* toplevel should be replaced with to correct applicationShell */ PrintDetails(toplevel, Expected); } LessTifTestMainLoop(toplevel); exit (0); }
int main(int argc, char **argv) { XtAppContext app; Widget Shell; Widget Form; Widget TopLabel; Widget BottomLabel; XtSetLanguageProc(NULL, NULL, NULL); Shell = XtVaAppInitialize(&app, "Shell", NULL, 0, &argc, argv, FallBack, NULL); Form = XmCreateForm(Shell,"Form",NULL,0); TopLabel = XmCreateLabel(Form,"TopLabel",NULL,0); XtVaSetValues(TopLabel, XmNtopAttachment, XmATTACH_NONE, NULL); XtManageChild(TopLabel); BottomLabel = XmCreateLabel(Form,"BottomLabel",NULL,0); XtVaSetValues(BottomLabel, XmNtopAttachment, XmATTACH_WIDGET, XmNtopWidget, TopLabel, XmNtopOffset, 1, XmNbottomAttachment, XmATTACH_POSITION, XmNbottomOffset, 2, XmNbottomPosition, 50, NULL); XtManageChild(BottomLabel); XtManageChild(Form); XtRealizeWidget(Shell); { static XtWidgetGeometry Expected[] = { CWWidth | CWHeight, 0, 0, 72, 81, 0,0,0, /* Form */ CWWidth | CWHeight | CWX | CWY, 0, 0, 52, 17, 0,0,0, /* two */ CWWidth | CWHeight | CWX | CWY, 0, 20, 70, 17, 0,0,0, /* two */ CWWidth | CWHeight, 0, 0, 144, 160, 0,0,0, /* Form */ CWWidth | CWHeight | CWX | CWY, 0, 0, 52, 17, 0,0,0, /* two */ CWWidth | CWHeight | CWX | CWY, 0, 20, 70, 56, 0,0,0, /* two */ }; PrintDetails(Shell, Expected); LessTifTestWaitForIt(Shell); LessTifTestResizeWidget(Shell, 144, 160); PrintDetails(Shell, Expected); } LessTifTestMainLoop(Shell); exit(0); }
void CreateMainW(Widget w, String name) { Widget Form, MenuBar, Label, FileCascade, FileMenu; Widget Cascade, CascadeMenu, wch; Form = XmCreateForm(w, name, NULL, 0); MenuBar = XmCreateMenuBar(Form, "menubar", NULL, 0); XtVaSetValues(MenuBar, XmNtopAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_FORM, NULL); Label = XmCreateLabel(Form, "ExtTest Test Application", NULL, 0); XtVaSetValues(Label, XmNtopAttachment, XmATTACH_WIDGET, XmNtopWidget, MenuBar, XmNleftAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_FORM, XmNbottomAttachment, XmATTACH_FORM, NULL); FileCascade = XmCreateCascadeButton(MenuBar, "File", NULL, 0); FileMenu = XmCreatePulldownMenu(MenuBar, "filemenu", NULL, 0); XtVaSetValues(FileCascade, XmNsubMenuId, FileMenu, NULL); Cascade = XmCreateCascadeButton(FileMenu, "Cascade", NULL, 0); XtManageChild(Cascade); XtManageChild(wch = XmCreatePushButton(FileMenu, "Modeless Dialog", NULL, 0)); XtAddCallback(wch, XmNactivateCallback, DoDialogCB, (XtPointer) XmDIALOG_MODELESS); XtManageChild(wch = XmCreatePushButton(FileMenu, "Two Modeless Dialogs", NULL, 0)); XtAddCallback(wch, XmNactivateCallback, DoDialogCB, (XtPointer) 42); XtManageChild(wch = XmCreatePushButton(FileMenu, "Two Modeless Dialogs Cascaded", NULL, 0)); XtAddCallback(wch, XmNactivateCallback, DoDialogCB, (XtPointer) 43); XtManageChild(wch = XmCreatePushButton(FileMenu, "Application Modal Dialog", NULL, 0)); XtAddCallback(wch, XmNactivateCallback, DoDialogCB, (XtPointer) XmDIALOG_APPLICATION_MODAL); XtManageChild(wch = XmCreatePushButton(FileMenu, "Two Application Modal Dialogs", NULL, 0)); XtAddCallback(wch, XmNactivateCallback, DoDialogCB, (XtPointer) 44); XtManageChild(wch = XmCreatePushButton(FileMenu, "Full Application Modal Dialog", NULL, 0)); XtAddCallback(wch, XmNactivateCallback, DoDialogCB, (XtPointer) XmDIALOG_FULL_APPLICATION_MODAL); XtManageChild(XmCreatePushButton(FileMenu, "Quit", NULL, 0)); CascadeMenu = XmCreatePulldownMenu(FileMenu, "cascademenu", NULL, 0); XtVaSetValues(Cascade, XmNsubMenuId, CascadeMenu, NULL); XtManageChild(XmCreatePushButton(CascadeMenu, "Test1", NULL, 0)); XtManageChild(wch = XmCreatePushButton(CascadeMenu, "Test2", NULL, 0)); XtAddCallback(wch, XmNarmCallback, DumpCB, (XtPointer) NULL); XtManageChild(FileCascade); XtManageChild(MenuBar); XtManageChild(Label); XtManageChild(Form); } /* CreateMainW */
main (int argc, char *argv[]) { Widget toplevel, text_w, form, rowcol, label_w; XtAppContext app; int i; void print_result(Widget, XtPointer, XtPointer); Arg args[8]; int n; XtSetLanguageProc (NULL, NULL, NULL); toplevel = XtVaAppInitialize (&app, "Demos", NULL, 0, &argc, argv, NULL, sessionShellWidgetClass, NULL); rowcol = XmCreateRowColumn (toplevel, "rowcol", NULL, 0); for (i = 0; i < XtNumber (labels); i++) { n = 0; XtSetArg (args[n], XmNfractionBase, 10); n++; XtSetArg (args[n], XmNnavigationType, XmNONE); n++; form = XmCreateForm (rowcol, "form", args, n); n = 0; XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++; XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; XtSetArg (args[n], XmNrightAttachment, XmATTACH_POSITION); n++; XtSetArg (args[n], XmNrightPosition, 3); n++; XtSetArg (args[n], XmNalignment, XmALIGNMENT_END); n++; XtSetArg (args[n], XmNnavigationType, XmNONE); n++; label_w = XmCreateLabelGadget (form, labels[i], args, n); XtManageChild (label_w); n = 0; XtSetArg (args[n], XmNtraversalOn, True); n++; XtSetArg (args[n], XmNleftAttachment, XmATTACH_POSITION); n++; XtSetArg (args[n], XmNleftPosition, 4); n++; XtSetArg (args[n], XmNrightAttachment, XmATTACH_FORM); n++; XtSetArg (args[n], XmNnavigationType, XmTAB_GROUP); n++; text_w = XmCreateTextField (form, "text_w", args, n); XtManageChild (text_w); /* When user hits return, print the label+value of text_w */ XtAddCallback (text_w, XmNactivateCallback, print_result, (XtPointer) labels[i]); XtManageChild (form); } XtManageChild (rowcol); XtRealizeWidget (toplevel); XtAppMainLoop (app); }
/* -------------------------------------------------------------------- */ static void CreateStatsWindow() { Arg args[8]; Cardinal n; Widget drFrame, drRC, b[3]; n = 0; StatsShell = XtCreatePopupShell("statsShell", topLevelShellWidgetClass, AppShell, args, n); n = 0; StatsWindow = XmCreateForm(StatsShell, (char *)"statsForm", args, n); n = 0; XtSetArg(args[n], XmNtopAttachment, XmATTACH_FORM); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); n++; drFrame = XmCreateFrame(StatsWindow, (char *)"buttonFrame", args, n); XtManageChild(drFrame); n = 0; drRC = XmCreateRowColumn(drFrame, (char *)"buttonRC", args, n); XtManageChild(drRC); n = 0; b[0] = XmCreatePushButton(drRC, (char *)"dismissButton", args, n); b[1] = XmCreatePushButton(drRC, (char *)"printButton", args, n); b[2] = XmCreatePushButton(drRC, (char *)"parmsButton", args, n); XtManageChildren(b, 3); XtAddCallback(b[0], XmNactivateCallback, DismissStats, StatsWindow); XtAddCallback(b[1], XmNactivateCallback, PrintStats, NULL); XtAddCallback(b[2], XmNactivateCallback, EditStatsParms, NULL); n = 0; XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); n++; XtSetArg(args[n], XmNtopWidget, drFrame); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); n++; XtSetArg(args[n], XmNbottomAttachment, XmATTACH_FORM); n++; statsText = XmCreateScrolledText(StatsWindow, (char *)"statsText", args, n); XtManageChild(statsText); } /* END CREATESTATSWINDOW */
void MainWindow::showMotifDialog() { QtMotifDialog dialog(this); dialog.setWindowTitle(tr("Custom Motif Dialog")); Widget form = XmCreateForm( dialog.shell(), const_cast<char*>("custom motif dialog"), NULL, 0 ); XmString str; Arg args[9]; str = XmStringCreateLocalized( const_cast<char*>("Close") ); XtSetArg( args[0], XmNlabelString, str ); XtSetArg( args[1], XmNshowAsDefault, True ); XtSetArg( args[2], XmNleftAttachment, XmATTACH_POSITION ); XtSetArg( args[3], XmNleftPosition, 40 ); XtSetArg( args[4], XmNrightAttachment, XmATTACH_POSITION ); XtSetArg( args[5], XmNrightPosition, 60 ); XtSetArg( args[7], XmNbottomAttachment, XmATTACH_FORM ); XtSetArg( args[6], XmNtopOffset, 10 ); XtSetArg( args[8], XmNbottomOffset, 10 ); Widget button = XmCreatePushButton( form, const_cast<char*>("Close"), args, 9 ); XmStringFree( str ); str = XmStringCreateLocalized( const_cast<char*>("This is a custom Motif-based dialog using\nQtMotifDialog with a QWidget-based parent.") ); XtSetArg( args[0], XmNlabelString, str ); XtSetArg( args[1], XmNleftAttachment, XmATTACH_FORM ); XtSetArg( args[2], XmNrightAttachment, XmATTACH_FORM ); XtSetArg( args[3], XmNtopAttachment, XmATTACH_FORM ); XtSetArg( args[4], XmNbottomAttachment, XmATTACH_WIDGET ); XtSetArg( args[5], XmNbottomWidget, button ); XtSetArg( args[6], XmNtopOffset, 10 ); XtSetArg( args[7], XmNbottomOffset, 10 ); Widget label = XmCreateLabelGadget( form, const_cast<char*>("label"), args, 8 ); XmStringFree( str ); XtManageChild( button ); XtManageChild( label ); XtManageChild( form ); XtAddCallback( button, XmNactivateCallback, (XtCallbackProc) QtMotifDialog::acceptCallback, &dialog ); dialog.exec(); }
/*************************************<->************************************* * * wspCreateManager (shellW) * * * Description: * ----------- * Creates the manager widget for the workspace presence dialog * * Inputs: * ------ * * Outputs: * ------- * * Comments: * --------- * Creates a form widget ******************************<->***********************************/ static Widget wspCreateManager( Widget shellW ) { Arg setArgs[20]; Widget formW; /* !!! set colors? !!! */ formW = (Widget) XmCreateForm (shellW, "form", (ArgList) setArgs, 0); XtAddCallback (formW, XmNhelpCallback, WmDtWmTopicHelpCB, WM_DT_WSPRESENCE_TOPIC); XtManageChild (formW); return (formW); } /* END OF FUNCTION */
void XFE_ComposeAttachFolderView::createWidgets(Widget parent) { // create attachment folder form Widget form=XmCreateForm(parent,"attachForm",NULL,0); // create attachment panel _attachPanel=new XFE_ComposeAttachPanel(this,_context); _attachPanel->createWidgets(form); _attachPanel->show(); XtVaSetValues(_attachPanel->getBaseWidget(), XmNleftAttachment,XmATTACH_FORM, XmNrightAttachment,XmATTACH_FORM, XmNtopAttachment,XmATTACH_FORM, XmNbottomAttachment,XmATTACH_FORM, NULL); #if !defined(USE_MOTIF_DND) // create drop site for internal drop (message,news etc.) fe_dnd_CreateDrop(_attachPanel->getBaseWidget(),AttachDropCb,this); #endif /* USE_MOTIF_DND */ // create popup menu _xfePopup = new XFE_PopupMenu("popup",(XFE_Frame*)m_toplevel,_attachPanel->pane(),NULL); _xfePopup->addMenuSpec(attachPopupMenuSpec); // Remove the osfLeft and osfRight translations of the popup's children. // For bug 71620. See the bug description for details. Basically, for // some strange reason, motif assumes that either a left or a right // naviation widget exists for this popup menu and core dumps trying // to dereference a NULL widget. _xfePopup->removeLeftRightTranslations(); setBaseWidget(form); // Register this widget to have a tooltip. fe_WidgetAddToolTips(form); // add existing attachments to the panel (e.g. for Forward) addExistingAttachments(); }
GuiForm GuiForm_createInScrolledWindow (GuiScrolledWindow parent) { autoGuiForm me = Thing_new (GuiForm); my d_shell = parent -> d_shell; my d_parent = parent; #if gtk my d_widget = gtk_fixed_new (); gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (parent -> d_widget), GTK_WIDGET (my d_widget)); #elif cocoa #elif motif //my d_widget = XmCreateRowColumn (parent -> d_widget, "menu", nullptr, 0); my d_widget = XmCreateForm (parent -> d_widget, "menu", nullptr, 0); #endif GuiThing_show (me.get()); #if gtk g_signal_connect (G_OBJECT (my d_widget), "destroy", G_CALLBACK (_guiGtkForm_destroyCallback), me.get()); #elif cocoa #elif motif XtAddCallback (my d_widget, XmNdestroyCallback, _guiMotifForm_destroyCallback, me.get()); #endif return me.releaseToAmbiguousOwner(); }
static int AdjustStyle (int argc, char **argv, Coord x, Coord y) { if (!mainwind) return 1; if (style_dialog == 0) { int i; unit = Settings.grid_unit; ustr = XmStringCreateLocalized ((char *)unit->suffix); n = 0; stdarg (XmNautoUnmanage, False); stdarg (XmNtitle, "Route Styles"); style_dialog = XmCreateFormDialog (mainwind, "style", args, n); n = 0; stdarg (XmNtopAttachment, XmATTACH_FORM); stdarg (XmNleftAttachment, XmATTACH_FORM); stdarg (XmNrightAttachment, XmATTACH_FORM); value_form = XmCreateForm (style_dialog, "values", args, n); XtManageChild (value_form); n = 0; stdarg (XmNtopAttachment, XmATTACH_FORM); stdarg (XmNrightAttachment, XmATTACH_FORM); stdarg (XmNbottomAttachment, XmATTACH_FORM); stdarg (XmNfractionBase, 4); stdarg (XmNresizePolicy, XmRESIZE_GROW); units_form = XmCreateForm (value_form, "units", args, n); XtManageChild (units_form); n = 0; stdarg (XmNtopAttachment, XmATTACH_FORM); stdarg (XmNbottomAttachment, XmATTACH_FORM); stdarg (XmNleftAttachment, XmATTACH_FORM); stdarg (XmNfractionBase, 4); value_labels = XmCreateForm (value_form, "values", args, n); XtManageChild (value_labels); n = 0; stdarg (XmNtopAttachment, XmATTACH_FORM); stdarg (XmNbottomAttachment, XmATTACH_FORM); stdarg (XmNrightAttachment, XmATTACH_WIDGET); stdarg (XmNrightWidget, units_form); stdarg (XmNleftAttachment, XmATTACH_WIDGET); stdarg (XmNleftWidget, value_labels); stdarg (XmNfractionBase, 4); value_texts = XmCreateForm (value_form, "values", args, n); XtManageChild (value_texts); for (i = 0; i < SSNUM; i++) { style_values[i] = style_value (i); name_hashes[i] = hash (PCB->RouteStyle[i].Name); } for (i = 0; i < NUM_STYLES; i++) style_pb[i] = style_button (i); update_values (); update_style_buttons (); } XtManageChild (style_dialog); return 0; }
void main(unsigned int argc, char **argv) { Arg args[MAX_ARGS]; Cardinal n; XmFontList fontlist; manager_needed = BULLETINBOARD; CommonTestInit(argc, argv); if (UserData != NULL) ProcessCommandArgs(); fontlist = CommonGetFontList("9x15"); n = 0; if (manager_needed == BULLETINBOARD) Manager1 = XmCreateBulletinBoard(Shell1, "Manager1", args, n); else if (manager_needed == FORM) Manager1 = XmCreateForm(Shell1, "Manager1", args, n); else if (manager_needed == PANEDWINDOW) Manager1 = XmCreatePanedWindow(Shell1, "Manager1", args, n); else if (manager_needed == ROWCOLUMN) { XtSetArg(args[n], XmNcolumns, 1); n++; XtSetArg(args[n], XmNpacking, XmPACK_COLUMN); n++; Manager1 = XmCreateRowColumn(Shell1, "Manager1", args, n); } XtManageChild(Manager1); n = 0; XtSetArg(args[n], XmNindicatorOn, True); n++; XtSetArg(args[n], XmNfontList, fontlist); n++; if (manager_needed == FORM) { XtSetArg(args[n], XmNtopAttachment, XmATTACH_FORM); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); n++; } ToggleButton1 = XmCreateToggleButton(Manager1, "ToggleButton1", args, n); XtManageChild(ToggleButton1); n = 0; XtSetArg(args[n], XmNindicatorType, XmONE_OF_MANY); n++; XtSetArg(args[n], XmNspacing, 10); n++; XtSetArg(args[n], XmNfillOnSelect, False); n++; if (manager_needed == FORM) { XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); n++; XtSetArg(args[n], XmNtopWidget, ToggleButton1); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); n++; } if (manager_needed == BULLETINBOARD) { XtSetArg(args[n], XmNy, 50); n++; } ToggleButton2 = XmCreateToggleButton(Manager1, "ToggleButton2", args, n); XtManageChild(ToggleButton2); n = 0; XtSetArg(args[n], XmNvisibleWhenOff, False); n++; if (manager_needed == FORM) { XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); n++; XtSetArg(args[n], XmNtopWidget, ToggleButton2); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); n++; } if (manager_needed == BULLETINBOARD) { XtSetArg(args[n], XmNy, 100); n++; } ToggleButton3 = XmCreateToggleButton(Manager1, "ToggleButton3", args, n); XtManageChild(ToggleButton3); n = 0; XtSetArg(args[n], XmNset, True); n++; XtSetArg(args[n], XmNfillOnSelect, True); n++; if (manager_needed == FORM) { XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); n++; XtSetArg(args[n], XmNtopWidget, ToggleButton3); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); n++; } if (manager_needed == BULLETINBOARD) { XtSetArg(args[n], XmNy, 150); n++; } ToggleButton4 = XmCreateToggleButton(Manager1, "ToggleButton4", args, n); XtManageChild(ToggleButton4); px_unselect = XCreatePixmapFromBitmapData(display, DefaultRootWindow(display), XBMu_BITS, XBMu_WIDTH,XBMu_HEIGHT, WhitePixel(display,DefaultScreen(display)), BlackPixel(display,DefaultScreen(display)), DefaultDepth(display,DefaultScreen(display))); px_select = XCreatePixmapFromBitmapData(display, DefaultRootWindow(display), XBMs_BITS, XBMs_WIDTH,XBMs_HEIGHT, WhitePixel(display,DefaultScreen(display)), BlackPixel(display,DefaultScreen(display)), DefaultDepth(display,DefaultScreen(display))); n = 0; XtSetArg(args[n], XmNlabelType, XmPIXMAP); n++; XtSetArg(args[n], XmNselectPixmap, px_select); n++; XtSetArg(args[n], XmNlabelPixmap, px_unselect); n++; XtSetArg(args[n], XmNindicatorOn, False); n++; if (manager_needed == FORM) { XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); n++; XtSetArg(args[n], XmNtopWidget, ToggleButton4); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); n++; } if (manager_needed == BULLETINBOARD) { XtSetArg(args[n], XmNy, 200); n++; } ToggleButton5 = XmCreateToggleButton(Manager1, "ToggleButton5", args, n); XtManageChild(ToggleButton5); n = 0; XtSetArg(args[n], XmNindicatorOn, False); n++; XtSetArg(args[n], XmNshadowThickness, 4); n++; if (manager_needed == FORM) { XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); n++; XtSetArg(args[n], XmNtopWidget, ToggleButton5); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); n++; XtSetArg(args[n], XmNbottomAttachment, XmATTACH_FORM); n++; } if (manager_needed == BULLETINBOARD) { XtSetArg(args[n], XmNy, 300); n++; } ToggleButton6 = XmCreateToggleButton(Manager1, "ToggleButton6", args, n); XtManageChild(ToggleButton6); XtRealizeWidget(Shell1); for (n = 0; n < 5; n++) CommonPause(); XmToggleButtonSetState(ToggleButton5, TRUE, FALSE); CommonPause(); XmToggleButtonSetState(ToggleButton5, FALSE, FALSE); CommonPause(); n = 0; XtSetArg (args[n], XmNbackgroundPixmap, px_select); n++; XtSetValues (ToggleButton5, args, n); CommonPause(); n = 0; XtSetArg (args[n], XmNbackgroundPixmap, XmUNSPECIFIED_PIXMAP); n++; XtSetValues (ToggleButton5, args, n); CommonPause(); /* Begin PIR3850 */ n = 0; XtSetArg (args[n], XmNbackgroundPixmap, None); n++; XtSetValues (Manager1, args, n); CommonPause(); /* End PIR3850 */ XtDestroyWidget(Manager1); CommonPause(); XtAppMainLoop(app_context); }
void main (int argc, char **argv) { Arg args[10]; int n,i; char buf[16]; Widget Parent; Widget Notebook; Widget Frame1,Form1,PW1,RC1,BB1,PB1; Widget MajorTab[3]; Widget MinorTab[3]; Widget StatusArea[6]; Widget FrameKid1; Widget FormKid[4]; Widget RCKid[4]; Widget BBKid[4]; Widget PWKid[4]; CommonTestInit (argc, argv); /* * Create the parent. */ n=0; Parent = XmCreateFrame (Shell1, "Parent", args, n); XtManageChild (Parent); n=0; Notebook = XmCreateNotebook (Parent, "Notebook", args, n); XtManageChild (Notebook); for (i=0; i< 3; i++) { n=0; sprintf (buf, "MajorTab%d", i+1); MajorTab[i] = XmCreatePushButton (Notebook,buf,args,n); XtManageChild(MajorTab[i]); } for (i=0; i< 3; i++) { sprintf (buf, "MinorTab%d", i+1); MinorTab[i] = XmCreatePushButton (Notebook,buf,args,n); XtManageChild(MinorTab[i]); } for (i=0; i< 7; i++) { n=0; sprintf (buf,"StatusArea%d", i+1); StatusArea[i] = XmCreateText (Notebook, buf, args,n); XtManageChild(StatusArea[i]); } /* * Create Pages of Notebook */ n=0; Frame1 = XmCreateFrame (Notebook, "Frame1", args, n); XtManageChild (Frame1); n=0; Form1 = XmCreateForm (Notebook, "Form1", args, n); XtManageChild (Form1); n=0; RC1 = XmCreateRowColumn (Notebook, "RC1", args, n); XtManageChild (RC1); n=0; PW1 = XmCreatePanedWindow (Notebook, "PW1", args, n); XtManageChild (PW1); n=0; BB1 = XmCreateBulletinBoard (Notebook, "BB1", args, n); XtManageChild (BB1); n=0; PB1 = XmCreatePushButton (Notebook, "PB1", args, n); XtManageChild (PB1); n=0; NB1 = XmCreateNotebook (Notebook, "NB1", args, n); XtManageChild (NB1); /* * Create kids of pages */ n=0; FrameKid1 = XmCreatePushButton (Frame1,"FrameKid1",args,n); XtManageChild (FrameKid1); for (i=0; i < 4; i++) { n=0; sprintf (buf, "FormKid%d", i+1); FormKid[i] = XmCreatePushButton (Form1,buf,args,n); XtManageChild (FormKid[i]); } for (i=0; i < 4; i++) { n=0; sprintf (buf, "RCKid%d", i+1); RCKid[i] = XmCreatePushButton (RC1,buf,args,n); XtManageChild (RCKid[i]); } for (i=0; i < 4; i++) { n=0; sprintf (buf, "PWKid%d", i+1); PWKid[i] = XmCreatePushButton (PW1,buf,args,n); XtManageChild (PWKid[i]); } for (i=0; i < 4; i++) { n=0; sprintf (buf, "BBKid%d", i+1); BBKid[i] = XmCreatePushButton (BB1,buf,args,n); XtManageChild (BBKid[i]); } n=0; NBKid1 = XmCreateMessageBox (NB1, "NBKid1", args, n); XtManageChild (NBKid1); XtRealizeWidget (Shell1); CommonPause(); CommonPause(); CommonPause(); CommonPause(); XtDestroyWidget (Notebook); CommonPause(); /* * destroy the widget */ CommonPause(); XtAppMainLoop (app_context); }
int main(int argc, char **argv) { Widget toplevel, one, form, Connect, Connect1; Widget Host, Host1; XtAppContext app; XtSetLanguageProc(NULL, NULL, NULL); toplevel = XtVaAppInitialize(&app, "Label", NULL, 0, &argc, argv, Fallback, NULL); StrokeInitialize(toplevel); XltSoundInitialize(toplevel); Host = XltCreateHost(toplevel, "Host", NULL, 0); XtVaSetValues(Host, NULL); Host1 = XltCreateHost(toplevel, "Host1", NULL, 0); form = XmCreateForm(toplevel, "Form", NULL, 0); Connect = XltCreateBubbleButton(form, "Connect", NULL, 0); Connect1 = XltCreateBubbleButton(form, "Connect1", NULL, 0); one = XltHostCreateTranscript(form, Host, NULL, 0); XtVaSetValues(XtParent(one), XmNtopAttachment, XmATTACH_WIDGET, XmNtopWidget, Connect, XmNbottomAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_FORM, XmNrightAttachment, XmATTACH_FORM, NULL); XtVaSetValues(Connect, XmNtopAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_FORM, NULL); XtVaSetValues(Connect1, XmNtopAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_WIDGET, XmNleftWidget, Connect, NULL); XtManageChild(one); XtManageChild(Connect); XtManageChild(Connect1); XtManageChild(form); XtAddCallback(Host, XltNconnectCallback, (XtCallbackProc)Callback, NULL); XtAddCallback(Host, XltNasciiInputCallback, (XtCallbackProc)AsciiInputCallback, one); XtAddCallback(Host, XltNbinaryInputCallback, (XtCallbackProc)BinaryInputCallback, NULL); XtAddCallback(Host, XltNinputCallback, (XtCallbackProc)InputCallback, NULL); XtAddCallback(Connect, XmNactivateCallback, (XtCallbackProc)XltHostSelect, Host); XtAddCallback(Connect1, XmNactivateCallback, (XtCallbackProc)XltHostSelect, Host1); XtRealizeWidget(toplevel); { String port; XtVaGetValues(Host, XltNport, &port, NULL); printf("PORT >%s<\n",port); } XtAppMainLoop(app); exit(0); }
int main(int argc, char **argv) { XtAppContext theApp; Widget toplevel, drawingArea, button, other_button, form; toplevel = XtVaAppInitialize(&theApp, "drawingArea", NULL, 0, &argc, argv, NULL, NULL); form = XmCreateForm(toplevel, "form", NULL, 0); button = XmCreatePushButton(form, "button", NULL, 0); XtVaSetValues(button, XmNtopAttachment, XmATTACH_FORM, XmNleftAttachment, XmATTACH_FORM, NULL); XtManageChild(button); drawingArea= XtVaCreateManagedWidget("drawingArea", xmDrawingAreaWidgetClass, form, XmNtopAttachment, XmATTACH_WIDGET, XmNtopWidget, button, NULL); XtAddCallback(drawingArea, XmNinputCallback, (XtCallbackProc) InputCallback, NULL); button = XtVaCreateManagedWidget("button", xmPushButtonWidgetClass, drawingArea, XmNtraversalOn, False, NULL); other_button = XtVaCreateManagedWidget("button2", xmPushButtonWidgetClass, drawingArea, XmNx, 100, XmNy, 100, XmNtraversalOn, False, NULL); XtManageChild(form); XtRealizeWidget(toplevel); { static XtWidgetGeometry Expected[] = { CWWidth | CWHeight , 0, 0, 164, 160, 0,0,0, /* form */ CWWidth | CWHeight | CWX | CWY, 0, 0, 48, 25, 0,0,0, /* button */ CWWidth | CWHeight | CWX | CWY, 0, 25, 164, 135, 0,0,0, /* drawingArea */ CWWidth | CWHeight | CWX | CWY, 10, 10, 48, 25, 0,0,0, /* button */ CWWidth | CWHeight | CWX | CWY, 100, 100, 54, 25, 0,0,0, /* button2 */ }; /* toplevel should be replaced with to correct applicationShell */ PrintDetails(toplevel, Expected); } LessTifTestMainLoop(toplevel); exit(0); }
void scrnInitX(void) { Widget toplevel, control; Widget mb, fileMenu, viewMenu, confMenu, helpMenu; Widget procFrame = NULL, bboxFrame = NULL; #ifdef ICON_DEFINED Pixmap icon; #endif XmString s; Arg args[10]; unsigned i, n; int argc = 0; addRegwRsrcOpts(); addDatwRsrcOpts(); toplevel = XtAppInitialize(&app_context, "XSki", options, topopts, &argc, NULL, NULL, NULL, 0); top_level = toplevel; /* XXX - temporary for Platform only */ XtGetApplicationResources(toplevel, &app_data, resources, toprsrc, NULL, 0); XtAppAddActions(app_context, actions, XtNumber(actions)); dpy = XtDisplay(toplevel); #ifdef ICON_DEFINED /* set default icon */ icon = XCreateBitmapFromData(dpy, RootWindowOfScreen(XtScreen(toplevel)), icon_bits, icon_width, icon_height); XtSetArg(args[0], XmNiconPixmap, icon); XtSetValues(toplevel, args, 1); #endif #if 0 XSynchronize(dpy, True); #endif /* create control window manager */ control = XmCreateForm(toplevel, "control", NULL, 0); XtManageChild(control); /* Control window menubar */ n = 0; XtSetArg(args[n], XmNtopAttachment, XmATTACH_FORM); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); n++; mb = XmCreateMenuBar(control, "mb", args, n); XtManageChild(mb); fileMenu = createMBitem(mb, "File"); viewMenu = createMBitem(mb, "View"); confMenu = createMBitem(mb, "Configure"); helpMenu = createMBitem(mb, "Help"); #if 0 createSubmenuItem(fileMenu, "load", loadCallback); #else createSubmenuItem(fileMenu, "load", 0); #endif createSubmenuItem(fileMenu, "save", 0); createSubmenuItem(fileMenu, "trace", 0); createSubmenuItem(fileMenu, "traceOn", 0); createSubmenuItem(fileMenu, "traceOff", 0); createSubmenuItem(fileMenu, "read", 0); XtManageChild(XmCreateSeparatorGadget(fileMenu, "", NULL, 0)); createSubmenuItem(fileMenu, "quit", simCmdCallback); createSubmenuItem(viewMenu, "program", programCallback); createSubmenuItem(viewMenu, "data", dataCallback); createSubmenuItem(viewMenu, "registers", regCallback); createSubmenuItem(viewMenu, "cache", 0); createSubmenuItem(viewMenu, "tlb", sdtCallback); XtManageChild(XmCreateSeparatorGadget(viewMenu, "", NULL, 0)); createSubmenuItem(viewMenu, "callstack", cstCallback); createSubmenuItem(viewMenu, "statistics", 0); createSubmenuItem(viewMenu, "breakpoints", blistCallback); createSubmenuItem(viewMenu, "branches", 0); createSubmenuItem(viewMenu, "symbols", symlistCallback); createSubmenuItem(viewMenu, "macros", 0); #if 0 /* No support for window format yet */ createSubmenuItem(confMenu, "program", prgFmtCallback); #else createSubmenuItem(confMenu, "program", 0); #endif createSubmenuItem(confMenu, "data", 0); #if 0 /* No support for window format yet */ createSubmenuItem(confMenu, "registers", regFmtCallback); #else createSubmenuItem(confMenu, "registers", 0); #endif createSubmenuItem(helpMenu, "context", 0); createSubmenuItem(helpMenu, "overview", 0); createSubmenuItem(helpMenu, "commands", cmdHelpCallback); createSubmenuItem(helpMenu, "product", prodInfoCallback); /* Control window processor option menu */ if (nproc > 1) { Widget procMenu, proc[NPROC]; n = 0; XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); n++; XtSetArg(args[n], XmNtopWidget, mb); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); n++; procFrame = XmCreateFrame(control, "", args, n); XtManageChild(procFrame); procMenu = XmCreatePulldownMenu(procFrame, "", NULL, 0); for (i = 0; i < nproc; i++) { char name[4]; (void)sprintf(name, "p%d", i); proc[i] = XmCreatePushButton(procMenu, name, NULL, 0); XtAddCallback(proc[i], XmNactivateCallback, changeCprocCallback, (XtPointer)i); } XtManageChildren(proc, nproc); n = 0; XtSetArg(args[n], XmNsubMenuId, procMenu); n++; XtManageChild(XmCreateOptionMenu(procFrame, "procOption", args, n)); } /* Control window button box */ if (app_data.numButtons) { Widget bbox, btns[20]; /* create button box manager */ n = 0; XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); n++; XtSetArg(args[n], XmNtopWidget, procFrame ? procFrame : mb); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); n++; bboxFrame = XmCreateFrame(control, "", args, n); XtManageChild(bboxFrame); /* create button box window */ bbox = XmCreateRowColumn(bboxFrame, "bbox", NULL, 0); XtManageChild(bbox); /* create each button */ for (i = 0; i < app_data.numButtons; i++) { char name[8]; (void)sprintf(name, "bb%d", i); btns[i] = XmCreatePushButton(bbox, name, NULL, 0); } XtManageChildren(btns, app_data.numButtons); } /* Control window command area */ n = 0; XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); n++; XtSetArg(args[n], XmNtopWidget, bboxFrame ? bboxFrame : procFrame ? procFrame : mb); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); n++; cmd = XmCreateCommand(control, "cmd", args, n); XtManageChild(cmd); XtAddCallback(cmd, XmNcommandEnteredCallback, simCmdCallback, 0); /* command history box */ n = 0; XtSetArg(args[0], XmNinitialFocus, cmd); n++; XtSetValues(control, args, n); cmdHist = XmCommandGetChild(cmd, XmDIALOG_HISTORY_LIST); /* message window */ msgs = XmCreateScrolledText(control, "msgs", NULL, 0); XtManageChild(msgs); n = 0; XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); n++; XtSetArg(args[n], XmNtopWidget, cmd); n++; XtSetArg(args[n], XmNbottomAttachment, XmATTACH_FORM); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_FORM); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); n++; XtSetValues(XtParent(msgs), args, n); /* create stop simulation dialog */ /* Consider changing this to a button. This would allow other functionality to still be active when simulation is going on. For example, Help, Quit, opening and closing windows, etc. */ stopsim = XmCreateWorkingDialog(control, "stopsim", NULL, 0); n = 0; XtSetArg(args[n], XmNdialogStyle, XmDIALOG_FULL_APPLICATION_MODAL); n++; s = XmStringCreateLocalized("Running..."); XtSetArg(args[n], XmNdialogTitle, s); n++; s = XmStringCreateLocalized(" icnt: 0 "); XtSetArg(args[n], XmNmessageString, s); n++; s = XmStringCreateLocalized("Stop"); XtSetArg(args[n], XmNcancelLabelString, s); n++; XtSetValues(stopsim, args, n); XtAddCallback(stopsim, XmNcancelCallback, stop_execLoopXCB, NULL); XtUnmanageChild(XmMessageBoxGetChild(stopsim, XmDIALOG_OK_BUTTON)); XtUnmanageChild(XmMessageBoxGetChild(stopsim, XmDIALOG_HELP_BUTTON)); XmStringFree(s); /* XXX - This should probably be inside regwInit */ for (i = 0; i < topregw; i++) regwtbl[i].show = app_data.showRs[i]; /* XXX - This should probably be inside datwInit */ for (i = 0; i < topdatw; i++) datwtbl[i].show = app_data.viewDw[i]; prgwInit(); datwInit(); regwInit(); if (app_data.viewProg) prgwDrawX(); datwDrawX(); if (app_data.viewRegs) regwDrawX(); noscreen = NO; XtRealizeWidget(toplevel); }
/*+++++++++++++++++++++++++++++++++++++++*/ static Widget build_dtwmDlg( Widget shell ) { register int i, n; Arg args[MAX_ARGS]; XmString button_string[NUM_LABELS]; XmString string; Widget form; Widget windowFocusForm; Widget iconPlacementForm; int count = 0; Widget widgetList1[6]; /* get dtwm resource values */ /* Set up DialogBoxDialog button labels */ button_string[0] = CMPSTR((String) _DtOkString); button_string[1] = CMPSTR((String) _DtCancelString); button_string[2] = CMPSTR((String) _DtHelpString); /* Create toplevel DialogBox */ /* saveRestore * Note that save.poscnt has been initialized elsewhere. * save.posArgs may contain information from restoreBeep().*/ XtSetArg(save.posArgs[save.poscnt], XmNbuttonCount, NUM_LABELS); save.poscnt++; XtSetArg(save.posArgs[save.poscnt], XmNbuttonLabelStrings, button_string); save.poscnt++; XtSetArg(save.posArgs[save.poscnt], XmNdefaultPosition, False); save.poscnt++; style.dtwmDialog = __DtCreateDialogBoxDialog(shell, "dtwmDialog", save.posArgs, save.poscnt); XtAddCallback(style.dtwmDialog, XmNhelpCallback, (XtCallbackProc)HelpRequestCB, (XtPointer)HELP_DTWM_DIALOG); XmStringFree(button_string[0]); XmStringFree(button_string[1]); XmStringFree(button_string[2]); widgetList1[0] = _DtDialogBoxGetButton(style.dtwmDialog,2); n=0; XtSetArg(args[n], XmNautoUnmanage, False); n++; XtSetArg(args[n], XmNcancelButton, widgetList1[0]); n++; XtSetValues (style.dtwmDialog, args, n); n=0; XtSetArg(args[n], XmNtitle, ((char *)GETMESSAGE(18, 1, "Style Manager - Window"))); n++; XtSetArg (args[n], XmNuseAsyncGeometry, True); n++; XtSetArg(args[n], XmNmwmFunctions, DIALOG_MWM_FUNC); n++; XtSetValues (XtParent(style.dtwmDialog), args, n); n = 0; XtSetArg(args[n], XmNallowOverlap, False); n++; XtSetArg(args[n], XmNchildType, XmWORK_AREA); n++; form = XmCreateForm(style.dtwmDialog, "dtwmForm", args, n); n = 0; XtSetArg(args[n], XmNfillMode, XmFILL_SELF); n++; XtSetArg(args[n], XmNbehavior, XmICON_LABEL); n++; XtSetArg(args[n], XmNpixmapForeground, style.secBSCol); n++; XtSetArg(args[n], XmNpixmapBackground, style.secTSCol); n++; XtSetArg(args[n], XmNstring, NULL); n++; XtSetArg(args[n], XmNshadowThickness, 0); n++; XtSetArg(args[n], XmNimageName, DTWM_ICON); n++; XtSetArg(args[n], XmNtraversalOn, False); n++; widgetList1[count++] = dtwm.pictLabel = _DtCreateIcon(form, "dtwmpictLabel", args, n); n = 0; XtSetArg(args[n], XmNmarginHeight, LB_MARGIN_HEIGHT); n++; XtSetArg(args[n], XmNmarginWidth, LB_MARGIN_WIDTH); n++; string = CMPSTR(((char *)GETMESSAGE(18, 2, "Default"))); XtSetArg(args[n], XmNlabelString, string); n++; widgetList1[count++] = dtwm.systemDefault = XmCreatePushButtonGadget(form, "systemDefault", args, n); XmStringFree(string); n = 0; string = CMPSTR((char *)GETMESSAGE(18, 3, "Window Behavior")); XtSetArg(args[n], XmNtitleString, string); n++; widgetList1[count++] = dtwm.windowFocusTB = _DtCreateTitleBox(form, "windowFocusTB", args, n); XmStringFree(string); n = 0; XtSetArg(args[n], XmNallowOverlap, False); n++; XtSetArg(args[n], XmNchildType, XmWORK_AREA); n++; windowFocusForm = XmCreateForm(dtwm.windowFocusTB, "windowFocusForm", args, n); n = 0; string = CMPSTR((char *)GETMESSAGE(18, 4, "Window Icons")); XtSetArg(args[n], XmNtitleString, string); n++; widgetList1[count++] = dtwm.iconPlacementTB = _DtCreateTitleBox(form, "iconPlacementTB", args, n); XmStringFree(string); n = 0; XtSetArg(args[n], XmNallowOverlap, False); n++; XtSetArg(args[n], XmNchildType, XmWORK_AREA); n++; iconPlacementForm = XmCreateForm(dtwm.iconPlacementTB, "iconPlacementForm", args, n); n = 0; XtSetArg(args[n], XmNmarginWidth, 0); n++; XtSetArg(args[n], XmNmarginHeight, 0); n++; dtwm.focusPolicyRC = XmCreateRadioBox(windowFocusForm, "focusPolicyRC", args, n); n = 0; string = CMPSTR((char *)GETMESSAGE(18, 13, "Point In Window To Make Active")); XtSetArg(args[n], XmNlabelString, string); n++; dtwm.pointerTG = XmCreateToggleButtonGadget(dtwm.focusPolicyRC, "pointerTG", args, n); XmStringFree(string); n = 0; string = CMPSTR((char *)GETMESSAGE(18, 14, "Click In Window To Make Active")); XtSetArg(args[n], XmNlabelString, string); n++; dtwm.explicitTG = XmCreateToggleButtonGadget(dtwm.focusPolicyRC, "explicitTG", args, n); XmStringFree(string); n = 0; XtSetArg(args[n], XmNmargin, 0); n++; dtwm.focusSeparator = XmCreateSeparatorGadget(windowFocusForm, "focusSeparator", args, n); n = 0; string = CMPSTR((char *)GETMESSAGE(18, 15, "Raise Window When Made Active")); XtSetArg(args[n], XmNnavigationType, XmTAB_GROUP); n++; XtSetArg(args[n], XmNlabelString, string); n++; XtSetArg(args[n], XmNalignment, XmALIGNMENT_BEGINNING); n++; dtwm.autoRaiseTG = XmCreateToggleButtonGadget(windowFocusForm, "autoRaiseTG", args, n); XmStringFree(string); n = 0; string = CMPSTR((char *)GETMESSAGE(18, 11, "Allow Primary Windows On Top")); XtSetArg(args[n], XmNnavigationType, XmTAB_GROUP); n++; XtSetArg(args[n], XmNlabelString, string); n++; XtSetArg(args[n], XmNalignment, XmALIGNMENT_BEGINNING); n++; dtwm.secStackTG = XmCreateToggleButtonGadget(windowFocusForm, "secStackTG", args, n); XmStringFree(string); n = 0; string = CMPSTR((char *)GETMESSAGE(18, 16, "Show Contents During Move")); XtSetArg(args[n], XmNnavigationType, XmTAB_GROUP); n++; XtSetArg(args[n], XmNlabelString, string); n++; XtSetArg(args[n], XmNalignment, XmALIGNMENT_BEGINNING); n++; dtwm.moveOpaqueTG = XmCreateToggleButtonGadget(windowFocusForm, "moveOpaqueTG", args, n); XmStringFree(string); n = 0; XtSetArg(args[n], XmNmarginWidth, 0); n++; XtSetArg(args[n], XmNmarginHeight, 0); n++; dtwm.useIconBoxRC = XmCreateRadioBox(iconPlacementForm, "useIconBoxRC", args, n); n = 0; string = CMPSTR((char *)GETMESSAGE(18, 9, "Use Icon Box")); XtSetArg(args[n], XmNlabelString, string); n++; dtwm.iconBoxTG = XmCreateToggleButtonGadget(dtwm.useIconBoxRC, "iconBoxTG", args, n); XmStringFree(string); n = 0; string = CMPSTR((char *)GETMESSAGE(18, 10, "Place On Workspace")); XtSetArg(args[n], XmNlabelString, string); n++; dtwm.desktopTG = XmCreateToggleButtonGadget(dtwm.useIconBoxRC, "desktopTG", args, n); XmStringFree(string); XtAddCallback(style.dtwmDialog, XmNmapCallback, formLayoutCB, NULL); XtAddCallback(style.dtwmDialog, XmNmapCallback, _DtmapCB_dtwmDlg, shell); XtAddCallback(style.dtwmDialog, XmNcallback, ButtonCB, NULL); XtAddCallback(dtwm.systemDefault, XmNactivateCallback, systemDefaultCB, NULL); XtManageChild(form); XtManageChildren(widgetList1,count); XtManageChild(windowFocusForm); XtManageChild(iconPlacementForm); XtManageChild(dtwm.focusPolicyRC); XtManageChild(dtwm.pointerTG); XtManageChild(dtwm.explicitTG); XtManageChild(dtwm.focusSeparator); XtManageChild(dtwm.autoRaiseTG); XtManageChild(dtwm.secStackTG); XtManageChild(dtwm.moveOpaqueTG); XtManageChild(dtwm.useIconBoxRC); XtManageChild(dtwm.iconBoxTG); XtManageChild(dtwm.desktopTG); return(style.dtwmDialog); }
void create_emfpr_dr_shell (Widget parent) { Widget children[6]; /* Children to manage */ Arg al[64]; /* Arg List */ register int ac = 0; /* Arg Count */ XtSetArg(al[ac], XmNallowShellResize, TRUE); ac++; XtSetArg(al[ac], XmNminWidth, 492); ac++; XtSetArg(al[ac], XmNminHeight, 182); ac++; XtSetArg(al[ac], XmNmaxWidth, 492); ac++; XtSetArg(al[ac], XmNmaxHeight, 182); ac++; emfpr_dr_shell = XmCreateDialogShell ( parent, "emfpr_dr_shell", al, ac ); ac = 0; XtSetArg(al[ac], XmNautoUnmanage, FALSE); ac++; emfpr_dr_main_form = XmCreateForm ( emfpr_dr_shell, "emfpr_dr_main_form", al, ac ); ac = 0; XtSetArg(al[ac], XmNshadowThickness, 2); ac++; XtSetArg(al[ac], XmNshadowType, XmSHADOW_IN); ac++; emfpr_dr_inner_form = XmCreateForm ( emfpr_dr_main_form, "emfpr_dr_inner_form", al, ac ); ac = 0; emfpr_dr_resume_lbl = XmCreateLabel ( emfpr_dr_inner_form, "emfpr_dr_resume_lbl", al, ac ); emfpr_dr_product_lbl = XmCreateLabel ( emfpr_dr_inner_form, "emfpr_dr_product_lbl", al, ac ); XtSetArg(al[ac], XmNmaxLength, 80); ac++; XtSetArg(al[ac], XmNcolumns, 40); ac++; emfpr_dr_product_txt = XmCreateText ( emfpr_dr_inner_form, "emfpr_dr_product_txt", al, ac ); ac = 0; emfpr_dr_disc_reason_lbl = XmCreateLabel ( emfpr_dr_inner_form, "emfpr_dr_disc_reason_lbl", al, ac ); XtSetArg(al[ac], XmNmaxLength, 80); ac++; XtSetArg(al[ac], XmNcolumns, 40); ac++; emfpr_dr_disc_reason_txt = XmCreateText ( emfpr_dr_inner_form, "emfpr_dr_disc_reason_txt", al, ac ); ac = 0; XtSetArg(al[ac], XmNseparatorType, XmNO_LINE); ac++; emfpr_dr_sep1 = XmCreateSeparator ( emfpr_dr_inner_form, "emfpr_dr_sep1", al, ac ); ac = 0; emfpr_dr_btn_form = XmCreateForm ( emfpr_dr_main_form, "emfpr_dr_btn_form", al, ac ); XtSetArg(al[ac], XmNorientation, XmHORIZONTAL); ac++; XtSetArg(al[ac], XmNpacking, XmPACK_COLUMN); ac++; XtSetArg(al[ac], XmNentryAlignment, XmALIGNMENT_CENTER); ac++; emfpr_dr_btn_rc = XmCreateRowColumn ( emfpr_dr_btn_form, "emfpr_dr_btn_rc", al, ac ); ac = 0; emfpr_dr_resume_btn = XmCreatePushButton ( emfpr_dr_btn_rc, "emfpr_dr_resume_btn", al, ac ); emfpr_dr_close_btn = XmCreatePushButton ( emfpr_dr_btn_rc, "emfpr_dr_close_btn", al, ac ); emfpr_dr_help_btn = XmCreatePushButton ( emfpr_dr_btn_rc, "emfpr_dr_help_btn", al, ac ); XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++; XtSetArg(al[ac], XmNtopOffset, 10); ac++; XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_WIDGET); ac++; XtSetArg(al[ac], XmNbottomOffset, 10); ac++; XtSetArg(al[ac], XmNbottomWidget, emfpr_dr_btn_form); ac++; XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++; XtSetArg(al[ac], XmNleftOffset, 10); ac++; XtSetArg(al[ac], XmNrightAttachment, XmATTACH_FORM); ac++; XtSetArg(al[ac], XmNrightOffset, 10); ac++; XtSetValues ( emfpr_dr_inner_form,al, ac ); ac = 0; XtSetArg(al[ac], XmNtopAttachment, XmATTACH_NONE); ac++; XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_FORM); ac++; XtSetArg(al[ac], XmNbottomOffset, 10); ac++; XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++; XtSetArg(al[ac], XmNleftOffset, 100); ac++; XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++; XtSetValues ( emfpr_dr_btn_form,al, ac ); ac = 0; XtAddCallback (emfpr_dr_main_form,XmNhelpCallback, XDhelp_link, (XtPointer) &_xd_help_pairs[0] ); XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++; XtSetArg(al[ac], XmNtopOffset, 10); ac++; XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++; XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++; XtSetArg(al[ac], XmNleftOffset, 10); ac++; XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++; XtSetValues ( emfpr_dr_resume_lbl,al, ac ); ac = 0; XtSetArg(al[ac], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; XtSetArg(al[ac], XmNtopOffset, 0); ac++; XtSetArg(al[ac], XmNtopWidget, emfpr_dr_product_txt); ac++; XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; XtSetArg(al[ac], XmNbottomOffset, 0); ac++; XtSetArg(al[ac], XmNbottomWidget, emfpr_dr_product_txt); ac++; XtSetArg(al[ac], XmNleftAttachment, XmATTACH_NONE); ac++; XtSetArg(al[ac], XmNrightAttachment, XmATTACH_WIDGET); ac++; XtSetArg(al[ac], XmNrightOffset, 5); ac++; XtSetArg(al[ac], XmNrightWidget, emfpr_dr_product_txt); ac++; XtSetValues ( emfpr_dr_product_lbl,al, ac ); ac = 0; XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++; XtSetArg(al[ac], XmNtopOffset, 10); ac++; XtSetArg(al[ac], XmNtopWidget, emfpr_dr_resume_lbl); ac++; XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++; XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++; XtSetArg(al[ac], XmNleftOffset, 166); ac++; XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++; XtSetValues ( emfpr_dr_product_txt,al, ac ); ac = 0; XtSetArg(al[ac], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; XtSetArg(al[ac], XmNtopOffset, 0); ac++; XtSetArg(al[ac], XmNtopWidget, emfpr_dr_disc_reason_txt); ac++; XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; XtSetArg(al[ac], XmNbottomOffset, 0); ac++; XtSetArg(al[ac], XmNbottomWidget, emfpr_dr_disc_reason_txt); ac++; XtSetArg(al[ac], XmNleftAttachment, XmATTACH_NONE); ac++; XtSetArg(al[ac], XmNrightAttachment, XmATTACH_WIDGET); ac++; XtSetArg(al[ac], XmNrightOffset, 5); ac++; XtSetArg(al[ac], XmNrightWidget, emfpr_dr_disc_reason_txt); ac++; XtSetValues ( emfpr_dr_disc_reason_lbl,al, ac ); ac = 0; XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++; XtSetArg(al[ac], XmNtopOffset, 0); ac++; XtSetArg(al[ac], XmNtopWidget, emfpr_dr_product_txt); ac++; XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++; XtSetArg(al[ac], XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET); ac++; XtSetArg(al[ac], XmNleftOffset, 0); ac++; XtSetArg(al[ac], XmNleftWidget, emfpr_dr_product_txt); ac++; XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++; XtSetValues ( emfpr_dr_disc_reason_txt,al, ac ); ac = 0; XtSetArg(al[ac], XmNtopAttachment, XmATTACH_WIDGET); ac++; XtSetArg(al[ac], XmNtopOffset, 10); ac++; XtSetArg(al[ac], XmNtopWidget, emfpr_dr_disc_reason_txt); ac++; XtSetArg(al[ac], XmNbottomAttachment, XmATTACH_NONE); ac++; XtSetArg(al[ac], XmNleftAttachment, XmATTACH_WIDGET); ac++; XtSetArg(al[ac], XmNleftOffset, 10); ac++; XtSetArg(al[ac], XmNleftWidget, emfpr_dr_disc_reason_txt); ac++; XtSetArg(al[ac], XmNrightAttachment, XmATTACH_NONE); ac++; XtSetValues ( emfpr_dr_sep1,al, ac ); ac = 0; children[ac++] = emfpr_dr_resume_lbl; children[ac++] = emfpr_dr_product_lbl; children[ac++] = emfpr_dr_product_txt; children[ac++] = emfpr_dr_disc_reason_lbl; children[ac++] = emfpr_dr_disc_reason_txt; children[ac++] = emfpr_dr_sep1; XtManageChildren(children, ac); ac = 0; XtSetArg(al[ac], XmNtopAttachment, XmATTACH_FORM); ac++; XtSetArg(al[ac], XmNleftAttachment, XmATTACH_FORM); ac++; XtSetValues ( emfpr_dr_btn_rc,al, ac ); ac = 0; XtAddCallback (emfpr_dr_resume_btn, XmNactivateCallback, undo_disc_product_cb,NULL); XtAddCallback (emfpr_dr_close_btn, XmNactivateCallback, emfpr_dr_close_cb,NULL); XtAddCallback (emfpr_dr_help_btn,XmNactivateCallback, XDhelp_link, (XtPointer) &_xd_help_pairs[1] ); children[ac++] = emfpr_dr_resume_btn; children[ac++] = emfpr_dr_close_btn; children[ac++] = emfpr_dr_help_btn; XtManageChildren(children, ac); ac = 0; children[ac++] = emfpr_dr_btn_rc; XtManageChildren(children, ac); ac = 0; children[ac++] = emfpr_dr_inner_form; children[ac++] = emfpr_dr_btn_form; XtManageChildren(children, ac); ac = 0; }
/* * Function: _DtPrintCreateMarginFrame * * Creates a frame for specifying margins. The frame contains four text * fields, one for each _DtPrintMarginEnum. * * parent - specifies the parent of the frame. * * Returns the widget id of the frame. */ Widget _DtPrintCreateMarginFrame( Widget parent ) { DtpoMarginFrame *info; Arg args[16]; int n; XmString xms; info = (DtpoMarginFrame *) XtMalloc( sizeof(DtpoMarginFrame) ); n = 0; XtSetArg(args[n], XmNchildHorizontalAlignment, XmALIGNMENT_BEGINNING); n++; XtSetArg(args[n], XmNchildVerticalAlignment, XmALIGNMENT_CENTER); n++; XtSetArg(args[n], XmNuserData, info); n++; info->frame = XmCreateFrame(parent, "MarginFrame", args, n); XtAddCallback( info->frame, XmNdestroyCallback, _DtPrintDestroyMarginFrameCB, (XtPointer) info ); xms = XmStringCreateLocalized(DTPO_MARGIN_FRAME_LABEL); n = 0; XtSetArg(args[n], XmNchildType, XmFRAME_TITLE_CHILD); n++; XtSetArg(args[n], XmNchildHorizontalAlignment, XmALIGNMENT_BEGINNING); n++; XtSetArg(args[n], XmNchildVerticalAlignment, XmALIGNMENT_CENTER); n++; XtSetArg(args[n], XmNlabelString, xms); n++; info->label = XmCreateLabel(info->frame, "MarginLabel", args, n); XtManageChild(info->label); XmStringFree(xms); n = 0; XtSetArg(args[n], XmNallowOverlap, False); n++; XtSetArg(args[n], XmNfractionBase, 2); n++; info->form = XmCreateForm(info->frame, "MarginForm", args, n); n = 0; XtSetArg(args[n], XmNtopAttachment, XmATTACH_FORM); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_NONE); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_POSITION); n++; XtSetArg(args[n], XmNrightPosition, 1); n++; XtSetArg(args[n], XmNrightOffset, 5); n++; info->top = XmCreateTextField(info->form, "MarginTopText", args, n); XtManageChild(info->top); xms = XmStringCreateLocalized(DTPO_MARGIN_FRAME_TOP_MARGIN_LABEL); n = 0; XtSetArg(args[n], XmNlabelString, xms); n++; XtSetArg(args[n], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); n++; XtSetArg(args[n], XmNtopWidget, info->top); n++; XtSetArg(args[n], XmNtopOffset, 0); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_NONE); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_WIDGET); n++; XtSetArg(args[n], XmNrightWidget, info->top); n++; XtSetArg(args[n], XmNrightOffset, 3); n++; XtSetArg(args[n], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); n++; XtSetArg(args[n], XmNbottomWidget, info->top); n++; XtSetArg(args[n], XmNbottomOffset, 0); n++; info->top_label = XmCreateLabelGadget(info->form, "MarginTopLabel", args, n); XmStringFree(xms); XtManageChild(info->top_label); n = 0; XtSetArg(args[n], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); n++; XtSetArg(args[n], XmNtopWidget, info->top); n++; XtSetArg(args[n], XmNtopOffset, 0); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_NONE); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); n++; info->right = XmCreateTextField(info->form, "MarginRightText", args, n); XtManageChild(info->right); xms = XmStringCreateLocalized(DTPO_MARGIN_FRAME_RIGHT_MARGIN_LABEL); n = 0; XtSetArg(args[n], XmNlabelString, xms); n++; XtSetArg(args[n], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); n++; XtSetArg(args[n], XmNtopWidget, info->right); n++; XtSetArg(args[n], XmNtopOffset, 0); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_NONE); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_WIDGET); n++; XtSetArg(args[n], XmNrightWidget, info->right); n++; XtSetArg(args[n], XmNrightOffset, 3); n++; XtSetArg(args[n], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); n++; XtSetArg(args[n], XmNbottomWidget, info->right); n++; XtSetArg(args[n], XmNbottomOffset, 0); n++; info->right_label = XmCreateLabelGadget(info->form, "MarginRightLabel", args, n); XmStringFree(xms); XtManageChild(info->right_label); n = 0; XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); n++; XtSetArg(args[n], XmNtopWidget, info->top); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_NONE); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_OPPOSITE_WIDGET); n++; XtSetArg(args[n], XmNrightWidget, info->top); n++; XtSetArg(args[n], XmNrightOffset, 0); n++; info->bottom = XmCreateTextField(info->form, "MarginBottomText", args, n); XtManageChild(info->bottom); xms = XmStringCreateLocalized(DTPO_MARGIN_FRAME_BOTTOM_MARGIN_LABEL); n = 0; XtSetArg(args[n], XmNlabelString, xms); n++; XtSetArg(args[n], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); n++; XtSetArg(args[n], XmNtopWidget, info->bottom); n++; XtSetArg(args[n], XmNtopOffset, 0); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_NONE); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_WIDGET); n++; XtSetArg(args[n], XmNrightWidget, info->bottom); n++; XtSetArg(args[n], XmNrightOffset, 3); n++; XtSetArg(args[n], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); n++; XtSetArg(args[n], XmNbottomWidget, info->bottom); n++; XtSetArg(args[n], XmNbottomOffset, 0); n++; info->bottom_label = XmCreateLabelGadget(info->form, "MarginBottomLabel", args, n); XmStringFree(xms); XtManageChild(info->bottom_label); n = 0; XtSetArg(args[n], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); n++; XtSetArg(args[n], XmNtopWidget, info->bottom); n++; XtSetArg(args[n], XmNtopOffset, 0); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_NONE); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_OPPOSITE_WIDGET); n++; XtSetArg(args[n], XmNrightWidget, info->right); n++; XtSetArg(args[n], XmNrightOffset, 0); n++; info->left = XmCreateTextField(info->form, "MarginLeftText", args, n); XtManageChild(info->left); xms = XmStringCreateLocalized(DTPO_MARGIN_FRAME_LEFT_MARGIN_LABEL); n = 0; XtSetArg(args[n], XmNlabelString, xms); n++; XtSetArg(args[n], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); n++; XtSetArg(args[n], XmNtopWidget, info->left); n++; XtSetArg(args[n], XmNtopOffset, 0); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_NONE); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_WIDGET); n++; XtSetArg(args[n], XmNrightWidget, info->left); n++; XtSetArg(args[n], XmNrightOffset, 3); n++; XtSetArg(args[n], XmNbottomAttachment, XmATTACH_OPPOSITE_WIDGET); n++; XtSetArg(args[n], XmNbottomWidget, info->left); n++; XtSetArg(args[n], XmNbottomOffset, 0); n++; info->left_label = XmCreateLabelGadget(info->form, "MarginLeftLabel", args, n); XmStringFree(xms); XtManageChild(info->left_label); XtManageChild(info->form); return info->frame; }
/* * Function: _DtPrintCreateHdrFtrFrame * * Creates a frame for specifying the contents of page headers and footers. * The frame contains four option menus, one for each _DtPrintHdrFtrEnum. * The pulldown menus for the option menu are constructed from the .string * field in the array of _DtPrintHdrFtrSpec in "specs". * * _DtPrintCreateHdrFtrFrame copies the pointer to the array of * _DtPrintHdrFtrSpec. IT DOES NOT COPY THE ELEMENTS OF THE ARRAY. * * parent - specifies the parent of the frame. * nspecs - specifies the number of entries in the specs array. * specs - array of header/footer specifiers. The .string * field is used to construct labels in the GUI. * The .data field is returned in calls to * _DtPrintGetHdrFtrSpec. * * Returns the widget id for the frame. */ Widget _DtPrintCreateHdrFtrFrame( Widget parent, int nspecs, char **spec_strings, void **spec_data ) { DtpoHdrFtrFrame *info; Arg args[16]; int n; int i; XmString xms; info = (DtpoHdrFtrFrame *) XtMalloc( sizeof(DtpoHdrFtrFrame) ); info->nspecs = nspecs; info->specs = (DtpoHdrFtrSpec *) XtMalloc(nspecs*sizeof(DtpoHdrFtrSpec)); for (i=0; i<nspecs; i++) { info->specs[i].string = spec_strings[i]; if (spec_data != (void*) NULL) info->specs[i].data = spec_data[i]; else info->specs[i].data = (void*) NULL; info->specs[i].button = (Widget) NULL; } /* * Create the frame and attach add a destroyCallback to clean up * memory allocated for this object. */ n = 0; XtSetArg(args[n], XmNchildHorizontalAlignment, XmALIGNMENT_BEGINNING); n++; XtSetArg(args[n], XmNchildVerticalAlignment, XmALIGNMENT_CENTER); n++; XtSetArg(args[n], XmNuserData, info); n++; info->frame = XmCreateFrame(parent, "HdrFtrFrame", args, n); XtAddCallback( info->frame, XmNdestroyCallback, _DtPrintDestroyHdrFtrFrameCB, (XtPointer) info ); /* * Create a label child for the frame */ xms = XmStringCreateLocalized(DTPO_HEADERFOOTER_FRAME_LABEL); n = 0; XtSetArg(args[n], XmNchildType, XmFRAME_TITLE_CHILD); n++; XtSetArg(args[n], XmNchildHorizontalAlignment, XmALIGNMENT_BEGINNING); n++; XtSetArg(args[n], XmNchildVerticalAlignment, XmALIGNMENT_CENTER); n++; XtSetArg(args[n], XmNlabelString, xms); n++; info->label = XmCreateLabel(info->frame, "HdrFtrLabel", args, n); XtManageChild(info->label); XmStringFree(xms); /* * Create a form work area child which will be populated by the * OptionMenu's. */ n = 0; XtSetArg(args[n], XmNallowOverlap, False); n++; XtSetArg(args[n], XmNfractionBase, 2); n++; info->form = XmCreateForm(info->frame, "HdrFtrForm", args, n); /* * Create the pulldown menu for the option menus. * Store the button index in the userData resource of each button. */ info->menu = XmCreatePulldownMenu(parent, "HdrFtrMenu", NULL, 0); for (i=0; i<info->nspecs; i++) { static char button_label[32]; sprintf(button_label, "Button%d", i); xms = XmStringCreateLocalized(info->specs[i].string); n = 0; XtSetArg(args[n], XmNlabelString, xms); n++; XtSetArg(args[n], XmNuserData, i); n++; info->specs[i].button = XmCreatePushButtonGadget(info->menu, button_label, args, n); XmStringFree(xms); XtManageChild(info->specs[i].button); } /* * Create the option menus using the menu created above. */ xms = XmStringCreateLocalized(DTPO_HEADERFOOTER_FRAME_TOP_LEFT_LABEL); n=0; XtSetArg(args[n], XmNsubMenuId, info->menu); n++; XtSetArg(args[n], XmNlabelString, xms); n++; XtSetArg(args[n], XmNuserData, info); n++; XtSetArg(args[n], XmNorientation, XmHORIZONTAL); n++; XtSetArg(args[n], XmNtopAttachment, XmATTACH_FORM); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_NONE); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_POSITION); n++; XtSetArg(args[n], XmNrightPosition, 1); n++; XtSetArg(args[n], XmNrightOffset, 5); n++; info->top_left = XmCreateOptionMenu( info->form, "PageHeaderLeftOM", args, n ); XmStringFree(xms); XtManageChild(info->top_left); xms = XmStringCreateLocalized(DTPO_HEADERFOOTER_FRAME_TOP_RIGHT_LABEL); n=0; XtSetArg(args[n], XmNsubMenuId, info->menu); n++; XtSetArg(args[n], XmNlabelString, xms); n++; XtSetArg(args[n], XmNuserData, info); n++; XtSetArg(args[n], XmNorientation, XmHORIZONTAL); n++; XtSetArg(args[n], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); n++; XtSetArg(args[n], XmNtopWidget, info->top_left); n++; XtSetArg(args[n], XmNtopOffset, 0); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_NONE); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_FORM); n++; info->top_right = XmCreateOptionMenu( info->form, "PageHeaderRightOM", args, n ); XmStringFree(xms); XtManageChild(info->top_right); xms = XmStringCreateLocalized(DTPO_HEADERFOOTER_FRAME_BOTTOM_LEFT_LABEL); n=0; XtSetArg(args[n], XmNsubMenuId, info->menu); n++; XtSetArg(args[n], XmNlabelString, xms); n++; XtSetArg(args[n], XmNuserData, info); n++; XtSetArg(args[n], XmNorientation, XmHORIZONTAL); n++; XtSetArg(args[n], XmNtopAttachment, XmATTACH_WIDGET); n++; XtSetArg(args[n], XmNtopWidget, info->top_left); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_NONE); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_OPPOSITE_WIDGET); n++; XtSetArg(args[n], XmNrightWidget, info->top_left); n++; XtSetArg(args[n], XmNrightOffset, 0); n++; info->bottom_left = XmCreateOptionMenu( info->form, "PageFooterLeftOM", args, n ); XmStringFree(xms); XtManageChild(info->bottom_left); xms = XmStringCreateLocalized(DTPO_HEADERFOOTER_FRAME_BOTTOM_RIGHT_LABEL); n=0; XtSetArg(args[n], XmNsubMenuId, info->menu); n++; XtSetArg(args[n], XmNlabelString, xms); n++; XtSetArg(args[n], XmNuserData, info); n++; XtSetArg(args[n], XmNorientation, XmHORIZONTAL); n++; XtSetArg(args[n], XmNtopAttachment, XmATTACH_OPPOSITE_WIDGET); n++; XtSetArg(args[n], XmNtopWidget, info->bottom_left); n++; XtSetArg(args[n], XmNtopOffset, 0); n++; XtSetArg(args[n], XmNleftAttachment, XmATTACH_NONE); n++; XtSetArg(args[n], XmNrightAttachment, XmATTACH_OPPOSITE_WIDGET); n++; XtSetArg(args[n], XmNrightWidget, info->top_right); n++; XtSetArg(args[n], XmNrightOffset, 0); n++; info->bottom_right = XmCreateOptionMenu( info->form, "PageFooterRightOM", args, n ); XmStringFree(xms); XtManageChild(info->bottom_right); XtManageChild(info->form); return info->frame; }
void CreateControlPanel() { Widget PopupShell, Form1, SBResLabel, SBStringResLabel, SBNumericResLabel; Widget Manager1, Manager2, Manager3; Widget ArrowSensLabel, ArrowSensPulldown, ArrowSensOptions, ArrowSensPB[NUM_ARROW_SENS_BTNS]; Widget DecimalPtsLabel, DecimalPtsTF; Widget IncrValueLabel, IncrValueTF; Widget MaxValueLabel, MaxValueTF; Widget MinValueLabel, MinValueTF; Widget NumValuesLabel, NumValuesTF; Widget PositionLabel, PositionTF; Widget ChildTypeLabel, ChildTypePulldown, ChildTypeOptions, ChildTypePB[NUM_CHILD_TYPE_BTNS]; Widget ValuesLabel, ValuesComboBox; XmString string; int i; n = 0; XtSetArg( args[n], XmNx, 0 ); n++; XtSetArg( args[n], XmNy, 500 ); n++; XtSetArg( args[n], XmNwidth, CONTROL_PANEL_WIDTH ); n++; XtSetArg( args[n], XmNheight, CONTROL_PANEL_HEIGHT ); n++; PopupShell = XtCreatePopupShell("Resource Control Panel", topLevelShellWidgetClass, Shell1, args, n ); XtManageChild( PopupShell ); n = 0; Form1 = XmCreateForm( PopupShell, "Form1", args, n ); XtManageChild( Form1 ); string = XmStringCreateLtoR("SpinBox Resources", XmFONTLIST_DEFAULT_TAG ); n = 0; XtSetArg( args[n], XmNtopAttachment, XmATTACH_FORM ); n++; XtSetArg( args[n], XmNleftAttachment, XmATTACH_FORM ); n++; XtSetArg( args[n], XmNlabelString, string ); n++; XtSetArg( args[n], XmNbackground, CommonGetColor("white")); n++; XtSetArg( args[n], XmNforeground, CommonGetColor("blue")); n++; SBResLabel = XmCreateLabel( Form1, "SBResLabel", args, n ); XtManageChild( SBResLabel ); XmStringFree( string ); Manager1 = CreateSpinBoxResourceControls( Form1, SBResLabel, Form1, Form1 ); /* * Create SpinBox Constraint Resource Panel for an XmSTRING child * type. */ Manager2 = CreateConstraintResourceControls( Form1, Form1, Form1, XmSTRING ); string = XmStringCreateLtoR("SpinBox Constraint Resources - XmSTRING", XmFONTLIST_DEFAULT_TAG ); n = 0; XtSetArg( args[n], XmNtopAttachment, XmATTACH_WIDGET ); n++; XtSetArg( args[n], XmNtopWidget, Manager1 ); n++; XtSetArg( args[n], XmNleftAttachment, XmATTACH_FORM ); n++; XtSetArg( args[n], XmNlabelString, string ); n++; XtSetArg( args[n], XmNbackground, CommonGetColor("white")); n++; XtSetArg( args[n], XmNforeground, CommonGetColor("blue")); n++; SBStringResLabel = XmCreateLabel( Form1, "SBStringResLabel", args, n ); XtManageChild( SBStringResLabel ); XmStringFree( string ); /* * Create SpinBox Constraint Resource Panel for an XmNUMERIC child * type. */ Manager3 = CreateConstraintResourceControls( Form1, Manager2, Form1, XmNUMERIC ); string = XmStringCreateLtoR("SpinBox Constraint Resources - XmNUMERIC", XmFONTLIST_DEFAULT_TAG ); n = 0; XtSetArg( args[n], XmNtopAttachment, XmATTACH_WIDGET ); n++; XtSetArg( args[n], XmNtopWidget, Manager1 ); n++; XtSetArg( args[n], XmNx, CONTROL_PANEL_WIDTH / 2 - MARGIN ); n++; XtSetArg( args[n], XmNlabelString, string ); n++; XtSetArg( args[n], XmNbackground, CommonGetColor("white")); n++; XtSetArg( args[n], XmNforeground, CommonGetColor("blue")); n++; SBNumericResLabel = XmCreateLabel( Form1, "SBStringResLabel", args, n ); XtManageChild( SBNumericResLabel ); XmStringFree( string ); XtPopup( PopupShell, XtGrabNone ); }
void main(int argc, char **argv) { Widget MainForm, ControlPanel, Separator1, Separator2, Label1, Label2; XmString string; CommonTestInit( argc, argv ); n = 0; XtSetArg( args[n], XmNx, 0 ); n++; XtSetArg( args[n], XmNy, 0 ); n++; XtSetValues( Shell1, args, n ); XtRealizeWidget( Shell1 ); n = 0; MainForm = XmCreateForm( Shell1, "MainForm", args, n ); XtManageChild( MainForm ); string = XmStringCreateLtoR("XmSTRING:", XmFONTLIST_DEFAULT_TAG ); n = 0; XtSetArg( args[n], XmNtopAttachment, XmATTACH_FORM ); n++; XtSetArg( args[n], XmNleftAttachment, XmATTACH_FORM ); n++; XtSetArg( args[n], XmNwidth, SPIN_BOX_WIDTH ); n++; XtSetArg( args[n], XmNlabelString, string ); n++; XtSetArg( args[n], XmNalignment, XmALIGNMENT_CENTER ); n++; Label1 = XmCreateLabel( MainForm, "Label1", args, n ); XtManageChild( Label1 ); XmStringFree( string ); n = 0; XtSetArg( args[n], XmNtopAttachment, XmATTACH_WIDGET ); n++; XtSetArg( args[n], XmNtopWidget, Label1 ); n++; XtSetArg( args[n], XmNleftAttachment, XmATTACH_FORM ); n++; XtSetArg( args[n], XmNwidth, SPIN_BOX_WIDTH ); n++; XtSetArg( args[n], XmNheight, SPIN_BOX_HEIGHT ); n++; XtSetArg( args[n], XmNarrowLayout, XmARROWS_FLAT_END ); n++; XtSetArg( args[n], XmNarrowOrientation, XmARROWS_HORIZONTAL ); n++; SpinBox1 = XmCreateSpinBox( MainForm, "SpinBox1", args, n ); XtManageChild( SpinBox1 ); n = 0; StringTextF = XmCreateTextField( SpinBox1, "StringTextF", args, n ); XtManageChild( StringTextF ); string = XmStringCreateLtoR("XmNUMERIC:", XmFONTLIST_DEFAULT_TAG ); n = 0; XtSetArg( args[n], XmNtopAttachment, XmATTACH_FORM ); n++; XtSetArg( args[n], XmNleftAttachment, XmATTACH_WIDGET ); n++; XtSetArg( args[n], XmNleftWidget, Label1 ); n++; XtSetArg( args[n], XmNwidth, SPIN_BOX_WIDTH ); n++; XtSetArg( args[n], XmNlabelString, string ); n++; XtSetArg( args[n], XmNalignment, XmALIGNMENT_CENTER ); n++; Label2 = XmCreateLabel( MainForm, "Label2", args, n ); XtManageChild( Label2 ); XmStringFree( string ); n = 0; XtSetArg( args[n], XmNtopAttachment, XmATTACH_WIDGET ); n++; XtSetArg( args[n], XmNtopWidget, Label2 ); n++; XtSetArg( args[n], XmNleftAttachment, XmATTACH_WIDGET ); n++; XtSetArg( args[n], XmNleftWidget, SpinBox1 ); n++; XtSetArg( args[n], XmNwidth, SPIN_BOX_WIDTH ); n++; XtSetArg( args[n], XmNheight, SPIN_BOX_HEIGHT ); n++; XtSetArg( args[n], XmNarrowLayout, XmARROWS_FLAT_END ); n++; XtSetArg( args[n], XmNarrowOrientation, XmARROWS_HORIZONTAL ); n++; SpinBox2 = XmCreateSpinBox( MainForm, "SpinBox2", args, n ); XtManageChild( SpinBox2 ); n = 0; NumericTextF = XmCreateTextField( SpinBox2, "NumericTextF", args, n ); XtManageChild( NumericTextF ); CreateControlPanel(); CommonPause(); CommonPause(); CommonPause(); CommonPause(); CommonPause(); CommonPause(); CommonPause(); CommonPause(); CommonPause(); CommonPause(); CommonPause(); CommonPause(); CommonPause(); CommonPause(); CommonPause(); CommonPause(); MotifConvergeTP3(); MotifConvergeTP4(); MotifConvergeTP5(); MotifConvergeTP6(); MotifConvergeTP7(); XtAppMainLoop( app_context ); }