📄 test7.c
字号:
/* mainw.c -- demonstrate a simple MainWindow by showing * how it can manage a label. */#include <Xm/ScrollBar.h>#include <Xm/Label.h>#include <Xm/MainW.h>intmain(argc, argv)int argc;char *argv[];{ Widget toplevel, mw, hello; XtAppContext app; XmString label; XtSetLanguageProc (NULL, NULL, NULL); toplevel = XtVaAppInitialize (&app, "Mainw7", NULL, 0, &argc, argv, NULL, NULL); /* Create a 500x300 scrolled window. This value is arbitrary, * but happens to look good initially. It is resizable by the user. */ mw = XtVaCreateManagedWidget ("mainw", xmMainWindowWidgetClass, toplevel, /* xmScrolledWindowWidgetClass, toplevel, */ NULL); /* hs = XtVaCreateManagedWidget ("hs", xmScrollBarWidgetClass, mw, NULL); vs = XtVaCreateManagedWidget ("vs", xmScrollBarWidgetClass, mw, XmNprocessingDirection,XmMAX_ON_TOP, NULL); */ label = XmStringCreateLocalized("Hello World!"); hello = XtVaCreateManagedWidget( "hellohellohello", /* arbitrary widget name */ xmLabelWidgetClass, /* widget class from Label.h */ mw, /* parent widget */ NULL); /* terminate varargs list */ /* XmMainWindowSetAreas(mw,NULL,NULL,NULL,NULL,hello); */ XtRealizeWidget (toplevel);{ static XtWidgetGeometry Expected[] = { CWWidth | CWHeight , 508, 524, 94, 17, 0,0,0, /* mainw */ CWWidth | CWHeight | CWX | CWY, 0, 0, 94, 17, 0,0,0, /* hello */ }; PrintDetails(toplevel,Expected);}; LessTifTestMainLoop(toplevel); exit(0);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -