Merge branch 'master' into xcircuit-3.10
[xcircuit.git] / Xw / Xw.h
bloba8fed14cf04906713d2a4716b2d12841d37d64f1
1 /*************************************<+>*************************************
2 *****************************************************************************
3 **
4 ** File: Xw.h
5 **
6 ** Project: X Widgets
7 **
8 ** Description: This include file contains public defines and structures
9 ** needed by all XToolkit applications using the X Widget Set.
10 ** Included in the file are the definitions for all common
11 ** resource types, defines for resource or arg list values,
12 ** and the class and instance record definitions for all meta
13 ** classes.
15 *****************************************************************************
16 **
17 ** Copyright (c) 1988 by Hewlett-Packard Company
18 ** Copyright (c) 1988 by the Massachusetts Institute of Technology
19 **
20 ** Permission to use, copy, modify, and distribute this software
21 ** and its documentation for any purpose and without fee is hereby
22 ** granted, provided that the above copyright notice appear in all
23 ** copies and that both that copyright notice and this permission
24 ** notice appear in supporting documentation, and that the names of
25 ** Hewlett-Packard or M.I.T. not be used in advertising or publicity
26 ** pertaining to distribution of the software without specific, written
27 ** prior permission.
28 **
29 *****************************************************************************
30 *************************************<+>*************************************/
33 #ifndef _XtXw_h
34 #define _XtXw_h
36 /************************************************************************
38 * Good 'ole Max and Min from the defunct <X11/Misc.h>
40 ************************************************************************/
41 #define Max(x, y) (((x) > (y)) ? (x) : (y))
42 #define Min(x, y) (((x) > (y)) ? (y) : (x))
44 /************************************************************************
46 * Resource manager definitions
48 ************************************************************************/
50 #define XtRLong "Long"
52 #define XtNtraversalOn "traversalOn"
53 #define XtCTraversalOn "TraversalOn"
55 #define XtNtraversalType "traversalType"
56 #define XtCTraversalType "TraversalType"
57 #define XtRTraversalType "TraversalType"
59 #define XtNhighlightStyle "highlightStyle"
60 #define XtCHighlightStyle "HighlightStyle"
61 #define XtNhighlightTile "highlightTile"
62 #define XtCHighlightTile "HighlightTile"
63 #define XtRHighlightStyle "HighlightStyle"
64 #define XtNhighlightThickness "highlightThickness"
65 #define XtCHighlightThickness "HighlightThickness"
66 #define XtNhighlightColor "highlightColor"
68 #define XtNbackgroundTile "backgroundTile"
69 #define XtCBackgroundTile "BackgroundTile"
71 #define XtNcursor "cursor"
73 #define XtNrecomputeSize "recomputeSize"
74 #define XtCRecomputeSize "RecomputeSize"
76 #define XtNlayout "layout"
77 #define XtCLayout "Layout"
78 #define XtRLayout "Layout"
80 #define XtRTileType "tileType"
82 /* #define XtRTranslationTable "TranslationTable" */
83 #define XtNlabelLocation "labelLocation"
84 #define XtCLabelLocation "LabelLocation"
85 #define XtRLabelLocation "LabelLocation"
86 #define XtNsensitiveTile "sensitiveTile"
87 #define XtCSensitiveTile "SensitiveTile"
89 #define XtNcolumns "columns"
90 #define XtCColumns "Columns"
91 #define XtNmode "mode"
92 #define XtCMode "Mode"
93 #define XtRRCMode "Mode"
94 #define XtNset "set"
95 #define XtCSet "Set"
97 #define XtNselect "select"
98 #define XtNrelease "release"
99 #define XtNnextTop "nextTop"
101 #define XtNtitleShowing "titleShowing"
102 #define XtCTitleShowing "TitleShowing"
103 #define XtNmgrTitleOverride "mgrTitleOverride"
104 #define XtCTitleOverride "TitleOverride"
105 #define XtNtitleType "titleType"
106 #define XtCTitleType "TitleType"
107 #define XtRTitleType "TitleType"
108 #define XtNtitleString "titleString"
109 #define XtCTitleString "TitleString"
110 #define XtNtitleImage "titleImage"
111 #define XtCTitleImage "TitleImage"
112 #define XtNfontColor "fontColor"
113 #define XtNmnemonic "mnemonic"
114 #define XtCMnemonic "Mnemonic"
115 #define XtNunderlineTitle "underlineTitle"
116 #define XtCUnderlineTitle "UnderlineTitle"
117 #define XtNmgrUnderlineOverride "mgrUnderlineOverride"
118 #define XtCUnderlineOverride "UnderlineOverride"
119 #define XtNunderlinePosition "underlinePosition"
120 #define XtCUnderlinePosition "UnderlinePosition"
121 #define XtNattachTo "attachTo"
122 #define XtCAttachTo "AttachTo"
123 #define XtNkbdAccelerator "kbdAccelerator"
124 #define XtCKbdAccelerator "KbdAccelerator"
126 #define XtNassociateChildren "associateChildren"
127 #define XtCAssociateChildren "AssociateChildren"
128 #define XtNmenuPost "menuPost"
129 #define XtCMenuPost "MenuPost"
130 #define XtNmenuSelect "menuSelect"
131 #define XtCMenuSelect "MenuSelect"
132 #define XtNpostAccelerator "postAccelerator"
133 #define XtCPostAccelerator "PostAccelerator"
134 #define XtNmenuUnpost "menuUnpost"
135 #define XtCMenuUnpost "MenuUnpost"
136 #define XtNkbdSelect "kbdSelect"
137 #define XtCKbdSelect "KbdSelect"
140 /****************************************************************
142 * TextEdit widget
144 ****************************************************************/
146 #define XtNdisplayPosition "displayPosition"
147 /* #define XtNinsertPosition "insertPosition" */
148 #define XtNleftMargin "leftMargin"
149 #define XtNrightMargin "rightMargin"
150 #define XtNtopMargin "topMargin"
151 #define XtNbottomMargin "bottomMargin"
152 /* #define XtNselectionArray "selectionArray"
153 #define XtNtextSource "textSource"
154 #define XtNselection "selection" */
155 #define XtNmaximumSize "maximumSize"
156 #define XtCMaximumSize "MaximumSize"
158 /* #define XtNeditType "editType"
159 #define XtNfile "file"
160 #define XtNstring "string"
161 #define XtNlength "length"
162 #define XtNfont "font" */
163 #define XtNdiskSrc "disksrc"
164 #define XtNstringSrc "stringsrc"
165 #define XtNexecute "execute"
167 #define XtNsourceType "sourceType"
168 #define XtCSourceType "SourceType"
169 #define XtRSourceType "SourceType"
171 #define XtNmotionVerification "motionVerification"
172 #define XtNmodifyVerification "modifyVerification"
173 #define XtNleaveVerification "leaveVerification"
175 #define XtNwrap "wrap"
176 #define XtCWrap "Wrap"
177 #define XtRWrap "Wrap"
179 #define XtNwrapForm "wrapForm"
180 #define XtCWrapForm "WrapForm"
181 #define XtRWrapForm XtCWrapForm
183 #define XtNwrapBreak "wrapBreak"
184 #define XtCWrapBreak "WrapBreak"
185 #define XtRWrapBreak XtCWrapBreak
187 #define XtNscroll "scroll"
188 #define XtCScroll "Scroll"
189 #define XtRScroll XtCScroll
191 #define XtNgrow "grow"
192 #define XtCGrow "Grow"
193 #define XtRGrow XtCGrow
195 #define XwAutoScrollOff 0
196 #define XwAutoScrollHorizontal 1
197 #define XwAutoScrollVertical 2
198 #define XwAutoScrollBoth 3 /* must be bitwise OR of horiz. and vert. */
200 #define XwGrowOff 0
201 #define XwGrowHorizontal 1
202 #define XwGrowVertical 2
203 #define XwGrowBoth 3 /* must be bitwise OR of horiz. and vert. */
205 /* Valid Label Location Settings for Button */
207 #define XwRIGHT 0
208 #define XwLEFT 1
209 #define XwCENTER 2
211 /* Valid Title Type Values For MenuPane */
213 #define XwSTRING 0
214 #define XwIMAGE 1
215 #define XwRECT 2
218 /* New resource manager types */
220 #define XrmRImage "Image"
221 #define XtRImage XrmRImage
222 #define XtNalignment "alignment"
223 #define XtCAlignment "Alignment"
224 #define XtRAlignment "Alignment"
225 #define XtNlineSpace "lineSpace"
226 #define XtCLineSpace "LineSpace"
228 #define XtNgravity "gravity"
229 #define XtCGravity "Gravity"
230 #ifndef XtRGravity
231 #define XtRGravity "Gravity"
232 #endif
234 typedef enum {
235 XwALIGN_NONE,
236 XwALIGN_LEFT,
237 XwALIGN_CENTER,
238 XwALIGN_RIGHT
239 } XwAlignment;
241 typedef enum {
242 XwUNKNOWN,
243 XwPULLDOWN,
244 XwTITLE,
245 XwWORK_SPACE
246 } XwWidgetType;
248 /* Form resource definitions */
250 #define XwHORIZONTAL 0
251 #define XwVERTICAL 1
253 #define XtNxRefName "xRefName"
254 #define XtCXRefName "XRefName"
255 #define XtNxRefWidget "xRefWidget"
256 #define XtCXRefWidget "XRefWidget"
257 #define XtNxOffset "xOffset"
258 #define XtCXOffset "XOffset"
259 #define XtNxAddWidth "xAddWidth"
260 #define XtCXAddWidth "XAddWidth"
261 #define XtNxVaryOffset "xVaryOffset"
262 #define XtCXVaryOffset "XVaryOffset"
263 #define XtNxResizable "xResizable"
264 #define XtCXResizable "XResizable"
265 #define XtNxAttachRight "xAttachRight"
266 #define XtCXAttachRight "XAttachRight"
267 #define XtNxAttachOffset "xAttachOffset"
268 #define XtCXAttachOffset "XAttachOffset"
270 #define XtNyRefName "yRefName"
271 #define XtCYRefName "YRefName"
272 #define XtNyRefWidget "yRefWidget"
273 #define XtCYRefWidget "YRefWidget"
274 #define XtNyOffset "yOffset"
275 #define XtCYOffset "YOffset"
276 #define XtNyAddHeight "yAddHeight"
277 #define XtCYAddHeight "YAddHeight"
278 #define XtNyVaryOffset "yVaryOffset"
279 #define XtCYVaryOffset "YVaryOffset"
280 #define XtNyResizable "yResizable"
281 #define XtCYResizable "YResizable"
282 #define XtNyAttachBottom "yAttachBottom"
283 #define XtCYAttachBottom "YAttachBottom"
284 #define XtNyAttachOffset "yAttachOffset"
285 #define XtCYAttachOffset "YAttachOffset"
287 /* MenuBtn esource manager definitions */
289 #define XtNlabelType "labelType"
290 #define XtCLabelType "LabelType"
291 #define XtRLabelType "LabelType"
292 #define XtNlabelImage "labelImage"
293 #define XtCLabelImage "LabelImage"
294 #define XtNrectColor "rectColor"
295 #define XtCRectColor "RectColor"
296 #define XtNrectStipple "rectStipple"
297 #define XtCRectStipple "RectStipple"
298 #define XtNcascadeImage "cascadeImage"
299 #define XtCCascadeImage "CascadeImage"
300 #define XtNmarkImage "markImage"
301 #define XtCMarkImage "MarkImage"
302 #define XtNsetMark "setMark"
303 #define XtCSetMark "SetMark"
304 #define XtNnoPad "noPad"
305 #define XtCNoPad "NoPad"
306 #define XtNcascadeOn "cascadeOn"
307 #define XtCCascadeOn "CascadeOn"
308 #define XtNinvertOnEnter "invertOnEnter"
309 #define XtCInvertOnEnter "InvertOnEnter"
310 #define XtNmgrOverrideMnemonic "mgrOverrideMnemonic"
311 #define XtCMgrOverrideMnemonic "MgrOverrideMnemonic"
312 #define XtNcascadeSelect "cascadeSelect"
313 #define XtNcascadeUnselect "cascadeUnselect"
314 #define XtNmenuMgrId "menuMgrId"
315 #define XtCMenuMgrId "MenuMgrId"
316 #define XtNhint "hint"
317 #define XtCHint "Hint"
318 #define XtNhintProc "hintProc"
319 #define XtCHintProc "HintProc"
321 /* Resources for PushButton */
323 #define XtNinvertOnSelect "invertOnSelect"
324 #define XtCInvertOnSelect "InvertOnSelect"
325 #define XtNtoggle "toggle"
326 #define XtCToggle "Toggle"
328 /* Resources for Toggle */
330 #define XtNsquare "square"
331 #define XtCSquare "Square"
332 #define XtNselectColor "selectColor"
334 /* WorkSpace resources */
336 #define XtNexpose "expose"
337 #ifndef XtNresize
338 #define XtNresize "resize"
339 #endif
340 #define XtNkeyDown "keyDown"
341 #define XtNkeyUp "keyUp"
344 /***********************************************************************
346 * Cascading MenuPane Widget Resources
348 ***********************************************************************/
350 #define XtRTitlePositionType "TitlePositionType"
351 #define XtNtitlePosition "titlePosition"
352 #define XtCTitlePosition "TitlePosition"
354 /***********************************************************************
356 * Popup Menu Manager Widget Resources
358 ***********************************************************************/
360 #define XtNstickyMenus "stickyMenus"
361 #define XtCStickyMenus "StickyMenus"
363 /***********************************************************************
365 * Pulldown Menu Manager Widget Resources
367 ***********************************************************************/
370 #define XtNallowCascades "allowCascades"
371 #define XtCAllowCascades "AllowCascades"
372 #define XtNpulldownBarId "pulldownBarId"
373 #define XtCPulldownBarId "PulldownBarId"
376 /***********************************************************************
378 * Cascading MenuPane Widget Attribute Definitions
380 ***********************************************************************/
382 #define XwTOP 0x01
383 #define XwBOTTOM 0x02
384 #define XwBOTH XwTOP|XwBOTTOM
386 /***********************************************************************
388 * Static Text resource string definitions
390 ***********************************************************************/
391 #define XtNstrip "strip"
392 #define XtCStrip "Strip"
394 /************************************************************************
396 * Class record constants for Primitive Widget Meta Class
398 ************************************************************************/
400 extern WidgetClass XwprimitiveWidgetClass;
402 typedef struct _XwPrimitiveClassRec * XwPrimitiveWidgetClass;
403 typedef struct _XwPrimitiveRec * XwPrimitiveWidget;
406 /* Tile types used for area filling and patterned text placement */
408 #define XwFOREGROUND 0
409 #define XwBACKGROUND 1
411 /* Traversal type definitions */
413 #define XwHIGHLIGHT_OFF 0
414 #define XwHIGHLIGHT_ENTER 1
415 #define XwHIGHLIGHT_TRAVERSAL 2
418 /* Border highlighting type defines */
420 #define XwPATTERN_BORDER 1
421 #define XwWIDGET_DEFINED 2
424 /* Manager Layout Info */
426 #define XwIGNORE 0
427 #define XwMINIMIZE 1
428 #define XwMAXIMIZE 2
429 #define XwSWINDOW 3 /* Special Setting for Scrolled Window */
431 #define XtNwidgetType "widgetType"
432 #define XtCWidgetType "WidgetType"
433 #define XtRWidgetType "WidgetType"
435 /************************************************************************
437 * Class record constants for Meta Class Widgets
439 ************************************************************************/
441 extern WidgetClass XwmanagerWidgetClass;
443 typedef struct _XwManagerClassRec * XwManagerWidgetClass;
444 typedef struct _XwManagerRec * XwManagerWidget;
448 extern WidgetClass XwbuttonWidgetClass;
450 typedef struct _XwButtonClassRec * XwButtonWidgetClass;
451 typedef struct _XwButtonRec * XwButtonWidget;
454 extern WidgetClass XwmenupaneWidgetClass;
456 typedef struct _XwMenuPaneClassRec *XwMenuPaneWidgetClass;
457 typedef struct _XwMenuPaneRec *XwMenuPaneWidget;
460 extern WidgetClass XwmenumgrWidgetClass;
462 typedef struct _XwMenuMgrClassRec *XwMenuMgrWidgetClass;
463 typedef struct _XwMenuMgrRec *XwMenuMgrWidget;
467 #endif
468 /* DON'T ADD STUFF AFTER THIS #endif */