test1.c

来自「安装DDD之前」· C语言 代码 · 共 43 行

C
43
字号
/* * this test is pretty cool.  Turns out that objects need not have a Composite * parent.  Try using editres on this -- "One" will not appear in the Widget * hierarchy, just as in M*tif. */#include <Xm/BulletinB.h>#include <Xm/SeparatoG.h>#include <Xm/ExtObjectP.h>intmain(int argc, char **argv){  Widget toplevel, one,two;  Widget gadget;  XtAppContext app;  XtSetLanguageProc(NULL, NULL, NULL);  toplevel = XtVaAppInitialize(&app, "ExtObj", NULL, 0, &argc, argv, NULL, NULL);  two = XtVaCreateManagedWidget("Two", xmBulletinBoardWidgetClass, toplevel,				XmNmarginWidth, 10, XmNmarginHeight, 10,				NULL);  gadget = XtVaCreateManagedWidget("Sep", xmSeparatorGadgetClass, two, NULL);  one = XtVaCreateWidget("One", xmExtObjectClass, gadget, NULL);  XtRealizeWidget(toplevel);  {    static XtWidgetGeometry Expected[] = {   CWWidth | CWHeight            ,   50,   50,   23,   23, 0,0,0, /* Two */   CWWidth | CWHeight | CWX | CWY,   10,   10,    2,    2, 0,0,0, /* Sep */     };    PrintDetails(  toplevel ,Expected);};   LessTifTestMainLoop(  toplevel );  exit(0);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?