home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / m / master12.zip / mastering / defaultscolors < prev    next >
Text File  |  1992-08-18  |  1KB  |  35 lines

  1. #include <Xm/BulletinB.h>
  2. #include <Xm/PushB.h>
  3.  
  4. /***********************************************************************
  5.  ***                             MAIN                                ***
  6.  ***********************************************************************/
  7. void main(argc, argv)
  8.   unsigned int   argc;
  9.   char         **argv;
  10. {
  11.    Widget        toplevel, bboard, pbutton[3];
  12.    Arg           args[10];
  13.    XtAppContext  app_context;
  14.    static char  *pbname[] = {"pb1", "pb2", "pb3"};
  15.    int           i;
  16.      
  17. /* Initialize the toolkit, create app context, open display,
  18.    and create a toplevel shell  */
  19.    toplevel = XtAppInitialize(&app_context, "Defaultscolors", NULL, 0, &argc,
  20.                               argv, NULL, args, 0);
  21.  
  22. /* Create the bulletin board widget */
  23.    bboard = XmCreateBulletinBoard(toplevel, "bb", args, 0);
  24.    XtManageChild(bboard);
  25.  
  26. /* Create the 3 pushbutton widgets. */
  27.    for (i = 0; i < XtNumber(pbname); i++)
  28.       pbutton[i] = XmCreatePushButton(bboard, pbname[i], args, 0);
  29.    XtManageChildren(pbutton, XtNumber(pbutton));
  30.  
  31. /* Realize the widgets and loop  */
  32.    XtRealizeWidget(toplevel);
  33.    XtAppMainLoop(app_context);
  34. }
  35.