1 /* 2 * This widget manages one child widget, placing a decorative border 3 * around it. The frame may have an optional title, which will be placed 4 * at the top, breaking the decoration. The title may be any widget, but 5 * is normally some sort of label widget. 6 * 7 * Border styles are as follow: 8 * 9 * None no border 10 * Solid solid border in foreground color 11 * Raised raised 3d look 12 * Lowered pressed 3d look 13 * Ridge raised ridge 14 * Groove indented groove 15 * Trough indented groove with flat bottom. 16 */ 17 18 19 #ifndef _MwFrame_h 20 #define _MwFrame_h 21 22 #include <X11/Xmu/Converters.h> 23 24 25 /*********************************************************************** 26 * 27 * MwFrame Widget (subclass of CompositeClass) 28 * 29 ***********************************************************************/ 30 31 /* Parameters: 32 33 Name Class RepType Default Value 34 ---- ----- ------- ------------- 35 shadowType ShadowType ShadowType solid 36 shadowWidth ShadowWidth Dimension 37 foreground Foreground Pixel XtDefaultForeground 38 title Title Widget NULL 39 justify Justify XtJustify left 40 marginWidth Margin Dimension 0 41 marginHeight Margin Dimension 0 42 allowResize AllowResize Boolean True 43 44 beNiceToColormap BeNiceToColormap Boolean False 45 topShadowContrast TopShadowContrast int 20 46 bottomShadowContrast BottomShadowContrast int 40 47 48 background Background Pixel XtDefaultBackground 49 border BorderColor Pixel XtDefaultForeground 50 borderWidth BorderWidth Dimension 0 51 52 destroyCallback Callback Pointer NULL 53 mappedWhenManaged MappedWhenManaged Boolean True 54 width Width Dimension 0 55 height Height Dimension 0 56 x Position Position 0 57 y Position Position 0 58 59 Notes: 60 61 1 internalWidth, internalHeight specify the margins around the child widget 62 2 allowResize specifies if child widget is allowed to resize itself. 63 3 BeNiceToColormap causes the MwFrame widget to use fewer colors. 64 65 */ 66 67 /* New fields */ 68 69 #ifndef XtNtitle 70 #define XtNtitle "title" 71 #define XtCTitle "Title" 72 #endif 73 74 #ifndef XtNshadowType 75 #define XtNshadowType "shadowType" 76 #define XtCShadowType "ShadowType" 77 #define XtRShadowType "ShadowType" 78 #endif 79 80 #ifndef XtNallowResize 81 #define XtNallowResize "allowResize" 82 #endif 83 #ifndef XtCAllowResize 84 #define XtCAllowResize "AllowResize" 85 #endif 86 87 #ifndef XtNmarginWidth 88 #define XtNmarginWidth "marginWidth" 89 #define XtNmarginHeight "marginHeight" 90 #endif 91 92 #ifndef XtNshadowWidth 93 #define XtNshadowWidth "shadowWidth" 94 #define XtCShadowWidth "ShadowWidth" 95 #define XtNtopShadowPixel "topShadowPixel" 96 #define XtCTopShadowPixel "TopShadowPixel" 97 #define XtNbottomShadowPixel "bottomShadowPixel" 98 #define XtCBottomShadowPixel "BottomShadowPixel" 99 #define XtNtopShadowContrast "topShadowContrast" 100 #define XtCTopShadowContrast "TopShadowContrast" 101 #define XtNbottomShadowContrast "bottomShadowContrast" 102 #define XtCBottomShadowContrast "BottomShadowContrast" 103 #endif 104 105 #ifndef XtNinsensitiveContrast 106 #define XtNinsensitiveContrast "insensitiveContrast" 107 #define XtCInsensitiveContrast "InsensitiveContrast" 108 #endif 109 110 #ifndef XtNtopShadowPixmap 111 #define XtNtopShadowPixmap "topShadowPixmap" 112 #define XtCTopShadowPixmap "TopShadowPixmap" 113 #define XtNbottomShadowPixmap "bottomShadowPixmap" 114 #define XtCBottomShadowPixmap "BottomShadowPixmap" 115 #endif 116 117 #ifndef XtNbeNiceToColormap 118 #define XtNbeNiceToColormap "beNiceToColormap" 119 #define XtCBeNiceToColormap "BeNiceToColormap" 120 #define XtNbeNiceToColourmap "beNiceToColormap" 121 #define XtCBeNiceToColourmap "BeNiceToColormap" 122 #endif 123 124 typedef enum { Blank, /* no border */ 125 Solid, /* solid border in foreground color */ 126 Raised, /* raised 3d look */ 127 Lowered, /* pressed 3d look */ 128 Ridge, /* raised ridge */ 129 Groove, /* indented groove */ 130 Plateau, /* raised ridge with flat top */ 131 Trough} /* indented groove with flat bottom */ 132 XtShadowType ; 133 134 135 /* Class record constants */ 136 137 extern WidgetClass mwFrameWidgetClass; 138 139 typedef struct _MwFrameClassRec *MwFrameWidgetClass; 140 typedef struct _MwFrameRec *MwFrameWidget; 141 142 #endif /* _MwFrame_h */ 143