home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / osi / isode / vmsisode / vmsisode80_tar.Z / vmsisode80_tar / sockit / gccinclude / x11 / decwdwtwidgetprog.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-04-24  |  41.5 KB  |  1,728 lines

  1. /*  DEC/CMS REPLACEMENT HISTORY, Element DECWDWTWIDGETPROG.H */
  2. /*   8    31-MAR-1988 12:07:33 TREGGIARI "BL7.3 UPDATE" */
  3. /*   7    24-MAR-1988 15:47:04 TREGGIARI "Replace with completely new version" */
  4. /*  *6    27-FEB-1988 18:18:42 GEORGE "Add copyright" */
  5. /*  *5     7-JAN-1988 13:04:06 TREGGIARI "Replace with completely new version" */
  6. /*  *4     5-JAN-1988 15:36:56 TREGGIARI "Replace with completely new version" */
  7. /*  *3    18-DEC-1987 14:06:03 TREGGIARI "Replace with completely new version" */
  8. /*  *2     2-NOV-1987 17:13:57 TREGGIARI "Replace with completely new version" */
  9. /*  *1     2-NOV-1987 14:52:49 ORGOVAN "Initial Entry" */
  10. /*  DEC/CMS REPLACEMENT HISTORY, Element DECWDWTWIDGETPROG.H */
  11. /*
  12. *****************************************************************************
  13. **                                                                          *
  14. **                         COPYRIGHT (c) 1988 BY                            *
  15. **             DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.                *
  16. **               ALL RIGHTS RESERVED                              *
  17. **                                                                          *
  18. **  THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED  *
  19. **  ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH  LICENSE AND WITH THE  *
  20. **  INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR  ANY  OTHER  *
  21. **  COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY  *
  22. **  OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY  *
  23. **  TRANSFERRED.                                                            *
  24. **                                                                          *
  25. **  THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT  NOTICE  *
  26. **  AND  SHOULD  NOT  BE  CONSTRUED  AS  A COMMITMENT BY DIGITAL EQUIPMENT  *
  27. **  CORPORATION.                                                            *
  28. **                                                                          *
  29. **  DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR  RELIABILITY  OF  ITS  *
  30. **  SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.                 *
  31. **                                                                          *
  32. *****************************************************************************
  33. **++
  34. **  FACILITY:
  35. **
  36. **    < to be supplied >
  37. **
  38. **  ABSTRACT:
  39. **
  40. **    < to be supplied >
  41. **
  42. **  ENVIRONMENT:
  43. **
  44. **    < to be supplied >
  45. **
  46. **  MODIFICATION HISTORY:
  47. **
  48. **    < to be supplied >
  49. **
  50. **--
  51. **/
  52.  
  53. /* This include file contains definitions needed by widget developers.  */
  54.  
  55. #ifdef VAXC
  56. #define external globalref
  57. #define externaldef globaldef
  58. #else
  59. #define external extern
  60. #define externaldef 
  61. #endif
  62.  
  63. #define DECHINTS
  64.  
  65. #include <string.h>
  66. #include <ctype.h>
  67. #include <decw$include/Atoms.h>
  68. #include <decw$include/IntrinsicP.h>
  69. #include <decw$include/CoreP.h>
  70. #include <decw$include/CompositeP.h>
  71. #include <decw$include/ConstraintP.h>
  72. #include <decw$include/ShellP.h>
  73. #include <decw$include/VendorP.h>
  74.  
  75. #define WIDGETPROG 1
  76.  
  77.  
  78. typedef struct _DwtTextSourceRec *DwtTextSource;
  79.  
  80. #include <decw$include/DECwDwtApplProg.h>
  81.  
  82.  
  83. /* core class procedure forward declarations */
  84.  
  85. static void Initialize();
  86. static void Realize();
  87. static void Resize();
  88. static void Redisplay();
  89. static Boolean SetValues();
  90. static void ClassInitialize();
  91. static void Destroy();
  92.  
  93.  
  94. /*
  95.  * composite class procedure forward dec's
  96.  */
  97.  
  98. static XtGeometryResult geometry_manager ();
  99. static void  managed_set_changed ();
  100. static void  add_child ();
  101. static void  remove_child ();
  102.  
  103.  
  104. /* 
  105.  * all conversion strings 
  106.  */
  107.  
  108. #define DwtSAlignmentCenter    "alignmentcenter"
  109. #define DwtSAlignmentBeginning    "alignmentbeginning"
  110. #define DwtSAlignmentEnd    "alignmentend"
  111. #define DwtSFontDefault        "helvetica_bold12"
  112. #define DwtSBlack        "Black"
  113. #define DwtSWhite        "White"
  114. #define DwtSTextString        "text"
  115. #define DwtSPixmap        "pixmap"
  116. #define DwtSOne            "1"
  117. #define DwtSFour              "4"
  118. #define DwtSNone        "None"
  119. #define DwtSOpen        "Open"
  120. #define DwtSAcknowledged    "Acknowledged"
  121. #define DwtSFalse        "False"
  122. #define DwtSTrue        "True"
  123. #define DwtSZero            "0"
  124. #define DwtSOrientationVertical        "orientationvertical"
  125. #define DwtSOrientationHorizontal   "orientationhorizontal"
  126. #define DwtSMenuPackingTight        "menupackingtight"
  127. #define DwtSMenuPackingNone        "menupackingnone"
  128. #define DwtSMenuPackingColumn        "menupackingcolumn"
  129. #define DwtSScrollButton1    "ScrollButton1"
  130. #define DwtSScrollButton2    "ScrollButton2"
  131. #define DwtSYes            "Yes"
  132. #define DwtSNo            "No"
  133. #define DwtSCancel        "Cancel"
  134. #define DwtSOk            "Ok"
  135.  
  136.  
  137.  
  138.  
  139. /* macros */
  140.  
  141. #define MIN(x,y)    ((x) < (y) ? (x) : (y))
  142. #define MAX(x,y)    ((x) > (y) ? (x) : (y))
  143.  
  144. #define ASSIGN_MAX(x, y) if ((y) > (x)) x = (y)
  145. #define ASSIGN_MIN(x, y) if ((y) < (x)) x = (y)                         
  146.  
  147. #define MAXHEIGHT    ((1 << 31)-1)
  148. #define MAXWIDTH    ((1 << 31)-1)
  149.  
  150. #define MAXINT        2147483647 /* Biggest number that can fit in a long. */
  151.  
  152.                         /* core access macros, will work */
  153.                         /* with any widget */
  154. #define XtX(w)         ((w)->core.x)
  155. #define XtY(w)         ((w)->core.y)
  156. #define XtWidth(w)     ((w)->core.width)
  157. #define XtHeight(w)     ((w)->core.height)
  158. #define XtBorderWidth(w) ((w)->core.border_width)
  159. #define XtBackground(w)     ((w)->core.background_pixel)
  160. #define XtSensitive(w)     ((w)->core.sensitive) 
  161. #define XtParent(w)     ((w)->core.parent)
  162. #define XtCoreProc(w,proc) ((w)->core.widget_class->core_class.proc)
  163. #define XtParentCoreProc(w,proc) \
  164.         (((w)->core.parent)->core.widget_class->core_class.proc)
  165.  
  166.                         /* composite widget access macros,*/
  167.                         /* will work w/ any composite */
  168.  
  169. #define XtNumChildren(w) ((w)->composite.num_children)
  170. #define XtChildren(w)     ((w)->composite.children)
  171.  
  172. #define XtCompositeProc(w, proc) \
  173.     (((CompositeWidgetClass) ((w)->core.widget_class))->composite_class.proc)
  174.  
  175. #define XtParentCompositeProc(w, proc) \
  176.     (((CompositeWidgetClass) (((w)->core.parent)->core.widget_class)) \
  177.     ->composite_class.proc)
  178.  
  179.  
  180.  
  181. /*
  182.  * The DECtoolkit internal callback structure which maps the
  183.  * external representation to the intrinsics internal representation
  184.  */
  185. typedef struct
  186. {
  187.     XtCallbackList    ecallback;    /* Xtoolkit callback list */
  188. }
  189.     DwtCallbackStruct, *DwtCallbackStructPtr;
  190.  
  191.  
  192.  
  193.  
  194. /*-------------------*/
  195. /* dwt common widget */
  196. /*-------------------*/
  197.  
  198. typedef struct {
  199.     VoidProc    optimal_size;    /* procedure that returns optimal window box */
  200. } DwtCommonClassPart;
  201.  
  202.  
  203. typedef struct _DwtCommonClassRec {
  204.     CoreClassPart       core_class;
  205.     CompositeClassPart  composite_class;
  206.     DwtCommonClassPart  dwtcommon_class;
  207. } DwtCommonClassRec, *DwtCommonClass;
  208.  
  209. typedef struct {
  210.     XFontStruct        *font_struct;
  211.     Pixel            foreground_pixel;
  212.     DwtCallbackStruct    help_callback;
  213.     Pixmap            pixmap;
  214.     int            propagate_colors;
  215.     Pixel            highlight_pixel;
  216.     Pixmap            highlight_pixmap;
  217.     Pixmap            gray_pixmap;
  218.     GC            foreground_gc;
  219.     GC            background_gc;
  220.     GC            highlight_gc;
  221.     GC            slider_gc;
  222.     Pixel            slider_pixel;
  223.     Pixmap            slider_pixmap;
  224.     int            space4;
  225. } DwtCommonPart;
  226.  
  227. typedef struct {
  228.     CorePart        core;
  229.     CompositePart     composite;
  230.     DwtCommonPart    dwtcommon;
  231. } DwtCommonWidgetRec, *DwtCommonWidget;
  232.  
  233. #ifndef DWTCOMMON
  234. external DwtCommonClass    dwtcommonwidgetclass;
  235. external DwtCommonClassRec dwtcommonwidgetclassrec;
  236. #endif
  237.  
  238.  
  239. /*--------------*/
  240. /* text widget  */
  241. /*--------------*/
  242.  
  243. typedef struct _InputRec *Input;
  244. typedef struct _OutputRec *Output;
  245. typedef struct _TextDataRec *TextData;
  246. typedef struct _LineTableExtraRec *LineTableExtra;
  247.  
  248. #define TEXTWIDGETCLASS    "Text"    /* Resource class for the text widget. */
  249.  
  250. typedef struct {
  251.     int        notused;
  252. } TextClassPart;
  253.  
  254. typedef struct _TextClassRec {
  255.     CoreClassPart core_class;
  256.     CompositeClassPart composite_class;
  257.     TextClassPart text_class;
  258. } TextClassRec, *TextClass;
  259.  
  260.  
  261. typedef struct _TextRec {
  262.     CorePart    core;
  263.     CompositePart composite;
  264.     Widget innerwidget;            /* Pointer to widget which actually */
  265.                     /* contains text (may be same or */
  266.                     /* different from this record).  */
  267.     DwtTextSource source;        /* The source for this widget. */
  268.     DwtCallbackStruct callback;        /* Basic callback. */
  269.     DwtCallbackStruct help_callback;    /* Help callback. */
  270.     DwtCallbackStruct focus_callback;    /* Focus callback. */
  271.     Output output;            /* The output portion. */
  272.     Input input;            /* The input portion. */
  273.     TextData text;            /* The main text portion. */
  274. } TextWidgetRec, *TextWidget;
  275.  
  276.  
  277. #ifndef TEXT
  278. external WidgetClass       textwidgetclass;
  279. external TextClassRec      textwidgetclassrec;
  280. #endif
  281.  
  282. #ifndef STEXT
  283. external TextClassRec      stextwidgetclassrec;
  284. external WidgetClass       stextwidgetclass;
  285. #endif
  286.  
  287.  
  288. /*--------------*/
  289. /* label widget */
  290. /*--------------*/
  291.  
  292. /*
  293.  * label internal struct to hold broken up lines of the label
  294.  */
  295.  
  296. typedef struct _Label_Line
  297. {
  298.     char    *text;            /* ptr to actual chars */
  299.     int         pixel_width;        /* current width of line, in pixels */
  300.     int         reserved[5];
  301. } DwtLabelRec, *DwtLabelArray;
  302.  
  303.  
  304.  
  305.  
  306. typedef struct {            /* label class record */
  307.  
  308.     int        dummy;
  309. } LabelClassPart;
  310.  
  311.  
  312. typedef struct _LabelClassRec {        /* label full class record */
  313.  
  314.     CoreClassPart        core_class;
  315.     CompositeClassPart    composite_class;
  316.         DwtCommonClassPart      dwtcommon_class;
  317.     LabelClassPart        label_class;
  318. } LabelClassRec, *LabelClass;
  319.  
  320.  
  321.  
  322. typedef struct {            /* label widget instance record */
  323.     char        *label;
  324.     DwtLabelArray   label_array;
  325.      int        label_type;
  326.     int        label_len;
  327.  
  328.     int        alignment;
  329.  
  330.     Dimension    margin_height;        /* margin around widget */
  331.     Dimension    margin_width;
  332.  
  333.     int        margin_left;        /* additional margins on */
  334.     int        margin_right;        /* each side of widget */
  335.     int        margin_top;        /* text (or pixmap) is placed */
  336.     int        margin_bottom;        /* inside the margins */
  337.  
  338.     int        conform_to_text;    /* T/F, if T we always try to */
  339.                         /* be big enough for our text */
  340.                         /* F - up to somebody else */
  341.  
  342.     unsigned int    drawing_mode;
  343.     XImage        *image;
  344.     Boolean        selection_mode;
  345.     Boolean        text16;
  346.  
  347.     int        reserved[4];
  348. } LabelPart;
  349.  
  350.  
  351.  
  352. typedef struct _LabelRec {        /* label full instance record */
  353.     CorePart    core;
  354.     CompositePart   composite;
  355.         DwtCommonPart   dwtcommon;
  356.     LabelPart    label;
  357. } LabelRec, *LabelWidget;
  358.  
  359. #ifndef LABEL
  360. external LabelClassRec       labelwidgetclassrec;
  361. external LabelClass          labelwidgetclass;
  362. #endif
  363.  
  364.  
  365.  
  366. /*-------------------*/
  367. /* pushbutton widget */
  368. /*-------------------*/
  369.  
  370. /*
  371.  * define the attributes (or things it does) that a pushbutton class has
  372.  * that a label class doesn't
  373.  */
  374.  
  375. typedef struct 
  376. {
  377.     int                moremumble;        /* not much */
  378. }
  379.     PushbuttonClassPart;
  380.  
  381.  
  382. /*
  383.  * now define the actual pushbutton widget data struct
  384.  */
  385.  
  386. typedef struct _PushbuttonClassRec
  387. {
  388.         CoreClassPart        core_class;        /* basic widget */
  389.     CompositeClassPart  composite_class;
  390.         DwtCommonClassPart  dwtcommon_class;
  391.         LabelClassPart        label_class;        /* label widget */
  392.         PushbuttonClassPart pushbutton_class;    /* pushbutton specific */
  393.     PushbuttonClassRec, *PushbuttonClass;
  394.  
  395. /*
  396.  * define the additional data a pushbutton class widget has that a
  397.  * label widget doesn't
  398.  */
  399.  
  400. typedef struct
  401. {
  402.     Boolean            bordHighlight;    /* border highlighted? */
  403.     Boolean            fillHighlight;    /* fill highlighted? */
  404.     Boolean            armed;        /* armed state indicator */
  405.     DwtCallbackStruct        activate_callback,    /* button fired off callback */
  406.                 arm_callback,    /* button now armed callback */
  407.                 disarm_callback;    /* button disarmed call back */
  408.     PushbuttonPart;
  409.  
  410.  
  411.  
  412.  
  413. typedef struct _PushbuttonRec
  414. {
  415.     CorePart            core;
  416.     CompositePart        composite;
  417.     DwtCommonPart        dwtcommon;
  418.     LabelPart            label;
  419.     PushbuttonPart        pushbutton;
  420.     PushbuttonRec, *PushbuttonWidget;
  421.  
  422. #ifndef PUSHBUTTON
  423. external PushbuttonClassRec pushbuttonwidgetclassrec;
  424. external PushbuttonClass    pushbuttonwidgetclass;
  425. #endif
  426.  
  427.  
  428.  
  429. /*---------------------*/
  430. /* togglebutton widget */
  431. /*---------------------*/
  432.  
  433. /*
  434.  * define the attributes (or things it does) that a togglebutton class has
  435.  * that a label class doesn't
  436.  */
  437.  
  438. typedef struct 
  439. {
  440.     int                moremumble;        /* not much */
  441. }
  442.     TogglebuttonClassPart;
  443.  
  444.  
  445. /*
  446.  * now define the actual togglebutton widget data struct
  447.  */
  448.  
  449. typedef struct _TogglebuttonClassRec
  450. {
  451.     CoreClassPart        core_class;        /* basic widget */
  452.     CompositeClassPart        composite_class;
  453.     DwtCommonClassPart        dwtcommon_class;
  454.     LabelClassPart        label_class;        /* label widget */
  455.     TogglebuttonClassPart   togglebutton_class; /* togglebutton specific */
  456.     TogglebuttonClassRec, *TogglebuttonClass;
  457.  
  458. /*
  459.  * define the additional data a togglebutton class widget has that a
  460.  * label widget doesn't
  461.  */
  462.  
  463. typedef struct
  464. {
  465.     Boolean            armed;        /* T/F, for armed state */
  466.  
  467.     unsigned int        value;        /* state of toggle button */
  468.  
  469.     int                spacing;        /* pixels between indicator */
  470.                         /* and the label */
  471.  
  472.     int                shape;        /* indicator shape, square or */
  473.                         /* oval */
  474.  
  475.     unsigned int        visibleWhenOff;    /* T/F, for indicator */
  476.  
  477.     Boolean            indicator_bdr_highlight;
  478.                         /* T/F, for indicator border */
  479.                         /* highlighting */
  480.  
  481.     int                indicator_x,    /* indicator location */
  482.                     indicator_y;
  483.  
  484.     int                indicator_width;    /* indicator size */
  485.     int                indicator_height;
  486.  
  487.     DwtCallbackStruct    value_change_callback,    /* button changed callback */
  488.             arm_callback,        /* is now armed callback */
  489.             disarm_callback;    /* is now disarmed callback */
  490.  
  491.     Pixmap            pixmap_on,        /* these two are the pixmaps */
  492.                 pixmap_off;        /* which are used instead */
  493.                         /* of text */
  494.     TogglebuttonPart;
  495.  
  496.  
  497.  
  498.  
  499. typedef struct _TogglebuttonRec
  500. {
  501.     CorePart            core;
  502.     CompositePart        composite;
  503.     DwtCommonPart        dwtcommon;
  504.     LabelPart            label;
  505.     TogglebuttonPart        togglebutton;
  506.     TogglebuttonRec, *TogglebuttonWidget;
  507.  
  508. #ifndef TOGGLEBUTTON
  509. external TogglebuttonClassRec togglebuttonwidgetclassrec;
  510. external TogglebuttonClass    togglebuttonwidgetclass;
  511. #endif
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518. /*************************************************************************
  519.  *
  520.  * Hidden Shell widget (Same as Intrinsics shell, except for managechanged
  521.  *  semantics
  522.  */
  523.  
  524. /*
  525.  * define the additional data a shell class widget has that a
  526.  * shell widget doesn't
  527.  */
  528.  
  529. typedef struct
  530. {
  531.     XtGrabKind            grabkind;
  532.     HiddenShellPart;
  533.  
  534. /*
  535.  * now define the actual hidden shell widget data struct
  536.  */
  537.  
  538. typedef struct 
  539. {
  540.     CorePart            core;        /* basic widget */
  541.     CompositePart        composite;        /* composite specific data */
  542.     ShellPart            shell;        /* shell specific data */
  543.     WMShellPart            wm;
  544.     VendorShellPart        vendor;
  545.     TopLevelShellPart        topLevel;
  546.     HiddenShellPart        hiddenshell;    /* hidden shell specific */
  547.     HiddenShellWidgetRec, *HiddenShellWidget;
  548.  
  549. /*
  550.  * define the attributes (or things it does) that a hidden shell class has
  551.  * that a shell class doesn't
  552.  */
  553.  
  554. typedef struct 
  555. {
  556.     int                mumble;
  557. }
  558.     HiddenShellClassPart;
  559.  
  560.  
  561. typedef struct _HiddenShellClassRec 
  562. {
  563.     CoreClassPart        core_class;
  564.     CompositeClassPart        composite_class;
  565.     ShellClassPart        shell_class;
  566.     WMShellClassPart        wm_shell_class;
  567.     VendorShellClassPart    vendor_shell_class;
  568.     TopLevelShellClassPart  top_level_shell_class;
  569.     HiddenShellClassPart    hidden_shell_class;
  570.     HiddenShellClassRec, *HiddenShellClass;
  571.  
  572. #ifndef HIDDENSHELL
  573. external HiddenShellClassRec  hiddenshellwidgetclassrec;
  574. external HiddenShellClass     hiddenshellwidgetclass;
  575. #endif
  576.  
  577.  
  578.  
  579.  
  580.  
  581. /*************************************************************************
  582.  *
  583.  * dialog box widget
  584.  */
  585.  
  586.  
  587. /*
  588.  * define the additional data a dialog class widget has that a
  589.  * composite widget doesn't
  590.  */
  591.  
  592. typedef struct
  593. {
  594.     int                title_type;        /* type of title */
  595.     char           *title;        /* title of dialog window */
  596.  
  597.     int                style;        /* type of dialog box */
  598.  
  599.     int                defaultposition;    /* T/F, appear centered */
  600.                         /* in parent's window */
  601.  
  602.     Widget            current_focus;    /* child with the input focus */
  603.  
  604.     int                margin_width,    /* these are white space left */
  605.                 margin_height;    /* around bottom and right of */
  606.                         /* dialog widget */
  607.  
  608.     Widget            shell;        /* Shell widget for modal and */
  609.                         /* modeless style */
  610.  
  611.     Widget            default_button;    /* Pushbutton widget for the */
  612.                         /*  default push button */
  613.  
  614.     Widget            cancel_button;    /* Pushbutton widget for the */
  615.                         /* cancel push button */
  616.  
  617.     DwtCallbackStruct        help_callback,    /* help callback */
  618.                 select_callback,    /* widget editor callback */
  619.                 map_callback,    /* about to be mapped */
  620.                 unmap_callback,    /* just been unmapped */
  621.                 focus_callback;    /* grabbed input focus */
  622.  
  623.     XtTranslations        texttranslations;    /* translations merged into */
  624.                         /* text fields */
  625.  
  626.     int                units;        /* font or pixel positioning */
  627.                         /* for our children */
  628.  
  629.     XFontStruct           *font_struct;    /* font to use if we are */
  630.                         /* doing font positioning */
  631.  
  632.     float            scale_x,        /* pixels per font unit */
  633.                 scale_y;
  634.  
  635.     int                auto_unmanage;    /* T/F automatically unmanage */
  636.                         /* a modal dialog box */
  637.  
  638.     DialogPart;
  639.  
  640.  
  641.  
  642. /*
  643.  * now define the actual dialog widget data struct
  644.  */
  645.  
  646. typedef struct 
  647. {
  648.     CorePart            core;        /* basic widget */
  649.     CompositePart        composite;        /* composite specific data */
  650.     ConstraintPart        constraint;
  651.     DialogPart            dialog;        /* dialog specific */
  652.     DialogWidgetRec, *DialogWidget;
  653.  
  654. /*
  655.  * define the attributes (or things it does) that a dialog class has
  656.  * that a composite class doesn't
  657.  */
  658.  
  659. typedef struct 
  660. {
  661.     int                mumble;        /* nothing special */
  662. }
  663.     DialogClassPart;
  664.  
  665.  
  666. typedef struct _DialogClassRec 
  667. {
  668.     CoreClassPart        core_class;
  669.     CompositeClassPart        composite_class;
  670.     ConstraintClassPart        constraint_class;
  671.     DialogClassPart        dialog_class;
  672.     DialogClassRec, *DialogClass;
  673.  
  674. #ifndef DIALOG
  675. external DialogClassRec     dialogwidgetclassrec;
  676. external DialogClass        dialogwidgetclass;
  677. #endif
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684. /**************************************************************************
  685.  *
  686.  * menu popup shell widget and class definition
  687.  */
  688.  
  689. typedef struct 
  690. {
  691.     int                mumble;
  692. }
  693.     MenuPopupPart;
  694.  
  695.  
  696. /*
  697.  * now define the actual popup menu widget data struct
  698.  */
  699.  
  700. typedef  struct 
  701. {
  702.     CorePart            core;
  703.     CompositePart        composite;
  704.     ShellPart            shell;
  705.     OverrideShellPart        override;
  706.     MenuPopupPart        popup;
  707.     MenuPopupRec, *MenuPopupWidget;
  708.  
  709.  
  710.  
  711.  
  712. /*
  713.  * define the attributes (or things it does) that a popup menu class has
  714.  * that a shell widget class doesn't 
  715.  */
  716.  
  717. typedef struct 
  718. {
  719.     int                mumble;
  720.     MenuPopupClassPart;
  721.  
  722.  
  723.  
  724. typedef struct  
  725. {
  726.     CoreClassPart        core_class;
  727.     CompositeClassPart        composite_class;
  728.     ShellClassPart        shell_class;
  729.     OverrideShellClassPart  override_shell_class;
  730.     MenuPopupClassPart        popup_part;
  731.     MenuPopupClassRec, *MenuPopupWidgetClass;
  732.  
  733.  
  734.  
  735.  
  736.  
  737. #ifndef POPUPMENU
  738. external MenuPopupClassRec  menupopupClassRec;
  739. external WidgetClass        menupopupWidgetClass;
  740. #endif
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747. /**************************************************************************
  748.  * 
  749.  * menu widget data and class definitions, menu is a subclass of dialog
  750.  */
  751.  
  752. /*  
  753.  * define the data fields which a menu widget has that a dialog widget
  754.  * does not
  755.  */
  756.  
  757.  
  758. typedef    struct 
  759. {
  760.     int            type;        /* temporary: diff between menu/bar */
  761.  
  762.     int            orientation;    /* horizontal or vertical */
  763.  
  764.                     /* next two indicate how the widget */
  765.                     /* responds to size changes if there */
  766.                     /* is no geo mgr.  If true then the */
  767.                     /* dimension is never changed.  Set */
  768.                     /* to true if dimension is spec'd */
  769.                     /* at create time */
  770.     int            fixed_width;
  771.     int            fixed_height;
  772.  
  773.     Dimension        margin_height;    /* margin around inside of widget */
  774.     Dimension        margin_width;
  775.  
  776.  
  777.     int            spacing;    /* pixels between entries */
  778.  
  779.     int            entry_border;    /* size of entry borders */
  780.  
  781.                     /* next three only used w/ menubars */
  782.  
  783.     int            help_enabled;    /* do we show a help pushbutton */
  784.  
  785.     Widget        help_pushbutton;/* ptr to help pushbutton widget */
  786.  
  787.     Widget        pulldown;    /* if this menu is pulled down by a */
  788.                     /* pulldown widget this will point */
  789.                     /* at the pulldown.  needed to go */
  790.                     /* up the cascade */
  791.  
  792.     int            armed;        /* controls whether pulldowns work */
  793.                     /* or not, button down in any part of */
  794.                     /* the menubar arms it */
  795.  
  796.                     /* next is only valid for popup menus */
  797.  
  798.     int            popup_memory;    /* keep a vertical bias for use w/ */
  799.                     /* popup menus so that the menu will */
  800.                     /* popup with the last item selected */
  801.                     /* underneath the mouse */
  802.  
  803.                     /* next two only used w/ option menus */
  804.                     /* they are really only temporary */
  805.                     /* since the data is passed off to */
  806.                     /* the pulldown widget which is */
  807.                     /* automatically built */
  808.  
  809.     char           *option_label;    /* label for option menu pulldown */
  810.  
  811.     Widget        option_submenu; /* which submenu to pulldown */
  812.  
  813.  
  814.     XtWidgetGeometry   *boxes;        /* when doing menu layouts is an */
  815.                     /* array of geo req's to make it easy */
  816.  
  817.  
  818.     int            adjust_margin;    /* T/F, indicating if we should force */
  819.                     /* all subwidgets to have similar */
  820.                     /* margins */
  821.  
  822.  
  823.     int            do_alignment;    /* T/F, do we force alignment on all */
  824.                     /* our children */
  825.  
  826.     int            entry_alignment; /* type of label alignment */
  827.                     /* our children should have */
  828.  
  829.                     /* next two are layout, Tight is the */
  830.                     /* standard menubar packing.  Columns */
  831.                     /* is radio box style, orientation */
  832.                     /* determines if it is column or row */
  833.                     /* major, Vert = column major */
  834.  
  835.     int            packing;    /* entry packing (layout) style */
  836.  
  837.     int            num_columns;    /* if columnar packing this is how */
  838.                     /* many columns to use */
  839.  
  840.  
  841.     int            radio;        /* T/F, do we do the toggle button */
  842.                     /* 'only-one-down' enforcement */
  843.  
  844.     int            radio_one;    /* T/F, must have one radio button */
  845.                     /* set to on */
  846.  
  847.  
  848.     int            homogeneous;    /* T/F, do we only allow a single */
  849.                     /* class of children */
  850.  
  851.     WidgetClass        entry_class;    /* if homogeneous, what class */
  852.  
  853.     DwtCallbackStruct    entry_callback,    /* a child fired off */
  854.             select_callback,/* widget editor callback */
  855.             map_callback,    /* about to be mapped call back */
  856.             unmap_callback;    /* about to be unmapped call back */
  857. }
  858.     MenuPart;
  859.  
  860.  
  861.  
  862. /*
  863.  * now define the actual menu widget data struct
  864.  */
  865.  
  866. typedef struct 
  867. {
  868.     CorePart        core;        /* basic widget */
  869.     CompositePart   composite;        /* composite specific data */
  870.     DwtCommonPart   dwtcommon;        /* decw common data */
  871.     MenuPart        menu;        /* menu special */
  872.     MenuWidgetRec, *MenuWidget;
  873.  
  874.  
  875.  
  876. /*
  877.  * define the attributes (or things it does) that a menu class has
  878.  * that a dialog class doesn't
  879.  */
  880.  
  881. typedef struct 
  882. {
  883.     VoidProc        position;        /* proc to compute the position of */
  884.                     /* a popup/pulldown menu, should */
  885.                     /* be called just before managing */
  886.                     /* the menu.  Calling params are the */
  887.                     /* menu to position and for popup */
  888.                     /* menus, a pointer to an XEvent. */
  889.  
  890.     VoidProc        preferred_size;    /* proc to find out what size a menu */
  891.                     /* wants to be.  Called with the menu */
  892.                     /* and ptr to width, ptr to height */
  893.                     /* Either width or height (or both) */
  894.                     /* can be 0, this is interpreted as */
  895.                     /* unrestricted.  Returns size needed */
  896.                     /* to display menu */
  897. }
  898.     MenuClassPart;
  899.  
  900.  
  901.  
  902.  
  903. typedef struct _MenuClassRec 
  904. {
  905.     CoreClassPart    core_class;
  906.     CompositeClassPart    composite_class;
  907.     DwtCommonClassPart    dwtcommon_class;
  908.     MenuClassPart    menu_class;
  909.     MenuClassRec, *MenuWidgetClass;
  910.  
  911.  
  912. #ifndef MENU
  913. external MenuClassRec     menuwidgetclassrec;
  914. external MenuWidgetClass  menuwidgetclass;
  915. #endif
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924. /************************************************************************
  925.  *
  926.  * define the pulldown menu entry widget.  this is a subclass of label widget
  927.  * and almost a subclass of pushbutton.  however, since it has a highlight
  928.  * state that is not tied to operator events it is easier to make it a
  929.  * subclass of label rather than pushbutton
  930.  */
  931.  
  932.  
  933. /*
  934.  * define the stuff that only appears in pulldown widgets
  935.  */
  936.  
  937. typedef    struct 
  938. {
  939.     DwtCallbackStruct    activate_callback,    /* widget fired callback */
  940.             select_callback,    /* widget editor callback */
  941.             pulling_callback;    /* optional callback, called */
  942.                         /* when the menu is about */
  943.                         /* to be pulled down */
  944.  
  945.     int            hot_spot;        /* obsolete */
  946.  
  947.     XtTranslations    hot_events;        /* hot spot translations */
  948.     XtActionList    hot_actions;        /* hot spot action table */
  949.  
  950.     Widget        hot_widget;        /* subwidget for hotspot */
  951.  
  952.     int            pulled_down;        /* T/F, state of our submenu */
  953.  
  954.     Widget        submenu;        /* the menu to pull down */
  955.  
  956.     Pixmap        hot_pixmap;        /* pixmap for the hot spot */
  957.     PulldownPart;
  958.  
  959.  
  960.  
  961.  
  962. /*
  963.  * now define the actual pulldown widget data struct
  964.  */
  965.  
  966. typedef struct 
  967. {
  968.     CorePart            core;
  969.     CompositePart        composite;
  970.     DwtCommonPart        dwtcommon;
  971.     LabelPart            label;
  972.     PulldownPart        pulldown;
  973.     PulldownWidgetRec, *PulldownWidget;
  974.  
  975.  
  976.  
  977.  
  978.  
  979. /*
  980.  * define the attributes (or things it does) that a pulldown class has
  981.  * that a label class doesn't
  982.  */
  983.  
  984. typedef struct 
  985. {
  986.     int            mumble;        /* nothing special */
  987. }
  988.     PulldownClassPart;
  989.  
  990.  
  991.  
  992.  
  993. typedef struct _PulldownClassRec 
  994. {
  995.     CoreClassPart        core_class;        /* basic widget */
  996.     CompositeClassPart        composite_class;    /* Composite widget */
  997.     DwtCommonClassPart        dwtcommon_class;    /* Decwindow common */
  998.     LabelClassPart        label_class;        /* label widget */
  999.     PulldownClassPart        pulldown_class;    /* pulldown specific */
  1000.     PulldownClassRec, *PulldownWidgetClass;
  1001.  
  1002.  
  1003. #ifndef PULLDOWN
  1004. external PulldownClassRec     pulldownwidgetclassrec;
  1005. external PulldownWidgetClass  pulldownwidgetclass;
  1006. #endif
  1007.  
  1008.  
  1009. /*------------*/
  1010. /* scroll bar */
  1011. /*------------*/
  1012.  
  1013.  
  1014. typedef struct
  1015. {
  1016.  
  1017.     Widget            button1;
  1018.     Widget            button2;
  1019.     int               *translations1;
  1020.     int               *translations2;
  1021.     Pixmap            button1_pixmap;
  1022.     Pixmap            button2_pixmap;
  1023.     int                orientation;
  1024.     int                shown;        /* fraction shown in window */
  1025.     int                inc;        /* what increment of the */
  1026.                         /*scroll buttons are */
  1027.     int                pageinc;        /* What the increment of /*
  1028.                         /* the page are */
  1029.     int                value;        /* current value */
  1030.     int                maxvalue;        /* max value returned */
  1031.     int                minvalue;        /* min value returned */
  1032.     int                oldx1, oldx2;
  1033.     int                oldy1, oldy2;    /* last thumb position */
  1034.     Boolean            thumb_redraw;    /* redraw entire thumb flag */
  1035.     Boolean            got_thumb;        /* true if thumb is grabbed */
  1036.     Boolean            drag_start;        /* denotes drag starting */
  1037.     Boolean            drag_end;        /* denotes drag ending */
  1038.     Boolean            pixmap_flag;    /* bkgrnd pixmap is scroll's */
  1039.     int                dx1, dx2, dy1, dy2;    /* origional pos of the */
  1040.                         /*  thumb during drab */
  1041.     int                grabx, graby;    /* position of grab */
  1042.     int                dvalue;        /* original pos during grab */
  1043.     int                notify;        /* notify flag */
  1044.     DwtCallbackStruct        unit_inc_callback,
  1045.                 unit_dec_callback,
  1046.                 page_inc_callback,
  1047.                 page_dec_callback,
  1048.                 drag_callback,
  1049.                 to_bottom_callback,
  1050.                 to_top_callback,
  1051.                 callback,
  1052.                 to_position_callback;
  1053.  
  1054. } ScrollPart;
  1055.  
  1056.  
  1057. typedef struct 
  1058. {
  1059.     CorePart            core;        /* basic widget */
  1060.     CompositePart        composite;        /* composite specific data */
  1061.     DwtCommonPart        dwtcommon;
  1062.     ScrollPart            scroll;
  1063.     ScrollWidgetRec, *ScrollWidget;
  1064.  
  1065. typedef struct
  1066. {
  1067.     int    dummy;
  1068. } ScrollClassPart;
  1069.  
  1070. typedef struct _ScrollClassRec 
  1071. {
  1072.     CoreClassPart        core_class;
  1073.     CompositeClassPart        composite_class;
  1074.     DwtCommonClassPart        dwtcommon_class;
  1075.     ScrollClassPart        scroll_class;
  1076.     ScrollClassRec, *ScrollClass;
  1077.  
  1078.  
  1079. #ifndef SCROLL
  1080. external ScrollClassRec     scrollwidgetclassrec;
  1081. external ScrollClass        scrollwidgetclass;
  1082. #endif
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089. /**************************************************************************
  1090.  * 
  1091.  * main window widget data and class definitions
  1092.  */
  1093.  
  1094. typedef    struct 
  1095. {
  1096.     Widget            command_window,
  1097.                 work_window,
  1098.                 menu_bar,
  1099.                 h_scroll,
  1100.                 v_scroll;
  1101.     MainWindowPart;
  1102.  
  1103. /*
  1104.  * now define the actual main window widget data structure
  1105.  */
  1106.  
  1107. typedef struct 
  1108. {
  1109.     CorePart            core;        /* basic widget */
  1110.     CompositePart        composite;        /* composite specific data */
  1111.     DwtCommonPart        dwtcommon;
  1112.     MainWindowPart        main_window;    /* main specific */
  1113.     MainWindowWidgetRec, * MainWindowWidget;
  1114.  
  1115. typedef struct 
  1116. {
  1117.     int                mumble;        /* nothing special */
  1118.     MainWindowClassPart;
  1119.  
  1120. typedef struct _MainWindowClassRec 
  1121. {
  1122.     CoreClassPart        core_class;
  1123.     CompositeClassPart        composite_class;
  1124.     DwtCommonClassPart        dwtcommon_class;
  1125.     MainWindowClassPart        main_window_class;
  1126.     MainWindowClassRec, * MainWindowWidgetClass;
  1127.  
  1128.  
  1129. #ifndef MAIN
  1130. external MainWindowClassRec     mainwindowwidgetclassrec;
  1131. external MainWindowWidgetClass  mainwindowwidgetclass;
  1132. #endif
  1133.  
  1134.  
  1135.  
  1136. /*************************************************************************
  1137.  *
  1138.  * message box widget
  1139.  */
  1140.  
  1141. /*
  1142.  * define the additional data a message class widget has that a
  1143.  * composite widget doesn't
  1144.  */
  1145.  
  1146. typedef struct
  1147. {
  1148.     int                type;
  1149.     char           *label;
  1150.     int                labeltype;
  1151.  
  1152.     char           *yeslabel;
  1153.     int                yeslabeltype;
  1154.     DwtCallbackStruct        yes_callback;
  1155.  
  1156.     char           *nolabel;
  1157.     int                nolabeltype;
  1158.     DwtCallbackStruct        no_callback;
  1159.  
  1160.     char           *cancellabel;
  1161.     int                cancellabeltype;
  1162.     DwtCallbackStruct        cancel_callback;
  1163.  
  1164.     char           *oklabel;
  1165.     int                oklabeltype;
  1166.  
  1167.     Widget            iconwid;
  1168.  
  1169.     Widget            labelwid,
  1170.                 yeslabelwid,
  1171.                 nolabelwid,
  1172.                 cancellabelwid;
  1173.  
  1174.     int                default_pb;
  1175.     MessagePart;
  1176.  
  1177. /*
  1178.  * now define the actual message widget data struct
  1179.  */
  1180.  
  1181. typedef struct 
  1182. {
  1183.     CorePart            core;        /* basic widget */
  1184.     CompositePart        composite;        /* composite specific data */
  1185.     ConstraintPart        constraint;
  1186.     DialogPart            dialog;        /* dialog specific */
  1187.     MessagePart            message;        /* message specific */
  1188.     MessageWidgetRec, *MessageWidget;
  1189.  
  1190. /*
  1191.  * define the attributes (or things it does) that a message class has
  1192.  * that a composite class doesn't
  1193.  */
  1194.  
  1195. typedef struct 
  1196. {
  1197.     int                mumble;        /* nothing special */
  1198. }
  1199.     MessageClassPart;
  1200.  
  1201.  
  1202. typedef struct _MessageClassRec 
  1203. {
  1204.     CoreClassPart        core_class;
  1205.     CompositeClassPart        composite_class;
  1206.     ConstraintClassPart        constraint_class;
  1207.     DialogClassPart        dialog_class;
  1208.     MessageClassPart        message_class;
  1209.     MessageClassRec, *MessageClass;
  1210.  
  1211. #ifndef MESSAGE
  1212. external MessageClassRec    messagewidgetclassrec;
  1213. external MessageClass        messagewidgetclass;
  1214. #endif
  1215.  
  1216.  
  1217. /*************************************************************************
  1218.  *
  1219.  * window widget
  1220.  */
  1221.  
  1222. typedef struct 
  1223. {
  1224.     DwtCallbackStruct expose_callback;
  1225.     WindowPart;
  1226.  
  1227. typedef struct 
  1228. {
  1229.     CorePart            core;        /* basic widget */
  1230.     CompositePart        composite;        /* composite specific data */
  1231.     DwtCommonPart        dwtcommon;
  1232.     WindowPart            window;
  1233.     WindowWidgetRec, *WindowWidget;
  1234.  
  1235.  
  1236. typedef struct
  1237. {
  1238.     int    dummy;
  1239. }
  1240.     WindowClassPart;
  1241.  
  1242.  
  1243. typedef struct _WindowClassRec 
  1244. {
  1245.     CoreClassPart        core_class;
  1246.     CompositeClassPart        composite_class;
  1247.     DwtCommonClassPart        dwtcommon_class;
  1248.     WindowClassPart        window_class;
  1249.     WindowClassRec, *WindowClass;
  1250.  
  1251.  
  1252. #ifndef WINDOW
  1253. external WindowClassRec     windowwidgetclassrec;
  1254. external WindowClass        windowwidgetclass;
  1255. #endif
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262. /*************************************************************************
  1263.  *
  1264.  * scroll window widget
  1265.  */
  1266.  
  1267. typedef struct {
  1268.  
  1269.     Widget  hscroll;
  1270.     Widget  vscroll;
  1271.     Widget  wregion;
  1272.  
  1273. } ScrollWindowPart;
  1274.  
  1275. typedef struct 
  1276. {
  1277.     CorePart         core;        /* basic widget */
  1278.     CompositePart    composite;        /* composite specific data */
  1279.     DwtCommonPart    dwtcommon;
  1280.     ScrollWindowPart scrollwindow;
  1281.     ScrollWindowWidgetRec, *ScrollWindowWidget;
  1282.  
  1283. typedef struct
  1284. {
  1285.     int    dummy;
  1286. } ScrollWindowClassPart;
  1287.  
  1288. typedef struct _ScrollWindowClassRec 
  1289. {
  1290.     CoreClassPart      core_class;
  1291.     CompositeClassPart      composite_class;
  1292.     DwtCommonClassPart    dwtcommon_class;
  1293.     ScrollWindowClassPart scrollwindow_class;
  1294.     ScrollWindowClassRec, *ScrollWindowClass;
  1295.  
  1296.  
  1297. #ifndef SCROLLWINDOW
  1298. external ScrollWindowClassRec     scrollwindowwidgetclassrec;
  1299. external ScrollWindowClass        scrollwindowwidgetclass;
  1300. #endif
  1301.  
  1302.  
  1303.  
  1304. /*-----------------*/
  1305. /* list box widget */
  1306. /*-----------------*/
  1307.  
  1308. /*
  1309.  * define the attributes (or things it does) that a list box class has
  1310.  * that a scroll window class doesn't                            
  1311.  */
  1312.  
  1313. typedef struct 
  1314. {
  1315.     int            moremumble;        /* not much */
  1316. }
  1317.     ListBoxClassPart;
  1318.  
  1319.  
  1320. /*
  1321.  * now define the actual list box widget data struct
  1322.  */
  1323.  
  1324. typedef struct _ListBoxClassRec
  1325. {
  1326.         CoreClassPart            core_class;        /* basic widget */
  1327.     CompositeClassPart      composite_class;
  1328.         DwtCommonClassPart        dwtcommon_class;
  1329.         ScrollWindowClassPart    scrollwindow_class;     /* scrollwindow widget */
  1330.         ListBoxClassPart     listbox_class;        /* listbox specific */
  1331.     ListBoxClassRec, *ListBoxClass;
  1332.  
  1333. /*
  1334.  * define the additional data a listbox class widget has that a
  1335.  * scrollwindow widget doesn't
  1336.  */
  1337.  
  1338. typedef struct
  1339. {
  1340.     MenuWidget        menu;            /* menu used in list box */
  1341.     int         vis_menu_width;            /* visiblbe menu width */
  1342.     int         vis_menu_height;           /* visible menu height */
  1343.     ScrollWidget    scrollbar;        /* scroll bar used in list box */
  1344.     ScrollWidget    hscrollbar;        /* scroll bar used in list box */
  1345.     int            hscroll_height;        /* horiz scroll bar height */
  1346.     char        **items;         /* ptr to list of items */
  1347.     int            itemsCount;         /* number of items */
  1348.     char        **selectedItems;    /* list of selected items */
  1349.     int            selectedItemsCount;     /* number of selected items */
  1350.     int            visibleItemsCount;     /* number of visible items */
  1351.     Boolean            resize;           /* resize to fit all items */ 
  1352.     Boolean            singleSelection;     /* single item selection mode */
  1353.     Boolean            selection_mode;      /* selection mode indicator */
  1354.     DwtCallbackStruct    single_callback,    /* single select callback */
  1355.             singlec_callback,    /* single select and confirm callback */
  1356.             extend_callback,     /* extend select callback */
  1357.             extendc_callback;     /* extend select and confirm callback */
  1358.     ListBoxPart;
  1359.  
  1360.  
  1361. typedef struct _ListBoxRec
  1362. {                       
  1363.     CorePart        core;
  1364.     CompositePart    composite;
  1365.     DwtCommonPart        dwtcommon;
  1366.     ScrollWindowPart    scrollwindow;
  1367.     ListBoxPart        listbox;
  1368.     ListBoxRec, *ListBoxWidget;
  1369.  
  1370.  
  1371. #ifndef LISTBOX
  1372. external ListBoxClassRec listboxwidgetclassrec;
  1373. external ListBoxClass    listboxwidgetclass;
  1374. #endif
  1375.  
  1376. /*------------*/
  1377. /* scale      */
  1378. /*------------*/
  1379.  
  1380.  
  1381. typedef struct
  1382. {
  1383.  
  1384.     int        orientation;
  1385.     int         value;          /* current value */
  1386.     int        maxvalue;       /* max value that can be returned */
  1387.     int         minvalue;    /* min value that can be returnes */
  1388.     int         oldx1,oldx2;
  1389.     int         oldy1,oldy2;    /* last thumb position */
  1390.     Boolean     thumb_redraw;    /* redraw entire thumb flag */
  1391.     Boolean     got_thumb;       /* true if thumb is grabbed */
  1392.     Boolean    drag_start;      /* denotes drag starting */
  1393.     Boolean     drag_end;        /* denotes drag ending */
  1394.     Boolean     pixmap_flag;     /* denotes the background pixmap is scroll's */
  1395.     int         dx1,dx2,dy1,dy2; /* origional posof the thumb during drab */
  1396.     int         grabx, graby;    /* position of grab */
  1397.     int         dvalue;          /* original values during grab */
  1398.     int         scale_scx;     /* actual drawing box on the screen for */
  1399.     int         scale_scy;       /* the scale rectangle                  */
  1400.     int         scale_scw;
  1401.     int         scale_sch;
  1402.     DwtCallbackStruct drag_callback;
  1403.     DwtCallbackStruct callback;
  1404.  
  1405.     int        title_type;
  1406.     int        slider_label_type;
  1407.     char        *title;
  1408.     DwtLabelArray title_array;
  1409.     char        *slider_label;
  1410.     DwtLabelArray slider_label_array;
  1411.     int        scale_width;
  1412.     int        scale_height;
  1413.     int         scale_x;
  1414.     int         scale_y;
  1415.     int        decimal_points;
  1416.     int         grab_oldvalue;
  1417.     Boolean    show_value;
  1418.     Boolean    show_value_automatic;
  1419.     Pixmap    slider_pixmap;
  1420.  
  1421. } ScalePart;
  1422.  
  1423.  
  1424. typedef struct 
  1425. {
  1426.     CorePart        core;        /* basic widget */
  1427.     CompositePart   composite;        /* composite specific data */
  1428.     DwtCommonPart   dwtcommon;
  1429.     ScalePart        scale;
  1430.     ScaleWidgetRec, *ScaleWidget;
  1431.  
  1432. typedef struct
  1433. {
  1434.     int    dummy;
  1435. } ScaleClassPart;
  1436.  
  1437. typedef struct _ScaleClassRec 
  1438. {
  1439.     CoreClassPart    core_class;
  1440.     CompositeClassPart    composite_class;
  1441.     DwtCommonClassPart  dwtcommon_class;
  1442.     ScaleClassPart    scale_class;
  1443.     ScaleClassRec, *ScaleClass;
  1444.  
  1445.  
  1446. #ifndef SCALE
  1447. external ScaleClassRec     scalewidgetclassrec;
  1448. external ScaleClass        scalewidgetclass;
  1449. #endif
  1450.  
  1451.  
  1452. /*************************************************************************
  1453.  *
  1454.  * command box widget
  1455.  */
  1456.  
  1457. typedef struct _recall_node
  1458. {
  1459.     struct _recall_node       *next;
  1460.     struct _recall_node       *prev;
  1461.     char           *pointer;
  1462. } recall_node;
  1463.  
  1464.  
  1465. /*
  1466.  * define the additional data a command class widget has 
  1467.  */
  1468. typedef struct
  1469. {
  1470.     int                lines;
  1471.     char           *value;
  1472.     char           *prompt;
  1473.     char           *history;
  1474.     int                prompttype;
  1475.     int                historytype;
  1476.     int                paste_flag;
  1477.     XtTranslations        ttranslation;
  1478.     Widget            valuewid;
  1479.     Widget            promptwid;
  1480.     Widget            historywid;
  1481.     recall_node           *recall_list,
  1482.                *recall_pointer;
  1483.     DwtCallbackStruct      callback;
  1484. }
  1485.     CommandPart;
  1486.  
  1487. /*
  1488.  * now define the actual command widget data struct
  1489.  */
  1490.  
  1491. typedef struct
  1492. {
  1493.     CorePart            core;               /* basic widget */
  1494.     CompositePart        composite;          /* composite specific data */
  1495.     ConstraintPart        constraint;
  1496.     DialogPart            dialog;             /* dialog specific */
  1497.     CommandPart            command;            /* command specific */
  1498. }
  1499.     CommandWidgetRec, *CommandWidget;
  1500.  
  1501. /*
  1502.  * define the attributes (or things it does) that a command class has
  1503.  * that a composite class doesn't
  1504.  */
  1505.  
  1506. typedef struct
  1507. {
  1508.     int                mumble;             /* nothing special */
  1509. }
  1510.     CommandClassPart;
  1511.  
  1512.  
  1513. typedef struct _CommandClassRec
  1514. {
  1515.     CoreClassPart        core_class;
  1516.     CompositeClassPart        composite_class;
  1517.     ConstraintClassPart        constraint_class;
  1518.     DialogClassPart        dialog_class;
  1519.     CommandClassPart        command_class;
  1520. }
  1521.     CommandClassRec, *CommandClass;
  1522.  
  1523. #ifndef COMMAND
  1524. external CommandClassRec    commandwidgetclassrec;
  1525. external CommandClass        commandwidgetclass;
  1526. #endif
  1527.  
  1528.  
  1529. /*************************************************************************
  1530.  *
  1531.  * file selection widget
  1532.  */
  1533.  
  1534. /*
  1535.  * define the additional data a file selection class widget has that a
  1536.  * composite widget doesn't
  1537.  */
  1538.  
  1539. typedef struct
  1540. {
  1541.     char           *title;            /* title in window banner */
  1542.     int            labeltype;       /* either DwtText or Text16 */
  1543.     char           *label;            /* label before text widget */
  1544.     Boolean        text16;          /* text widget text type */
  1545.     char           *value;            /* current selection or reqeust */
  1546.     int                system_preference; /* VMS, UNIX or MSDOS */
  1547.     char               *dir_mask;         /* file search key */
  1548.     int            read;
  1549.     int            write;
  1550.     int            execute;
  1551.     int            delete;
  1552.     int            cancellabeltype;
  1553.     char           *cancellabel;
  1554.     int            oklabeltype;
  1555.     char           *oklabel;
  1556.     Boolean            selection_mode;  /* selection mode indicator */
  1557.     DwtCallbackStruct    callback,     /* OK callback */
  1558.             cancel_callback; /* Cancel callback */
  1559.     LabelWidget        labelwid;
  1560.     TextWidget        textwid;
  1561.     ListBoxWidget    listboxwid;
  1562.     PushbuttonWidget    okwid;
  1563.     PushbuttonWidget    cancelwid;
  1564.     char        **files;     /* ptr to list of files */
  1565.     int            fileCount;     /* number of files */
  1566.     int            vis_files;       /* number of vis file in lb */
  1567.     Boolean        list_updated;    /* list change indicator */
  1568.     XtWidgetProc    file_search_proc; /* file search routine */
  1569.     FileSelectionPart;
  1570.  
  1571. /*
  1572.  * now define the actual file selection widget data struct
  1573.  */
  1574.  
  1575. typedef struct 
  1576. {
  1577.     CorePart            core;            /* basic widget */
  1578.     CompositePart       composite;        /* composite specific data */
  1579.     ConstraintPart    constraint;
  1580.     DialogPart            dialog;            /* dialog specific */
  1581.     FileSelectionPart    fileselection;        /* file selection specific */
  1582.     FileSelectionWidgetRec, *FileSelectionWidget;
  1583.  
  1584.  
  1585. /*
  1586.  * define the attributes (or things it does) that a message class has
  1587.  * that a composite class doesn't
  1588.  */
  1589.  
  1590. typedef struct 
  1591. {
  1592.     int            mumble;        /* nothing special */
  1593. }
  1594.     FileSelectionClassPart;
  1595.  
  1596.  
  1597. typedef struct _FileSelectionClassRec 
  1598. {
  1599.     CoreClassPart        core_class;
  1600.     CompositeClassPart        composite_class;
  1601.     ConstraintClassPart        constraint_class;
  1602.     DialogClassPart        dialog_class;
  1603.     FileSelectionClassPart    fileselection_class;
  1604.     FileSelectionClassRec, *FileSelectionClass;
  1605.  
  1606. #ifndef FILESELECTION
  1607. external FileSelectionClassRec  fileselectionwidgetclassrec;
  1608. external FileSelectionClass     fileselectionwidgetclass;
  1609. #endif
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617. /************************************************************************
  1618.  *
  1619.  * define the separator widget.  this is a subclass of label widget
  1620.  */
  1621.  
  1622.  
  1623. /*
  1624.  * define the stuff that only appears in separator widgets
  1625.  */
  1626.  
  1627. typedef    struct 
  1628. {
  1629.     int                orientation;    /* horiz or vert */
  1630.     SeparatorPart;
  1631.  
  1632.  
  1633.  
  1634.  
  1635. /*
  1636.  * now define the actual widget data struct
  1637.  */
  1638.  
  1639. typedef struct 
  1640. {
  1641.     CorePart            core;
  1642.     CompositePart        composite;
  1643.     DwtCommonPart        dwtcommon;
  1644.     LabelPart            label;
  1645.     SeparatorPart        separator;
  1646.     SeparatorWidgetRec, *SeparatorWidget;
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652. /*
  1653.  * define the attributes (or things it does) that a Separator class has
  1654.  * that a label class doesn't
  1655.  */
  1656.  
  1657. typedef struct 
  1658. {
  1659.     int            mumble;        /* nothing special */
  1660. }
  1661.     SeparatorClassPart;
  1662.  
  1663.  
  1664.  
  1665.  
  1666. typedef struct 
  1667. {
  1668.     CoreClassPart        core_class;        /* basic widget */
  1669.     CompositeClassPart        composite_class;    /* Composite widget */
  1670.     DwtCommonClassPart        dwtcommon_class;
  1671.     LabelClassPart        label_class;        /* label widget */
  1672.     SeparatorClassPart        separator_class;    /* separator specific */
  1673.     SeparatorClassRec, *SeparatorWidgetClass;
  1674.  
  1675.  
  1676. #ifndef SEPARATOR
  1677. external SeparatorClassRec     separatorwidgetclassrec;
  1678. external SeparatorWidgetClass  separatorwidgetclass;
  1679. #endif
  1680.  
  1681.  
  1682.  
  1683.