Welcome![Sign In][Sign Up]
Location:
Search - XtVaAppInitialize

Search list

[Button controlbutton

Description: //建立顶级窗口 toplevel = XtVaAppInitialize[&app, "ArrowButton", NULL, 0, &argc, argv, NULL, NULL] //建立多选按钮的布局组件 n = 0 XtSetArg[args[n], XmNarrowDirection, XmARROW_RIGHT] n++ XtSetArg[args[n], XmNwidth, 100] n++ XtSetArg[args[n], XmNheight, 100] n++ arrow = XmCreateArrowButton[toplevel, "arrow", args, n] XtManageChild[arrow]
Platform: | Size: 8192 | Author: zzroot | Hits:

[Linux-Unixdrawarea

Description: //建立顶级窗口 toplevel = XtVaAppInitialize[&app, "DrawArea", NULL, 0, &argc, argv, NULL, NULL] //建立drawarea n = 0 XtSetArg[args[n], XmNwidth, 500 ] n++ XtSetArg[args[n], XmNheight, 500 ] n++ drawarea = XmCreateDrawingArea[toplevel, "drawarea", args, n] XtManageChild[drawarea] //建立绘图所用的GC prepare[] -//建立顶级窗口 toplevel = XtVaAppInitialize[&app, "DrawArea", NULL, 0, &argc, argv, NULL, NULL] //建立drawarea n = 0 XtSetArg[args[n], XmNwidth, 500 ] n++ XtSetArg[args[n], XmNheight, 500 ] n++ drawarea = XmCreateDrawingArea[toplevel, "drawarea", args, n] XtManageChild[drawarea] //建立绘图所用的GC prepare[]
Platform: | Size: 1024 | Author: zzroot | Hits:

[Linux-Unixform

Description: //建立顶级窗口 toplevel = XtVaAppInitialize[&app, "Form", NULL, 0, &argc, argv, NULL, NULL] n = 0 XtSetArg[args[n], XmNwidth, 500] n++ XtSetArg[args[n], XmNheight, 500] n++ XtSetValues[toplevel, args, n] //建立主窗口 form = XmCreateForm[toplevel, "form", NULL, 0] XtManageChild[form] //建立菜单条 n = 0 XtSetArg[args[n], XmNtopAttachment, XmATTACH_FORM] n++ XtSetArg[args[n], XmNleftAttachment, XmATTACH_FORM] n++ XtSetArg[args[n], XmNrightAttachment, XmATTACH_FORM] n++ menubar = XmCreateMenuBar[form, "menubar", args, n] XtManageChild[menubar] create_menu[menubar]
Platform: | Size: 4096 | Author: zzroot | Hits:

[Linux-Unixframe

Description: //建立顶级窗口 toplevel = XtVaAppInitialize[&app, "Frame", NULL, 0, &argc, argv, NULL, NULL] //建立Frame组件 n = 0 XtSetArg[args[n], XmNshadowType, XmSHADOW_ETCHED_IN] n++ XtSetArg[args[n], XmNshadowThickness, 4] n++ frame = XmCreateFrame[toplevel, "frame", args, n] XtManageChild[frame]
Platform: | Size: 1024 | Author: xiaoran | Hits:

[Linux-Unixlabel

Description: //建立顶级窗口 toplevel = XtVaAppInitialize[&app, "Label", NULL, 0, &argc, argv, NULL, NULL] //建立按钮上标签的字符串 str = XmStringCreateLtoR["A Simple\n Label", XmFONTLIST_DEFAULT_TAG] n = 0 XtSetArg[args[n], XmNlabelString, str] n++ label = XmCreateLabel[toplevel, "pushbutton", args, n] XtManageChild[label] XmStringFree[str] //显示窗口 XtRealizeWidget[toplevel] //进入事件循环 XtAppMainLoop[app] -//Set up top-level window toplevel = XtVaAppInitialize [
Platform: | Size: 12288 | Author: xiaoran | Hits:

[Linux-Unixlist

Description: //建立顶级窗口 toplevel = XtVaAppInitialize[&app, "List", NULL, 0, &argc, argv, NULL, NULL] //建立列表上的复合字符串 for[i=0 i<12 i++] str_months[i] = XmStringCreateSimple[months[i]] //建立列表 n = 0 XtSetArg[args[n], XmNitems, str_months] n++ XtSetArg[args[n], XmNitemCount, 12] n++ XtSetArg[args[n], XmNvisibleItemCount, 8] n++ //XtSetArg[args[n], XmNscrollBarDisplayPolicy, XmSTATIC] n++ //XtSetArg[args[n], XmNlistSizePolicy, XmCONSTANT] n++ XtSetArg[args[n], XmNselectionPolicy, XmEXTENDED_SELECT] n++ list = XmCreateScrolledList[toplevel, "list", args, n] XtManageChild[list] for[i=0 i<12 i++] XmStringFree[str_months[i]] //显示窗口 XtRealizeWidget[toplevel] //进入事件循环 XtAppMainLoop[app] -//建立顶级窗口 toplevel = XtVaAppInitialize[&app, "List", NULL, 0, &argc, argv, NULL, NULL] //建立列表上的复合字符串 for[i=0 i<12 i++] str_months[i] = XmStringCreateSimple[months[i]] //建立列表 n = 0 XtSetArg[args[n], XmNitems, str_months] n++ XtSetArg[args[n], XmNitemCount, 12] n++ XtSetArg[args[n], XmNvisibleItemCount, 8] n++ //XtSetArg[args[n], XmNscrollBarDisplayPolicy, XmSTATIC] n++ //XtSetArg[args[n], XmNlistSizePolicy, XmCONSTANT] n++ XtSetArg[args[n], XmNselectionPolicy, XmEXTENDED_SELECT] n++ list = XmCreateScrolledList[toplevel, "list", args, n] XtManageChild[list] for[i=0 i<12 i++] XmStringFree[str_months[i]] //显示窗口 XtRealizeWidget[toplevel] //进入事件循环 XtAppMainLoop[app]
Platform: | Size: 3072 | Author: xiaoran | Hits:

[Linux-Unixspinbox

Description: setlocale[LC_ALL, ""] XtSetLanguageProc[NULL, NULL, NULL] //建立顶级窗口 toplevel = XtVaAppInitialize[&app, "SpinBox", NULL, 0, &argc, argv, NULL, NULL] //建立SpinBox n = 0 XtSetArg[args[n], XmNwidth, 400 ] n++ XtSetArg[args[n], XmNheight, 100 ] n++ //XtSetArg[args[n], XmNarrowLayout, XmARROWS_FLAT_END] n++ XtSetArg[args[n], XmNrepeatDelay, 0] n++ //XtSetArg[args[n], XmNarrowOrientation, XmHORIZONTAL] n++ spinbox = XmCreateSpinBox[toplevel, "SpinBox", args, n] XtManageChild[spinbox] XtAddCallback [spinbox, XmNvalueChangedCallback, [XtCallbackProc]ValueChanged, [XtPointer]NULL] XtAddCallback [spinbox, XmNmodifyVerifyCallback, [XtCallbackProc]ModifyVerify, [XtPointer]NULL] -setlocale[LC_ALL, ""] XtSetLanguageProc[NULL, NULL, NULL] //建立顶级窗口 toplevel = XtVaAppInitialize[&app, "SpinBox", NULL, 0, &argc, argv, NULL, NULL] //建立SpinBox n = 0 XtSetArg[args[n], XmNwidth, 400 ] n++ XtSetArg[args[n], XmNheight, 100 ] n++ //XtSetArg[args[n], XmNarrowLayout, XmARROWS_FLAT_END] n++ XtSetArg[args[n], XmNrepeatDelay, 0] n++ //XtSetArg[args[n], XmNarrowOrientation, XmHORIZONTAL] n++ spinbox = XmCreateSpinBox[toplevel, "SpinBox", args, n] XtManageChild[spinbox] XtAddCallback [spinbox, XmNvalueChangedCallback, [XtCallbackProc]ValueChanged, [XtPointer]NULL] XtAddCallback [spinbox, XmNmodifyVerifyCallback, [XtCallbackProc]ModifyVerify, [XtPointer]NULL]
Platform: | Size: 2048 | Author: xiaoran1 | Hits:

[Linux-Unixhelloworldmotif-1

Description: //建立顶级窗口 toplevel = XtVaAppInitialize[&app, "Scroll", NULL, 0, &argc, argv, NULL, NULL] //建立SpinBox n = 0 XtSetArg[args[n], XmNwidth, 400 ] n++ XtSetArg[args[n], XmNheight, 100 ] n++ //XtSetArg[args[n], XmNarrowLayout, XmARROWS_FLAT_END] n++ XtSetArg[args[n], XmNrepeatDelay, 0] n++ //XtSetArg[args[n], XmNarrowOrientation, XmHORIZONTAL] n++ spinbox = XmCreateSpinBox[toplevel, "SpinBox", args, n] XtManageChild[spinbox] XtAddCallback [spinbox, XmNvalueChangedCallback, [XtCallbackProc]ValueChanged, [XtPointer]NULL] XtAddCallback [spinbox, XmNmodifyVerifyCallback, [XtCallbackProc]ModifyVerify, [XtPointer]NULL] - //建立顶级窗口 toplevel = XtVaAppInitialize[&app, "Scroll", NULL, 0, &argc, argv, NULL, NULL] //建立SpinBox n = 0 XtSetArg[args[n], XmNwidth, 400 ] n++ XtSetArg[args[n], XmNheight, 100 ] n++ //XtSetArg[args[n], XmNarrowLayout, XmARROWS_FLAT_END] n++ XtSetArg[args[n], XmNrepeatDelay, 0] n++ //XtSetArg[args[n], XmNarrowOrientation, XmHORIZONTAL] n++ spinbox = XmCreateSpinBox[toplevel, "SpinBox", args, n] XtManageChild[spinbox] XtAddCallback [spinbox, XmNvalueChangedCallback, [XtCallbackProc]ValueChanged, [XtPointer]NULL] XtAddCallback [spinbox, XmNmodifyVerifyCallback, [XtCallbackProc]ModifyVerify, [XtPointer]NULL]
Platform: | Size: 1024 | Author: xiaoran1 | Hits:

CodeBus www.codebus.net