File indexing completed on 2025-01-18 10:15:23
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #ifndef _XmCascadeBGP_h
0024 #define _XmCascadeBGP_h
0025
0026 #include <Xm/CascadeBG.h>
0027 #include <Xm/LabelGP.h>
0028
0029 #ifdef __cplusplus
0030 extern "C" {
0031 #endif
0032
0033
0034
0035
0036 typedef struct _XmArrowPixmap
0037 {
0038 Dimension height, width;
0039 unsigned int depth;
0040 unsigned char direction;
0041 Pixel top_shadow_color;
0042 Pixel bottom_shadow_color;
0043 Pixel foreground_color;
0044 Display *display;
0045 Screen *screen;
0046 Pixmap pixmap;
0047 } XmArrowPixmap;
0048
0049
0050
0051
0052
0053
0054
0055 typedef struct _XmCascadeButtonGCacheObjClassPart
0056 {
0057 int foo;
0058 } XmCascadeButtonGCacheObjClassPart;
0059
0060
0061 typedef struct _XmCascadeButtonGCacheObjClassRec
0062 {
0063 ObjectClassPart object_class;
0064 XmExtClassPart ext_class;
0065 XmLabelGCacheObjClassPart label_class_cache;
0066 XmCascadeButtonGCacheObjClassPart cascade_button_class_cache;
0067 } XmCascadeButtonGCacheObjClassRec;
0068
0069 externalref XmCascadeButtonGCacheObjClassRec xmCascadeButtonGCacheObjClassRec;
0070
0071
0072 typedef struct _XmCascadeButtonGCacheObjPart
0073 {
0074 Pixmap cascade_pixmap;
0075 int map_delay;
0076 Pixmap armed_pixmap;
0077 GC arm_gc;
0078 GC background_gc;
0079 } XmCascadeButtonGCacheObjPart;
0080
0081 typedef struct _XmCascadeButtonGCacheObjRec
0082 {
0083 ObjectPart object;
0084 XmExtPart ext;
0085 XmLabelGCacheObjPart label_cache;
0086 XmCascadeButtonGCacheObjPart cascade_button_cache;
0087 } XmCascadeButtonGCacheObjRec;
0088
0089
0090
0091 typedef struct _XmCascadeButtonGadgetPart
0092 {
0093 Widget submenu;
0094 XtCallbackList activate_callback;
0095 XtCallbackList cascade_callback;
0096
0097
0098
0099 Boolean armed;
0100 XRectangle cascade_rect;
0101 XtIntervalId timer;
0102 XmCascadeButtonGCacheObjPart *cache;
0103 } XmCascadeButtonGadgetPart;
0104
0105
0106
0107
0108 typedef struct _XmCascadeButtonGadgetRec
0109 {
0110 ObjectPart object;
0111 RectObjPart rectangle;
0112 XmGadgetPart gadget;
0113 XmLabelGadgetPart label;
0114 XmCascadeButtonGadgetPart cascade_button;
0115 } XmCascadeButtonGadgetRec;
0116
0117
0118
0119
0120 typedef struct
0121 {
0122 XtPointer extension;
0123 } XmCascadeButtonGadgetClassPart;
0124
0125
0126
0127
0128 typedef struct _XmCascadeButtonGadgetClassRec
0129 {
0130 RectObjClassPart rect_class;
0131 XmGadgetClassPart gadget_class;
0132 XmLabelGadgetClassPart label_class;
0133 XmCascadeButtonGadgetClassPart cascade_button_class;
0134 } XmCascadeButtonGadgetClassRec;
0135
0136
0137 externalref XmCascadeButtonGadgetClassRec xmCascadeButtonGadgetClassRec;
0138
0139
0140
0141
0142 #define CBG_Submenu(cb) (((XmCascadeButtonGadget) \
0143 cb)->cascade_button.submenu)
0144 #define CBG_ActivateCall(cb) (((XmCascadeButtonGadget) \
0145 cb)->cascade_button.activate_callback)
0146 #define CBG_CascadeCall(cb) (((XmCascadeButtonGadget) \
0147 cb)->cascade_button.cascade_callback)
0148 #define CBG_Armed(cb) (((XmCascadeButtonGadget) \
0149 cb)->cascade_button.armed)
0150 #define CBG_CascadeRect(cb) (((XmCascadeButtonGadget) \
0151 cb)->cascade_button.cascade_rect)
0152 #define CBG_Timer(cb) (((XmCascadeButtonGadget) \
0153 cb)->cascade_button.timer)
0154 #define CBG_Cascade_x(cb) (((XmCascadeButtonGadget) \
0155 cb)->cascade_button.cascade_rect.x)
0156 #define CBG_Cascade_y(cb) (((XmCascadeButtonGadget) \
0157 cb)->cascade_button.cascade_rect.y)
0158 #define CBG_Cascade_width(cb) (((XmCascadeButtonGadget) \
0159 cb)->cascade_button.cascade_rect.width)
0160 #define CBG_Cascade_height(cb) (((XmCascadeButtonGadget) \
0161 cb)->cascade_button.cascade_rect.height)
0162 #define CBG_HasCascade(cb) (((LabG_MenuType(cb) == XmMENU_PULLDOWN) || \
0163 (LabG_MenuType(cb) == XmMENU_POPUP) || \
0164 (LabG_MenuType(cb) == XmMENU_OPTION)) && \
0165 (CBG_Submenu(cb)))
0166
0167 #define XmCBG_ARMED_BIT (1 << 0)
0168 #define XmCBG_TRAVERSE_BIT (1 << 1)
0169 #define XmCBG_WAS_POSTED_BIT (1 << 2)
0170
0171 #define CBG_IsArmed(cb) (((XmCascadeButtonGadget)(cb))->cascade_button.armed \
0172 & XmCBG_ARMED_BIT)
0173
0174 #define CBG_Traversing(cb) (((XmCascadeButtonGadget) \
0175 (cb))->cascade_button.armed & XmCBG_TRAVERSE_BIT)
0176
0177 #define CBG_WasPosted(cb) (((XmCascadeButtonGadget) \
0178 (cb))->cascade_button.armed & XmCBG_WAS_POSTED_BIT)
0179
0180 #define CBG_SetBit(byte,bit,v) byte = (byte & (~bit)) | (v ? bit : 0)
0181
0182 #define CBG_SetArmed(cb,v) CBG_SetBit (((XmCascadeButtonGadget) \
0183 (cb))->cascade_button.armed, \
0184 XmCBG_ARMED_BIT, v)
0185
0186 #define CBG_SetTraverse(cb,v) CBG_SetBit (((XmCascadeButtonGadget) \
0187 (cb))->cascade_button.armed, \
0188 XmCBG_TRAVERSE_BIT, v)
0189
0190 #define CBG_SetWasPosted(cb,v) CBG_SetBit (((XmCascadeButtonGadget) \
0191 (cb))->cascade_button.armed, \
0192 XmCBG_WAS_POSTED_BIT, v)
0193
0194
0195
0196
0197
0198 #define CBG_CascadePixmap(cb) (((XmCascadeButtonGadget) \
0199 cb)->cascade_button.cache->cascade_pixmap)
0200 #define CBG_MapDelay(cb) (((XmCascadeButtonGadget) \
0201 cb)->cascade_button.cache->map_delay)
0202 #define CBG_ArmedPixmap(cb) (((XmCascadeButtonGadget) \
0203 cb)->cascade_button.cache->armed_pixmap)
0204 #define CBG_ArmGC(cb) (((XmCascadeButtonGadget) \
0205 cb)->cascade_button.cache->arm_gc)
0206 #define CBG_BackgroundGC(cb) (((XmCascadeButtonGadget) \
0207 cb)->cascade_button.cache->background_gc)
0208
0209
0210
0211
0212
0213
0214
0215 #define CBG_Cache(w) (((XmCascadeButtonGadget)(w))->\
0216 cascade_button.cache)
0217 #define CBG_ClassCachePart(w) \
0218 (((XmCascadeButtonGadgetClass)xmCascadeButtonGadgetClass)->gadget_class.cache_part)
0219
0220
0221 #ifdef __cplusplus
0222 }
0223 #endif
0224
0225 #endif
0226