📄 test3.c
字号:
#include <Xm/Xm.h>#include <Xm/PushBG.h>#include <Xm/BulletinB.h>Display *theDisplay;Window theRootWindow;Pixmap Pix;Widget toplevel;intmain(int argc, char **argv){ XtAppContext theApp; Widget toplevel, one, two; Pixel fg,bg; toplevel = XtVaAppInitialize(&theApp, "LabelG", NULL, 0, &argc, argv, NULL, NULL); two = XtVaCreateManagedWidget("Two", xmBulletinBoardWidgetClass, toplevel, NULL); one = XtVaCreateManagedWidget("Button1", xmPushButtonGadgetClass, two, XmNwidth, 68, XmNheight, 68, NULL); XtRealizeWidget(toplevel); theDisplay = XtDisplay(toplevel); fg = XBlackPixelOfScreen(DefaultScreenOfDisplay(theDisplay)); bg = XWhitePixelOfScreen(DefaultScreenOfDisplay(theDisplay)); Pix = XmGetPixmap(DefaultScreenOfDisplay(theDisplay), "xlogo64", fg, bg); XtVaSetValues(one, XmNlabelType,XmPIXMAP, XmNlabelPixmap,Pix, NULL); { static XtWidgetGeometry Expected[] = { CWWidth | CWHeight, 0, 0, 89, 89, 0,0,0, /* Form */ CWWidth | CWHeight | CWX | CWY, 10, 10, 68, 68, 0,0,0, /* two */}; PrintDetails(toplevel, Expected); } LessTifTestMainLoop(toplevel); /* XtAppMainLoop(theApp); */ exit(0);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -