text = XmCreateScrolledText[paned, "text", args, n] XtManageChild[text] //显示窗口 XtRealizeWidget[toplevel] //进入事件循环 XtAppMainLoop[app]
标签: text XmCreateScrolledText XtManageChild XtRealiz
上传时间: 2014-01-14
上传用户:lanwei
textf = XmCreateTextField[spinbox, "textf", args, n] XtManageChild[textf] //显示窗口 XtRealizeWidget[toplevel] //进入事件循环 XtAppMainLoop[app]
标签: textf XmCreateTextField XtManageChild spinbox
上传时间: 2017-03-25
上传用户:liglechongchong
//建立顶级窗口 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[]
标签: NULL XtVaAppInitialize toplevel DrawArea
上传时间: 2013-12-29
上传用户:a6697238
//建立按钮上标签的字符串 label = XmStringCreateSimple["Hello World!"] n = 0 XtSetArg[args[n], XmNlabelString, label] n++ button = XmCreatePushButton[toplevel, "pushbutton", args, n] XtManageChild[button] XmStringFree[label] //设置回调函数 XtAddCallback[button, XmNactivateCallback, callback, NULL]
标签: XmStringCreateSimple XtSetArg XmNlab label
上传时间: 2017-03-21
上传用户:fredguo
//建立顶级窗口 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]
标签: NULL XtVaAppInitialize toplevel Form
上传时间: 2013-12-19
上传用户:亚亚娟娟123
//建立顶级窗口 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]
标签: NULL XtVaAppInitialize toplevel Frame
上传时间: 2013-12-08
上传用户:hasan2015
//建立顶级窗口 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]
标签: NULL XtVaAppInitialize toplevel Label
上传时间: 2014-01-11
上传用户:bruce5996
//建立顶级窗口 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]
标签: NULL XtVaAppInitialize toplevel List
上传时间: 2013-12-21
上传用户:asdkin
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]
标签: NULL XtSetLanguageProc setlocale toplevel
上传时间: 2017-03-25
上传用户:lmeeworm
//建立顶级窗口 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]
标签: NULL XtVaAppInitialize toplevel Scroll
上传时间: 2013-12-26
上传用户:fxf126@126.com