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 / filselbox.c < prev    next >
C/C++ Source or Header  |  1992-08-19  |  1KB  |  47 lines

  1. /*  include files  */
  2.  
  3. #include <stdio.h>
  4. #include <Xm/FileSB.h>
  5.  
  6.  
  7. /*  Functions defined in this program  */
  8.  
  9. void main();
  10.  
  11.  
  12. /*  Global variables  */
  13.  
  14.  
  15. /*-------------------------------------------------------------
  16. **  main - Main logic for xmbutton
  17. */
  18. void main (argc,argv)
  19. unsigned int argc;
  20. char **argv;
  21. {
  22.   Widget       toplevel;    /*  Shell widget         */
  23.   Widget       fbox;        /*  File selection box   */
  24.   Arg          args[10];    /*  arg list             */
  25.   register     int n;       /*  arg count            */
  26.   XtAppContext app_context; /*  application context  */
  27.  
  28. /*  Initialize the toolkit, create application context, open display, 
  29.     and create a toplevel shell */
  30.   toplevel = XtAppInitialize (&app_context, "Filselbox", NULL, 0, &argc,
  31.                               argv, NULL, args, 0);
  32.  
  33. /*  Create the file selection box */
  34.   n = 0;
  35.   fbox = XmCreateFileSelectionBox (toplevel, "fbox", args, n); 
  36.   
  37. /*  Manage the selectionbox widget */
  38.   XtManageChild (fbox);
  39.  
  40. /*  Realize widgets  */
  41.   XtRealizeWidget (toplevel);
  42.  
  43. /*  Process events  */
  44.   XtAppMainLoop (app_context);
  45. }
  46.  
  47.