test5.c

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

C
64
字号
/* $Header: /cvsroot/lesstif/lesstif/test/Xm/form/test5.c,v 1.7 2002/05/01 15:39:21 amai Exp $ *//** * * form5.c * **/#include <stdlib.h>#include <stdio.h>#include <Xm/Xm.h>#include <Xm/PushB.h>#include <Xm/Form.h>#include "../../common/Test.h"voidcallback(Widget w,         XtPointer p1,         XtPointer p2){  XtVaSetValues(w,                XmNwidth, 50,                NULL);}intmain(int argc, char **argv){  Widget toplevel, one, two;  XtAppContext app;  XtSetLanguageProc(NULL, NULL, NULL);  toplevel = XtVaAppInitialize(&app, "Form1", NULL, 0, &argc, argv, NULL, NULL);  one = XtVaCreateManagedWidget("form", xmFormWidgetClass, toplevel,				XmNresizable, True, NULL);  two = XtVaCreateManagedWidget("two", xmPushButtonWidgetClass, one,				XmNtopAttachment, XmATTACH_FORM,				XmNbottomAttachment, XmATTACH_FORM,				XmNleftAttachment, XmATTACH_NONE,				XmNrightAttachment, XmATTACH_FORM,				NULL);  XtAddCallback(two, XmNactivateCallback, callback, NULL);  XtRealizeWidget(toplevel);  {  static XtWidgetGeometry Expected[] = {  	{CWWidth | CWHeight,		0,	0,	30,	25,	0,0,0,	/* Form */},  	{CWWidth | CWHeight | CWX | CWY,	0,	0,	30,	25,	0,0,0,	/* two */},};  PrintDetails(toplevel, Expected);  }      LessTifTestMainLoop(toplevel);  exit(0);}

⌨️ 快捷键说明

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