Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:15:29

0001 /* 
0002  * Motif
0003  *
0004  * Copyright (c) 1987-2012, The Open Group. All rights reserved.
0005  *
0006  * These libraries and programs are free software; you can
0007  * redistribute them and/or modify them under the terms of the GNU
0008  * Lesser General Public License as published by the Free Software
0009  * Foundation; either version 2 of the License, or (at your option)
0010  * any later version.
0011  *
0012  * These libraries and programs are distributed in the hope that
0013  * they will be useful, but WITHOUT ANY WARRANTY; without even the
0014  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
0015  * PURPOSE. See the GNU Lesser General Public License for more
0016  * details.
0017  *
0018  * You should have received a copy of the GNU Lesser General Public
0019  * License along with these librararies and programs; if not, write
0020  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
0021  * Floor, Boston, MA 02110-1301 USA
0022 */ 
0023 
0024 /********************************************
0025  *
0026  *   No new fields need to be defined
0027  *   for the Toggle widget class record
0028  *
0029  ********************************************/
0030 
0031 #ifndef _XmToggleButtonGP_h
0032 #define _XmToggleButtonGP_h
0033 
0034 #include <Xm/ToggleBG.h>
0035 #include <Xm/LabelGP.h>
0036 
0037 #ifdef __cplusplus
0038 extern "C" {
0039 #endif
0040 
0041 /*************************************************************/
0042 /* The  ToggleButton Gadget Cache Object's class and instance records*/
0043 /*************************************************************/
0044 
0045 
0046 typedef struct _XmToggleButtonGCacheObjClassPart
0047 {
0048     int foo;
0049 } XmToggleButtonGCacheObjClassPart;
0050 
0051 
0052 typedef struct _XmToggleButtonGCacheObjClassRec 
0053 {
0054     ObjectClassPart                     object_class;
0055         XmExtClassPart                      ext_class;
0056     XmLabelGCacheObjClassPart           label_class_cache;
0057     XmToggleButtonGCacheObjClassPart    toggle_class_cache;
0058 } XmToggleButtonGCacheObjClassRec;
0059 
0060 externalref XmToggleButtonGCacheObjClassRec xmToggleButtonGCacheObjClassRec;
0061 
0062 
0063 typedef struct _XmToggleButtonGCacheObjPart
0064 { 
0065    unsigned char    ind_type;
0066    Boolean      visible;
0067    Dimension        spacing;
0068    Dimension        indicator_dim;
0069    Pixmap       on_pixmap; 
0070    Pixmap       insen_pixmap; 
0071    unsigned char    ind_on;
0072    Boolean      fill_on_select;
0073    Pixel        select_color;
0074    GC           select_GC;
0075    GC           background_gc;
0076    GC                   arm_GC;    /* used in menus when enableEtchedInMenu 
0077                       is set. */
0078    unsigned char        toggle_mode;
0079    Boolean      reversed_select;
0080    Pixmap               indeterminate_pixmap;
0081    Pixmap               indeterminate_insensitive_pixmap;
0082    Pixel                unselect_color;
0083    GC                   unselect_GC;
0084    GC                   indeterminate_GC;
0085    GC                   indeterminate_box_GC;
0086    Dimension        ind_left_delta;
0087    Dimension        ind_right_delta;
0088    Dimension        ind_top_delta;
0089    Dimension        ind_bottom_delta;
0090 } XmToggleButtonGCacheObjPart;
0091 
0092 typedef struct _XmToggleButtonGCacheObjRec
0093 {
0094     ObjectPart                              object;
0095     XmExtPart                           ext;
0096     XmLabelGCacheObjPart                label_cache;
0097     XmToggleButtonGCacheObjPart             toggle_cache;
0098 } XmToggleButtonGCacheObjRec;
0099 
0100 
0101 /****************************************************
0102  *
0103  * Full class record declaration for Toggle class
0104  *
0105  ****************************************************/
0106 
0107 typedef struct _XmToggleButtonGadgetClassPart
0108  {
0109    XtPointer                   extension;
0110  } XmToggleButtonGadgetClassPart;
0111 
0112 
0113 typedef struct _XmToggleButtonGadgetClassRec {
0114     RectObjClassPart            rect_class;
0115     XmGadgetClassPart           gadget_class;
0116     XmLabelGadgetClassPart          label_class;
0117     XmToggleButtonGadgetClassPart   toggle_class;
0118 } XmToggleButtonGadgetClassRec;
0119 
0120 
0121 externalref XmToggleButtonGadgetClassRec xmToggleButtonGadgetClassRec;
0122 
0123 
0124 typedef struct _XmToggleButtonGadgetPart
0125 { 
0126    Boolean      indicator_set;
0127    unsigned char    set;
0128    unsigned char        visual_set; /* used for visuals and does not reflect
0129                                     the true state of the button */
0130    Boolean          Armed;
0131    XtCallbackList       value_changed_CB,
0132             arm_CB,
0133                 disarm_CB;
0134 
0135    XmToggleButtonGCacheObjPart  *cache; /* Replace cache instance fields */
0136                     /* with a pointer */
0137 
0138    Dimension detail_shadow_thickness ;
0139 } XmToggleButtonGadgetPart;
0140 
0141 
0142 
0143 /****************************************************************
0144  *
0145  * Full instance record declaration
0146  *
0147  ****************************************************************/
0148 
0149 typedef struct _XmToggleButtonGadgetRec {
0150     ObjectPart          object;
0151     RectObjPart         rectangle;
0152     XmGadgetPart        gadget;
0153     XmLabelGadgetPart       label;
0154     XmToggleButtonGadgetPart    toggle;
0155 } XmToggleButtonGadgetRec;
0156 
0157 
0158 /**********/
0159 /* MACROS */
0160 /**********/
0161  
0162 /* Macros for cached instance fields */
0163 
0164 #define TBG_IndType(w)      \
0165     (((XmToggleButtonGadget) (w)) -> toggle.cache->ind_type)
0166 #define TBG_Visible(w)      \
0167     (((XmToggleButtonGadget) (w)) -> toggle.cache->visible)
0168 #define TBG_Spacing(w)      \
0169     (((XmToggleButtonGadget) (w)) -> toggle.cache->spacing)
0170 #define TBG_IndicatorDim(w) \
0171     (((XmToggleButtonGadget) (w)) -> toggle.cache->indicator_dim)
0172 #define TBG_OnPixmap(w)     \
0173     (((XmToggleButtonGadget) (w)) -> toggle.cache->on_pixmap)
0174 #define TBG_InsenPixmap(w)  \
0175     (((XmToggleButtonGadget) (w)) -> toggle.cache->insen_pixmap)
0176 #define TBG_IndOn(w)        \
0177     (((XmToggleButtonGadget) (w)) -> toggle.cache->ind_on)
0178 #define TBG_FillOnSelect(w) \
0179     (((XmToggleButtonGadget) (w)) -> toggle.cache->fill_on_select)
0180 #define TBG_ReversedSelect(w)   \
0181     (((XmToggleButtonGadget) (w)) -> toggle.cache->reversed_select)
0182 #define TBG_SelectColor(w)  \
0183     (((XmToggleButtonGadget) (w)) -> toggle.cache->select_color)
0184 #define TBG_SelectGC(w)     \
0185     (((XmToggleButtonGadget) (w)) -> toggle.cache->select_GC)
0186 #define TBG_BackgroundGC(w) \
0187     (((XmToggleButtonGadget) (w)) -> toggle.cache->background_gc)
0188 #define TBG_ArmGC(w)    \
0189     (((XmToggleButtonGadget) (w)) -> toggle.cache->arm_GC)
0190 #define TBG_ToggleMode(w)   \
0191     (((XmToggleButtonGadget) (w)) -> toggle.cache->toggle_mode)
0192 #define TBG_IndeterminatePixmap(w)  \
0193     (((XmToggleButtonGadget) (w)) -> toggle.cache->indeterminate_pixmap)
0194 #define TBG_IndeterminateInsensitivePixmap(w)   \
0195     (((XmToggleButtonGadget) (w)) ->    \
0196      toggle.cache->indeterminate_insensitive_pixmap)
0197 #define TBG_IndeterminateGC(w)  \
0198     (((XmToggleButtonGadget) (w)) -> toggle.cache->indeterminate_GC)
0199 #define TBG_IndeterminateBoxGC(w)   \
0200     (((XmToggleButtonGadget) (w)) -> toggle.cache->indeterminate_box_GC)
0201 #define TBG_UnselectColor(w)    \
0202     (((XmToggleButtonGadget) (w)) -> toggle.cache->unselect_color)
0203 #define TBG_UnselectGC(w)       \
0204     (((XmToggleButtonGadget) (w)) -> toggle.cache->unselect_GC)
0205 #define TBG_IndLeftDelta(w) \
0206     (((XmToggleButtonGadget) (w)) -> toggle.cache->ind_left_delta)
0207 #define TBG_IndRightDelta(w)    \
0208     (((XmToggleButtonGadget) (w)) -> toggle.cache->ind_right_delta)
0209 #define TBG_IndTopDelta(w)  \
0210     (((XmToggleButtonGadget) (w)) -> toggle.cache->ind_top_delta)
0211 #define TBG_IndBottomDelta(w)   \
0212     (((XmToggleButtonGadget) (w)) -> toggle.cache->ind_bottom_delta)
0213 
0214 /***************************************/
0215 /* Macros for uncached instance fields */
0216 
0217 #define TBG_IndicatorSet(w) \
0218     (((XmToggleButtonGadget) (w)) -> toggle.indicator_set)
0219 #define TBG_Set(w)      \
0220     (((XmToggleButtonGadget) (w)) -> toggle.set)
0221 #define TBG_VisualSet(w)    \
0222     (((XmToggleButtonGadget) (w)) -> toggle.visual_set)
0223 #define TBG_ValueChangedCB(w)   \
0224     (((XmToggleButtonGadget) (w)) -> toggle.value_changed_CB)
0225 #define TBG_ArmCB(w)        \
0226     (((XmToggleButtonGadget) (w)) -> toggle.arm_CB)
0227 #define TBG_DisarmCB(w)     \
0228     (((XmToggleButtonGadget) (w)) -> toggle.disarm_CB)
0229 #define TBG_Armed(w)        \
0230     (((XmToggleButtonGadget) (w)) -> toggle.Armed)
0231 
0232 /******************************/
0233 /* Convenience Macros         */
0234 /******************************/
0235 
0236 #define TBG_Cache(w)        (((XmToggleButtonGadget)(w))->toggle.cache)
0237 #define TBG_ClassCachePart(w)   \
0238         (((XmToggleButtonGadgetClass)xmToggleButtonGadgetClass)->gadget_class.cache_part)
0239 
0240 
0241 #ifdef __cplusplus
0242 }  /* Close scope of 'extern "C"' declaration which encloses file. */
0243 #endif
0244 
0245 #endif /* _XmToggleButtonGP_h */
0246 /* DON'T ADD ANYTHING AFTER THIS #endif */