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

📄 test8.c

📁 安装DDD之前
💻 C
字号:
/* * $Header: /cvsroot/lesstif/lesstif/test/Xm/menushell/test8.c,v 1.2 2003/07/16 21:16:04 dannybackx Exp $ */#include <Xm/Xm.h>#include <Xm/RowColumn.h>#include <Xm/Label.h>#include <Xm/PushB.h>#include <stdio.h>Widget label, toplevel, popup, button1, button2;XtAppContext theApp;char *fallback[] = {        "*button1.labelString:                  Button 1",        "*button1.mnemonic:                     B",        "*button1.acceleratorText:              Ctrl-B",        "*button1.accelerator:                  Ctrl<Key>b",        "*button2.labelString:                  Button 2",        "*button2.mnemonic:                     u",        "*button2.acceleratorText:              Ctrl-U",        "*button2.accelerator:                  Ctrl<Key>U",        NULL   }; intmain(int argc,     char **argv){  Arg args[2];  int nargs;  String menuPost = NULL;  unsigned int foo;  toplevel = XtAppInitialize(&theApp,			     "test12",			     NULL, 0,			     &argc, argv,			     fallback, NULL, 0);  label = XtVaCreateManagedWidget("label",				  xmLabelWidgetClass,				  toplevel,				  NULL);  nargs = 0;#if XmVERSION > 1  XtSetArg(args[nargs],XmNpopupEnabled,XmPOPUP_AUTOMATIC_RECURSIVE);  ++nargs;#endif  popup = XmCreatePopupMenu(label,                            "popup",                           args,nargs);/*  XtManageChild(popup); */  XtVaSetValues(popup, XmNwhichButton, 3, NULL);  button1 = XtVaCreateManagedWidget("button1",				    xmPushButtonWidgetClass,				    popup,				    NULL);  button2 = XtVaCreateManagedWidget("button2",				    xmPushButtonWidgetClass,				    popup,				    NULL);  XtRealizeWidget(toplevel);  {    static XtWidgetGeometry Expected[] = {      CWWidth | CWHeight            ,   57,   73,   34,   17, 0,0,0, /* label */    };    /* 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 + -