home *** CD-ROM | disk | FTP | other *** search
/ vis-ftp.cs.umass.edu / vis-ftp.cs.umass.edu.tar / vis-ftp.cs.umass.edu / pub / Software / universal_plane_file_format / NewXShowPlane / main.c < prev    next >
C/C++ Source or Header  |  1993-12-06  |  2KB  |  74 lines

  1. /*
  2. ** Generated by X-Designer Evaluation version
  3. ** This code may not be used in any program
  4. ** offered for resale or commercial use.
  5. */
  6. /*
  7. **LIBS: -lXm -lXt -lX11
  8. */
  9.  
  10. #include <X11/Xatom.h>
  11. #include <X11/Intrinsic.h>
  12. #include <X11/Shell.h>
  13.  
  14. #include <Xm/Xm.h>
  15. #include <Xm/CascadeB.h>
  16. #include <Xm/DialogS.h>
  17. #include <Xm/DrawingA.h>
  18. #include <Xm/FileSB.h>
  19. #include <Xm/Form.h>
  20. #include <Xm/List.h>
  21. #include <Xm/MainW.h>
  22. #include <Xm/MessageB.h>
  23. #include <Xm/PushB.h>
  24. #include <Xm/RowColumn.h>
  25. #include <Xm/ScrollBar.h>
  26. #include <Xm/SelectioB.h>
  27. #include <Xm/Text.h>
  28. #include <Xm/LabelG.h>
  29. #include <Xm/PushBG.h>
  30. #include <Xm/SeparatoG.h>
  31. #include <stdio.h>
  32.  
  33. #include "widgets.h"
  34.  
  35.  
  36. XtAppContext app_context;
  37. Display *display;       /*  Display             */
  38.  
  39. extern void InstallColorMap();
  40. extern void UninstallColorMap();
  41.  
  42. static XtActionsRec colormap_actions[] = {
  43.     {"install", InstallColorMap},
  44.     {"uninstall", UninstallColorMap}
  45. };
  46.  
  47. int main (argc,argv)
  48. unsigned int    argc;
  49. char            **argv;
  50. {
  51.     XtToolkitInitialize ();
  52.     app_context = XtCreateApplicationContext ();
  53.     display = XtOpenDisplay (app_context, NULL, argv[0], "XShowPlane",
  54.                              NULL, 0, &argc, argv);
  55.     if (!display)
  56.     {
  57.         printf("%s: can't open display, exiting...\n", argv[0]);
  58.         exit (-1);
  59.     }
  60.     /* Register converters, just in case you are really unlucky !! */
  61.     XmRegisterConverters();
  62.     /* String to unit type doesn't get added !! */
  63.     XtAddConverter ( XmRString, XmRUnitType, XmCvtStringToUnitType, NULL, 0 );
  64.     XtAppAddActions (app_context, colormap_actions,
  65.             XtNumber(colormap_actions));
  66.     create_toplevel_widget ( display, argv[0], argc, argv );
  67.     create_message_box_dialog_widget ( toplevel_widget );
  68.     create_image_file_popup_widget ( toplevel_widget );
  69.     XtRealizeWidget (toplevel_widget);
  70.     XtAppMainLoop (app_context);
  71.     exit (0);
  72. }
  73.  
  74.