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

📄 listing_6_16.c

📁 This source code has been tested under OpenWindows 2.0, Sun s X11/NeWS server. For Xlib programs th
💻 C
字号:
/*************************************************************************                                                                    ****  listing_6_16.c                                                    ****                                                                    ****  Three labels and a Form. This program demonstrates the use of     ****  XmForm's "Widget Attachment" constraint.                          ****                                                                    *************************************************************************/#include <Xm/Form.h>#include <Xm/Label.h>Widget	appshell,			/* Application Shell	      */	theform,			/* The Paned Window           */	labels[3];			/* The children		      */Arg	arglist[2];			/* Used to set attachment     */void main( argc, argv )    int     argc;    char    *argv[];{    appshell = XtInitialize( argv[0], "Listing_6_16", NULL, 0, &argc, argv );    theform = XmCreateForm( appshell, "TheForm", NULL, 0 );    XtManageChild( theform );    labels[0] = XmCreateLabel( theform, "Label_0", NULL, 0 );    labels[1] = XmCreateLabel( theform, "Label_1", NULL, 0 );    labels[2] = XmCreateLabel( theform, "Label_2", NULL, 0 );    XtManageChildren( labels, 3 );    XtSetArg( arglist[0], XmNtopWidget,        labels[0] );    XtSetArg( arglist[1], XmNbottomWidget,     labels[2] );    XtSetValues( labels[1], arglist, 2 );    XtRealizeWidget( appshell );    XtMainLoop();}

⌨️ 快捷键说明

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