1 /*************************************<+>*************************************
2 *****************************************************************************
8 ** Description: Private include file for MenuButton class
10 *****************************************************************************
12 ** Copyright (c) 1988 by Hewlett-Packard Company
13 ** Copyright (c) 1988 by the Massachusetts Institute of Technology
15 ** Permission to use, copy, modify, and distribute this software
16 ** and its documentation for any purpose and without fee is hereby
17 ** granted, provided that the above copyright notice appear in all
18 ** copies and that both that copyright notice and this permission
19 ** notice appear in supporting documentation, and that the names of
20 ** Hewlett-Packard or M.I.T. not be used in advertising or publicity
21 ** pertaining to distribution of the software without specific, written
24 *****************************************************************************
25 *************************************<+>*************************************/
27 #define XwMARKWIDTH 16
28 #define XwCASCADEWIDTH 16
29 #define XwMENUBTNPAD 6
31 /********************************************
33 * the MenuButton widget class record
35 ********************************************/
37 typedef struct _XwMenuButtonClassPart
39 XwWidthProc idealWidthProc
;
40 XtWidgetProc unhighlightProc
;
41 XtWidgetProc highlightProc
;
42 XtWidgetProc setCascadeProc
;
43 XtWidgetProc clearCascadeProc
;
44 XtWidgetProc enterParentProc
;
45 XtWidgetProc cascadeSelectProc
;
46 XtWidgetProc cascadeUnselectProc
;
47 XwWintProc setTraversalType
;
48 } XwMenuButtonClassPart
;
50 #define XtInheritSetCascadeProc ((XtWidgetProc) _XtInherit)
51 #define XtInheritClearCascadeProc ((XtWidgetProc) _XtInherit)
52 #define XtInheritCascadeSelectProc ((XtWidgetProc) _XtInherit)
53 #define XtInheritCascadeUnselectProc ((XtWidgetProc) _XtInherit)
54 #define XtInheritSetTraversalTypeProc ((XwWintProc) _XtInherit)
56 /****************************************************
58 * Full class record declaration for MenuButton class
60 ****************************************************/
61 typedef struct _XwMenuButtonClassRec
{
62 CoreClassPart core_class
;
63 XwPrimitiveClassPart primitive_class
;
64 XwButtonClassPart button_class
;
65 XwMenuButtonClassPart menubutton_class
;
66 } XwMenuButtonClassRec
;
69 extern XwMenuButtonClassRec XwmenubuttonClassRec
;
71 /********************************************
73 * New fields for the instance record
75 ********************************************/
77 typedef struct _XwMenuButtonPart
79 /* can be set through resources */
83 XImage
* cascadeImage
;
93 Boolean mgrOverrideMnemonic
;
95 XtCallbackList cascadeSelect
;
96 XtCallbackList cascadeUnselect
;
98 /* can not be set through resources */
103 Dimension underline_x
;
104 Dimension underline_y
;
105 Dimension underline_width
;
107 Boolean mnemonicMatch
;
108 Boolean cascadeEnabled
;
111 unsigned int accelEventType
;
113 unsigned int accelModifiers
;
117 Pixmap cascadePixmap
;
118 Pixmap invertLabelPixmap
;
119 Pixmap invertMarkPixmap
;
120 Pixmap invertCascadePixmap
;
121 XImage
* defMarkImage
;
122 XImage
* defCascadeImage
;
133 /****************************************************************
135 * Full instance record declaration
137 ****************************************************************/
139 typedef struct _XwMenuButtonRec
{
141 XwPrimitivePart primitive
;
143 XwMenuButtonPart menubutton
;