1 /******************************************************************* 2 FILE: ControlP.h 3 CONTENTS: Private definitions for the Control widget class. 4 AUTHOR: Paul D. Johnston 5 HISTORY: 6 Date Action 7 --------- ------------------------------------ 8 3/11/92 Created. 9 10 ********************************************************************/ 11 12 #ifndef CONTROLP_H 13 #define CONTROLP_H 14 15 /* 16 * Include the superclass private header. 17 */ 18 #include <X11/CoreP.h> 19 20 /* 21 * Include the widget set header. 22 */ 23 #include <X11/Xc/Xc.h> 24 25 /* 26 * Include this widget class public header. 27 */ 28 #include <X11/Xc/Control.h> 29 30 /* Private declarations and definitions. */ 31 #define MAX_LABEL 20 32 33 34 /* 35 * Class part. 36 */ 37 typedef struct 38 { 39 int dummy; /* Minimum of one member required. */ 40 } ControlClassPart; 41 42 /* 43 * Class record. 44 */ 45 typedef struct _ControlClassRec 46 { 47 CoreClassPart core_class; 48 ControlClassPart control_class; 49 } ControlClassRec; 50 51 /* 52 * Declare the widget class record as external for use in the widget source 53 * file. 54 */ 55 extern ControlClassRec controlClassRec; 56 57 58 59 /* 60 * Instance part. 61 */ 62 typedef struct 63 { 64 /* Public instance variables. */ 65 Pixel background_pixel; /* Widget's background color (used 66 * in producing 3D effect). 67 */ 68 Pixel label_pixel; /* Widget's Label color. */ 69 char *label; /* Widget's Label string. */ 70 XFontStruct *font; /* Font for Label string. */ 71 int shade_depth; /* Depth of the 3D effect in pixels. */ 72 73 /* Private instance variables. */ 74 Pixmap shade; /* Stipple bitmap for generating 75 * 3D shading effect. 76 */ 77 XColor shade1, shade2; /* Colors derived from background 78 * used with the -DNICE_SHADES compiler 79 * option for 3D shading of widget. 80 */ 81 GC gc; /* GC used for drawing in this 82 * widget. 83 */ 84 85 } ControlPart; 86 87 /* 88 * Instance record. 89 */ 90 typedef struct _ControlRec 91 { 92 CorePart core; 93 ControlPart control; 94 } ControlRec; 95 96 97 98 #endif /* CONTROLP_H */ 99 100