⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test3.c

📁 安装DDD之前
💻 C
字号:
#include <stdio.h>#include <Xm/Xm.h>#include <Xm/RowColumn.h>#include <Xm/DrawnB.h>intmain(int argc, char **argv){  XtAppContext theApp;  Widget toplevel;  Widget butt;  Pixmap pixmap;  Pixel fg, bg;  toplevel = XtVaAppInitialize(&theApp, "toggle1", NULL, 0,			       &argc, argv, NULL, NULL);  butt= XtVaCreateManagedWidget("Button1", xmDrawnButtonWidgetClass, toplevel, 				XmNwidth, 100,				XmNheight, 100,				XmNpushButtonEnabled, True,				NULL);  XtRealizeWidget(toplevel);  fg = XBlackPixelOfScreen(DefaultScreenOfDisplay(XtDisplay(toplevel)));  bg = XWhitePixelOfScreen(DefaultScreenOfDisplay(XtDisplay(toplevel)));  pixmap = XmGetPixmap(XtScreen(butt), "xlogo64", fg, bg);  XtVaSetValues(butt, XmNlabelPixmap, pixmap, XmNlabelType, XmPIXMAP, NULL);/* Note: the following values are the result of * querying the current geometry. */{static XtWidgetGeometry Expected[] = {   CWWidth | CWHeight            ,    0,    0,  100,  100, 0,0,0, /* Button1 */};/* toplevel should be replaced with to correct applicationShell */PrintDetails(toplevel, Expected);}LessTifTestMainLoop(toplevel);  exit(0);}

⌨️ 快捷键说明

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