One more check on valid display which is known to be in the startup
[xcircuit.git] / Xw / MenuBtnP.h
blobc3485d2ce8e063dbc9ef4e55b8c467bbfcc1fa92
1 /*************************************<+>*************************************
2 *****************************************************************************
3 **
4 ** File: MenuBtnP.h
5 **
6 ** Project: X Widgets
7 **
8 ** Description: Private include file for MenuButton class
9 **
10 *****************************************************************************
11 **
12 ** Copyright (c) 1988 by Hewlett-Packard Company
13 ** Copyright (c) 1988 by the Massachusetts Institute of Technology
14 **
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
22 ** prior permission.
23 **
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 */
81 int labelType;
82 XImage * labelImage;
83 XImage * cascadeImage;
84 XImage * markImage;
85 Pixel rectColor;
86 Pixmap rectStipple;
87 Boolean setMark;
88 Boolean noPad;
89 Widget cascadeOn;
90 char * accelerator;
91 char * hint;
92 XwStrProc hintProc;
93 Boolean mgrOverrideMnemonic;
94 String mnemonic;
95 XtCallbackList cascadeSelect;
96 XtCallbackList cascadeUnselect;
98 /* can not be set through resources */
100 Widget menuMgr;
101 Dimension mark_y;
102 Dimension cascade_y;
103 Dimension underline_x;
104 Dimension underline_y;
105 Dimension underline_width;
107 Boolean mnemonicMatch;
108 Boolean cascadeEnabled;
109 Boolean inverted;
111 unsigned int accelEventType;
112 KeyCode accelDetail;
113 unsigned int accelModifiers;
115 Pixmap labelPixmap;
116 Pixmap markPixmap;
117 Pixmap cascadePixmap;
118 Pixmap invertLabelPixmap;
119 Pixmap invertMarkPixmap;
120 Pixmap invertCascadePixmap;
121 XImage * defMarkImage;
122 XImage * defCascadeImage;
124 GC inverted_GC;
125 GC defPixmap_GC;
126 GC invertPixmap_GC;
127 GC rect_GC;
129 } XwMenuButtonPart;
133 /****************************************************************
135 * Full instance record declaration
137 ****************************************************************/
139 typedef struct _XwMenuButtonRec {
140 CorePart core;
141 XwPrimitivePart primitive;
142 XwButtonPart button;
143 XwMenuButtonPart menubutton;
144 } XwMenuButtonRec;