remove OSF1 support
[oweals/cde.git] / cde / programs / dtinfo / dtinfo / wwl / include / WWL / WArgList.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these libraries and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /*
24  * $TOG: WArgList.h /main/4 1998/04/17 11:45:37 mgreess $
25  *
26  * Copyright (c) 1991 HaL Computer Systems, Inc.  All rights reserved.
27  * UNPUBLISHED -- rights reserved under the Copyright Laws of the United
28  * States.  Use of a copyright notice is precautionary only and does not
29  * imply publication or disclosure.
30  * 
31  * This software contains confidential information and trade secrets of HaL
32  * Computer Systems, Inc.  Use, disclosure, or reproduction is prohibited
33  * without the prior express written permission of HaL Computer Systems, Inc.
34  * 
35  *                         RESTRICTED RIGHTS LEGEND
36  * Use, duplication, or disclosure by the Government is subject to
37  * restrictions as set forth in subparagraph (c)(l)(ii) of the Rights in
38  * Technical Data and Computer Software clause at DFARS 252.227-7013.
39  *                        HaL Computer Systems, Inc.
40  *                  1315 Dell Avenue, Campbell, CA  95008
41  * 
42  */
43
44 #ifndef WArgList_h
45 #define WArgList_h
46
47 // Allow setting of resources by name in arg list
48 #if defined(linux) || defined(CSRG_BASED) || defined(sun)
49 #define CASTRNAM (char*)
50 #define CASTVAL  (void*)(size_t)
51 #else
52 #define CASTRNAM
53 #define CASTVAL
54 #endif
55
56 #define RSRC_SET(RSC,TYP,RNAM) \
57    inline WArgList& RSC(TYP val) { return Add(CASTRNAM RNAM, CASTVAL val); }
58
59 // Use this one to comment out call
60 #define DONT_SET(RSC,TYP,RNAM)
61
62 class WArgList {
63
64 protected :
65
66    ArgList      args;
67    Cardinal     num_args;
68    Cardinal     alloc_args;
69
70    Arg&         Grow(Cardinal n);
71
72 public :
73
74    WArgList(String name, XtArgVal value, ...);
75    inline       WArgList() {
76       args       = NULL;
77       num_args   =
78       alloc_args = 0;
79    }
80
81    inline       WArgList(Cardinal len) {
82       args       = new Arg[len];
83       num_args   = 0;
84       alloc_args = len;
85    }
86
87    inline       WArgList(ArgList a, Cardinal n) {
88       args       = a;
89       num_args   = n;
90       alloc_args = 0;
91    }
92
93    inline       ~WArgList() {
94       if ( alloc_args ) {
95                 delete [] args;
96       }
97    }
98
99    WArgList(const WArgList &r);
100
101    inline ArgList       Args() const    { return args; }
102    inline Cardinal      NumArgs() const { return num_args; }
103    inline void          Reset()         { num_args = 0; }
104    inline Arg&          operator[] (Cardinal n);
105    WArgList&    Add(String name, XtArgVal value);
106    inline WArgList&     Add(String name, void* value) {
107       return Add(name, (XtArgVal)value);
108    }
109
110 #ifdef XmString_h
111    inline WArgList&     Add(String name, const WXmString& value) {
112       return Add(name, (XmString)value);
113    }
114 #endif
115
116    friend class WObject;
117    friend class CConstraint;
118
119 // The following methods allow setting of resources by name in arg list
120
121    RSRC_SET(Accelerator,        char*,          "accelerator")
122    RSRC_SET(AcceleratorText,    XmString,       "acceleratorText")
123    RSRC_SET(Accelerators,       XtTranslations, "accelerators")
124    RSRC_SET(AdjustLast,         Boolean,        "adjustLast")
125    RSRC_SET(AdjustMargin,       Boolean,        "adjustMargin")
126    RSRC_SET(Alignment,          unsigned char,  "alignment")
127    RSRC_SET(AllowOverlap,       Boolean,        "allowOverlap")
128    RSRC_SET(AllowResize,        Boolean,        "allowResize")
129    RSRC_SET(AllowShellResize,   Boolean,        "allowShellResize")
130    RSRC_SET(AncestorSensitive,  Boolean,        "ancestorSensitive")
131    RSRC_SET(ApplyLabelString,   XmString,       "applyLabelString")
132    RSRC_SET(Argc,               int,            "argc")
133    RSRC_SET(Argv,               void*,          "argv")
134    RSRC_SET(ArmColor,           Pixel,          "armColor")
135    RSRC_SET(ArmPixmap,          Pixmap,         "armPixmap")
136    RSRC_SET(ArrowDirection,     unsigned char,  "arrowDirection")
137    RSRC_SET(AutoShowCursorPosition,     Boolean,        "autoShowCursorPosition")
138    RSRC_SET(AutoUnmanage,       Boolean,        "autoUnmanage")
139    RSRC_SET(AutomaticSelection, Boolean,        "automaticSelection")
140    RSRC_SET(Background,         Pixel,          "background")
141    RSRC_SET(BackgroundPixmap,   Pixmap,         "backgroundPixmap")
142    RSRC_SET(BlinkRate,          int,            "blinkRate")
143    RSRC_SET(BorderColor,        Pixel,          "borderColor")
144    RSRC_SET(BorderPixmap,       Pixmap,         "borderPixmap")
145    RSRC_SET(BorderWidth,        Dimension,      "borderWidth")
146    RSRC_SET(BottomAttachment,   unsigned char,  "bottomAttachment")
147    RSRC_SET(BottomOffset,       int,            "bottomOffset")
148    RSRC_SET(BottomPosition,     int,            "bottomPosition")
149    RSRC_SET(BottomShadowColor,  Pixel,          "bottomShadowColor")
150    RSRC_SET(BottomShadowPixmap, Pixmap,         "bottomShadowPixmap")
151    RSRC_SET(BottomWidget,       Widget,         "bottomWidget")
152    RSRC_SET(ButtonFontList,     XmFontList,     "buttonFontList")
153    RSRC_SET(CancelButton,       Widget,         "cancelButton")
154    RSRC_SET(CancelLabelString,  XmString,       "cancelLabelString")
155    RSRC_SET(CascadePixmap,      Pixmap,         "cascadePixmap")
156    RSRC_SET(ClipWindow,         Widget,         "clipWindow")
157    RSRC_SET(Colormap,           void*,          "colormap")
158    RSRC_SET(Columns,            short,          "columns")
159    RSRC_SET(Command,            XmString,       "command")
160    RSRC_SET(CommandWindow,      Widget,         "commandWindow")
161    DONT_SET(CreatePopupChildProc,       XtProc, "createPopupChildProc")
162    RSRC_SET(CursorPosition,     XmTextPosition, "cursorPosition")
163    RSRC_SET(CursorPositionVisible,      Boolean,        "cursorPositionVisible")
164    RSRC_SET(DecimalPoints,      short,          "decimalPoints")
165    RSRC_SET(DefaultButton,      Widget,         "defaultButton")
166    RSRC_SET(DefaultButtonType,  unsigned char,  "defaultButtonType")
167    RSRC_SET(DefaultPosition,    Boolean,        "defaultPosition")
168    RSRC_SET(DeleteResponse,     unsigned char,  "deleteResponse")
169    RSRC_SET(Depth,              int,            "depth")
170    RSRC_SET(DialogStyle,        unsigned char,  "dialogStyle")
171    RSRC_SET(DialogTitle,        XmString,       "dialogTitle")
172    RSRC_SET(DialogType,         unsigned char,  "dialogType")
173    RSRC_SET(DirMask,            XmString,       "dirMask")
174    RSRC_SET(DirSpec,            XmString,       "dirSpec")
175    RSRC_SET(DoubleClickInterval,        int,    "doubleClickInterval")
176    RSRC_SET(EditMode,           unsigned char,  "editMode")
177    RSRC_SET(Editable,           Boolean,        "editable")
178    RSRC_SET(EntryAlignment,     unsigned char,  "entryAlignment")
179    RSRC_SET(EntryBorder,        Dimension,      "entryBorder")
180    RSRC_SET(EntryClass,         int,            "entryClass")
181    DONT_SET(FileSearchProc,     XtProc,         "fileSearchProc")
182    RSRC_SET(FillOnArm,          Boolean,        "fillOnArm")
183    RSRC_SET(FillOnSelect,       Boolean,        "fillOnSelect")
184    RSRC_SET(FilterLabelString,  XmString,       "filterLabelString")
185    RSRC_SET(FontList,           XmFontList,     "fontList")
186    RSRC_SET(Foreground,         Pixel,          "foreground")
187    RSRC_SET(FractionBase,       int,            "fractionBase")
188    RSRC_SET(Geometry,           char*,          "geometry")
189    RSRC_SET(Height,             Dimension,      "height")
190    RSRC_SET(HeightInc,          int,            "heightInc")
191    RSRC_SET(HelpLabelString,    XmString,       "helpLabelString")
192    RSRC_SET(HighlightColor,     Pixel,          "highlightColor")
193    RSRC_SET(HighlightOnEnter,   Boolean,        "highlightOnEnter")
194    RSRC_SET(HighlightPixmap,    Pixmap,         "highlightPixmap")
195    RSRC_SET(HighlightThickness, short,          "highlightThickness")
196    RSRC_SET(HistoryItemCount,   int,            "historyItemCount")
197    RSRC_SET(HistoryItems,       XmStringTable,  "historyItems")
198    RSRC_SET(HistoryMaxItems,    int,            "historyMaxItems")
199    RSRC_SET(HistoryVisibleItemCount,    int,    "historyVisibleItemCount")
200    RSRC_SET(HorizontalScrollBar,        Widget, "horizontalScrollBar")
201    RSRC_SET(HorizontalSpacing,  int,            "horizontalSpacing")
202    RSRC_SET(IconMask,           Pixmap,         "iconMask")
203    RSRC_SET(IconName,           char*,          "iconName")
204    RSRC_SET(IconPixmap,         Pixmap,         "iconPixmap")
205    RSRC_SET(IconWindow,         Widget,         "iconWindow")
206    RSRC_SET(IconX,              int,            "iconX")
207    RSRC_SET(IconY,              int,            "iconY")
208    RSRC_SET(Iconic,             Boolean,        "iconic")
209    RSRC_SET(Increment,          int,            "increment")
210    RSRC_SET(IndicatorOn,        Boolean,        "indicatorOn")
211    RSRC_SET(IndicatorSize,      Dimension,      "indicatorSize")
212    RSRC_SET(IndicatorType,      unsigned char,  "indicatorType")
213    RSRC_SET(InitialDelay,       int,            "initialDelay")
214    RSRC_SET(InitialState,       int,            "initialState")
215    RSRC_SET(Input,              Boolean,        "input")
216    DONT_SET(InputCreate,        XtProc,         "inputCreate")
217    RSRC_SET(InsertPosition,     XtOrderProc,    "insertPosition")
218    RSRC_SET(IsAligned,          Boolean,        "isAligned")
219    RSRC_SET(IsHomogeneous,      Boolean,        "isHomogeneous")
220    RSRC_SET(ItemCount,          int,            "itemCount")
221    RSRC_SET(Items,              XmStringTable,  "items")
222    RSRC_SET(KeyboardFocusPolicy,        unsigned char,  "keyboardFocusPolicy")
223    RSRC_SET(LabelFontList,      XmFontList,     "labelFontList")
224    RSRC_SET(LabelInsensitivePixmap,     Pixmap, "labelInsensitivePixmap")
225    RSRC_SET(LabelPixmap,        Pixmap,         "labelPixmap")
226    RSRC_SET(LabelString,        XmString,       "labelString")
227    RSRC_SET(LabelType,          unsigned char,  "labelType")
228    RSRC_SET(LeftAttachment,     unsigned char,  "leftAttachment")
229    RSRC_SET(LeftOffset,         int,            "leftOffset")
230    RSRC_SET(LeftPosition,       int,            "leftPosition")
231    RSRC_SET(LeftWidget,         Widget,         "leftWidget")
232    RSRC_SET(ListItemCount,      int,            "listItemCount")
233    RSRC_SET(ListItems,          XmStringTable,  "listItems")
234    RSRC_SET(ListLabelString,    XmString,       "listLabelString")
235    RSRC_SET(ListMarginHeight,   short,          "listMarginHeight")
236    RSRC_SET(ListMarginWidth,    short,          "listMarginWidth")
237    RSRC_SET(ListSizePolicy,     unsigned char,  "listSizePolicy")
238    RSRC_SET(ListSpacing,        short,          "listSpacing")
239    RSRC_SET(ListUpdated,        Boolean,        "listUpdated")
240    RSRC_SET(ListVisibleItemCount,       int,    "listVisibleItemCount")
241    RSRC_SET(MainWindowMarginHeight,     short,  "mainWindowMarginHeight")
242    RSRC_SET(MainWindowMarginWidth,      short,  "mainWindowMarginWidth")
243    RSRC_SET(MappedWhenManaged,  Boolean,        "mappedWhenManaged")
244    RSRC_SET(MappingDelay,       int,            "mappingDelay")
245    RSRC_SET(Margin,             short,          "margin")
246    RSRC_SET(MarginBottom,       short,          "marginBottom")
247    RSRC_SET(MarginHeight,       Dimension,      "marginHeight")
248    RSRC_SET(MarginLeft,         short,          "marginLeft")
249    RSRC_SET(MarginRight,        short,          "marginRight")
250    RSRC_SET(MarginTop,          short,          "marginTop")
251    RSRC_SET(MarginWidth,        Dimension,      "marginWidth")
252    RSRC_SET(MaxAspectX,         int,            "maxAspectX")
253    RSRC_SET(MaxAspectY,         int,            "maxAspectY")
254    RSRC_SET(MaxHeight,          int,            "maxHeight")
255    RSRC_SET(MaxLength,          int,            "maxLength")
256    RSRC_SET(MaxWidth,           int,            "maxWidth")
257    RSRC_SET(Maximum,            int,            "maximum")
258    RSRC_SET(MenuAccelerator,    char*,          "menuAccelerator")
259    RSRC_SET(MenuBar,            Widget,         "menuBar")
260    RSRC_SET(MenuHelpWidget,     Widget,         "menuHelpWidget")
261    RSRC_SET(MenuHistory,        Widget,         "menuHistory")
262    RSRC_SET(MessageAlignment,   unsigned char,  "messageAlignment")
263    RSRC_SET(MessageString,      XmString,       "messageString")
264    RSRC_SET(MessageWindow,      Widget,         "messageWindow")
265    RSRC_SET(MinAspectX,         int,            "minAspectX")
266    RSRC_SET(MinAspectY,         int,            "minAspectY")
267    RSRC_SET(MinHeight,          int,            "minHeight")
268    RSRC_SET(MinWidth,           int,            "minWidth")
269    RSRC_SET(MinimizeButtons,    Boolean,        "minimizeButtons")
270    RSRC_SET(Minimum,            int,            "minimum")
271    RSRC_SET(Mnemonic,           char,           "mnemonic")
272    RSRC_SET(MultiClick,         unsigned char,  "multiClick")
273    RSRC_SET(MustMatch,          Boolean,        "mustMatch")
274    RSRC_SET(MwmDecorations,     int,            "mwmDecorations")
275    RSRC_SET(MwmFunctions,       int,            "mwmFunctions")
276    RSRC_SET(MwmInputMode,       int,            "mwmInputMode")
277    RSRC_SET(MwmMenu,            char*,          "mwmMenu")
278    RSRC_SET(NavigationType,     XmNavigationType,       "navigationType")
279    RSRC_SET(NoResize,           Boolean,        "noResize")
280    RSRC_SET(NumColumns,         short,          "numColumns")
281    RSRC_SET(OkLabelString,      XmString,       "okLabelString")
282    RSRC_SET(Orientation,        unsigned char,  "orientation")
283    DONT_SET(OutputCreate,       XtProc,         "outputCreate")
284    RSRC_SET(OverrideRedirect,   Boolean,        "overrideRedirect")
285    RSRC_SET(Packing,            unsigned char,  "packing")
286    RSRC_SET(PageIncrement,      int,            "pageIncrement")
287    RSRC_SET(PaneMaximum,        Dimension,      "paneMaximum")
288    RSRC_SET(PaneMinimum,        Dimension,      "paneMinimum")
289    RSRC_SET(Pattern,            XmString,       "pattern")
290    RSRC_SET(PendingDelete,      Boolean,        "pendingDelete")
291    RSRC_SET(PopupEnabled,       Boolean,        "popupEnabled")
292    RSRC_SET(PositionIndex,      short,          "positionIndex")
293    RSRC_SET(ProcessingDirection,        unsigned char,  "processingDirection")
294    RSRC_SET(PromptString,       XmString,       "promptString")
295    RSRC_SET(PushButtonEnabled,  Boolean,        "pushButtonEnabled")
296    RSRC_SET(RadioAlwaysOne,     Boolean,        "radioAlwaysOne")
297    RSRC_SET(RadioBehavior,      Boolean,        "radioBehavior")
298    RSRC_SET(RecomputeSize,      Boolean,        "recomputeSize")
299    RSRC_SET(RefigureMode,       Boolean,        "refigureMode")
300    RSRC_SET(RepeatDelay,        int,            "repeatDelay")
301    RSRC_SET(Resizable,          Boolean,        "resizable")
302    RSRC_SET(ResizeHeight,       Boolean,        "resizeHeight")
303    RSRC_SET(ResizePolicy,       unsigned char,  "resizePolicy")
304    RSRC_SET(ResizeWidth,        Boolean,        "resizeWidth")
305    RSRC_SET(RightAttachment,    unsigned char,  "rightAttachment")
306    RSRC_SET(RightOffset,        int,            "rightOffset")
307    RSRC_SET(RightPosition,      int,            "rightPosition")
308    RSRC_SET(RightWidget,        Widget,         "rightWidget")
309    RSRC_SET(RowColumnType,      unsigned char,  "rowColumnType")
310    RSRC_SET(Rows,               short,          "rows")
311    RSRC_SET(RubberPositioning,  Boolean,        "rubberPositioning")
312    RSRC_SET(SashHeight,         Dimension,      "sashHeight")
313    RSRC_SET(SashIndent,         Position,       "sashIndent")
314    RSRC_SET(SashShadowThickness,        int,    "sashShadowThickness")
315    RSRC_SET(SashWidth,          Dimension,      "sashWidth")
316    RSRC_SET(SaveUnder,          Boolean,        "saveUnder")
317    RSRC_SET(ScaleHeight,        Dimension,      "scaleHeight")
318    RSRC_SET(ScaleWidth,         Dimension,      "scaleWidth")
319    RSRC_SET(ScrollBarDisplayPolicy,     unsigned char,  "scrollBarDisplayPolicy")
320    RSRC_SET(ScrollBarPlacement, unsigned char,  "scrollBarPlacement")
321    RSRC_SET(ScrollHorizontal,   Boolean,        "scrollHorizontal")
322    RSRC_SET(ScrollLeftSide,     Boolean,        "scrollLeftSide")
323    RSRC_SET(ScrollTopSide,      Boolean,        "scrollTopSide")
324    RSRC_SET(ScrollVertical,     Boolean,        "scrollVertical")
325    RSRC_SET(ScrolledWindowMarginHeight, short,  "scrolledWindowMarginHeight")
326    RSRC_SET(ScrolledWindowMarginWidth,  short,  "scrolledWindowMarginWidth")
327    RSRC_SET(ScrollingPolicy,    unsigned char,  "scrollingPolicy")
328    RSRC_SET(SelectColor,        Pixel,          "selectColor")
329    RSRC_SET(SelectInsensitivePixmap,    Pixmap, "selectInsensitivePixmap")
330    RSRC_SET(SelectPixmap,       Pixmap,         "selectPixmap")
331    RSRC_SET(SelectThreshold,    int,            "selectThreshold")
332    RSRC_SET(SelectedItemCount,  int,            "selectedItemCount")
333    RSRC_SET(SelectedItems,      XmStringTable,  "selectedItems")
334    RSRC_SET(SelectionArray,     XtPointer,      "selectionArray")
335    RSRC_SET(SelectionArrayCount,        int,    "selectionArrayCount")
336    RSRC_SET(SelectionLabelString,       XmString,       "selectionLabelString")
337    RSRC_SET(SelectionPolicy,    unsigned char,  "selectionPolicy")
338    RSRC_SET(Sensitive,          Boolean,        "sensitive")
339    RSRC_SET(SeparatorOn,        Boolean,        "separatorOn")
340    RSRC_SET(SeparatorType,      unsigned char,  "separatorType")
341    RSRC_SET(Set,                Boolean,        "set")
342    RSRC_SET(ShadowThickness,    short,          "shadowThickness")
343    RSRC_SET(ShadowType,         unsigned char,  "shadowType")
344    RSRC_SET(ShellUnitType,      unsigned char,  "shellUnitType")
345    RSRC_SET(ShowArrows,         Boolean,        "showArrows")
346    RSRC_SET(ShowAsDefault,      short,          "showAsDefault")
347    RSRC_SET(ShowSeparator,      Boolean,        "showSeparator")
348    RSRC_SET(ShowValue,          Boolean,        "showValue")
349    RSRC_SET(SkipAdjust,         Boolean,        "skipAdjust")
350    RSRC_SET(SliderSize,         int,            "sliderSize")
351    DONT_SET(Source,             XmTextSource,   "source")
352    RSRC_SET(Spacing,            Dimension,      "spacing")
353    RSRC_SET(StringDirection,    unsigned char,  "stringDirection")
354    RSRC_SET(SubMenuId,          Widget,         "subMenuId")
355    RSRC_SET(SymbolPixmap,       Pixmap,         "symbolPixmap")
356    RSRC_SET(TextAccelerators,   XtTranslations, "textAccelerators")
357    RSRC_SET(TextColumns,        short,          "textColumns")
358    RSRC_SET(TextFontList,       XmFontList,     "textFontList")
359    RSRC_SET(TextString,         XmString,       "textString")
360    RSRC_SET(TextTranslations,   XtTranslations, "textTranslations")
361    RSRC_SET(Title,              char*,          "title")
362    RSRC_SET(TitleString,        XmString,       "titleString")
363    RSRC_SET(TopAttachment,      unsigned char,  "topAttachment")
364    RSRC_SET(TopCharacter,       XmTextPosition, "topCharacter")
365    RSRC_SET(TopItemPosition,    int,            "topItemPosition")
366    RSRC_SET(TopOffset,          int,            "topOffset")
367    RSRC_SET(TopPosition,        int,            "topPosition")
368    RSRC_SET(TopShadowColor,     Pixel,          "topShadowColor")
369    RSRC_SET(TopShadowPixmap,    Pixmap,         "topShadowPixmap")
370    RSRC_SET(TopWidget,          Widget,         "topWidget")
371    RSRC_SET(Transient,          Boolean,        "transient")
372    RSRC_SET(Translations,       XtTranslations, "translations")
373    RSRC_SET(TraversalOn,        Boolean,        "traversalOn")
374    RSRC_SET(UnitType,           unsigned char,  "unitType")
375    RSRC_SET(UserData,           void*,          "userData")
376    RSRC_SET(Value,              char*,          "value")
377    RSRC_SET(Value,              int,            "value")
378    RSRC_SET(VerifyBell,         Boolean,        "verifyBell")
379    RSRC_SET(VerticalScrollBar,  Widget,         "verticalScrollBar")
380    RSRC_SET(VerticalSpacing,    int,            "verticalSpacing")
381    RSRC_SET(VisibleItemCount,   int,            "visibleItemCount")
382    RSRC_SET(VisibleWhenOff,     Boolean,        "visibleWhenOff")
383    RSRC_SET(VisualPolicy,       unsigned char,  "visualPolicy")
384    RSRC_SET(Waitforwm,          Boolean,        "waitforwm")
385    RSRC_SET(WhichButton,        unsigned int,   "whichButton")
386    RSRC_SET(Width,              Dimension,      "width")
387    RSRC_SET(WidthInc,           int,            "widthInc")
388    RSRC_SET(WindowGroup,        Widget,         "windowGroup")
389    RSRC_SET(WmTimeout,          int,            "wmTimeout")
390    RSRC_SET(WordWrap,           Boolean,        "wordWrap")
391    RSRC_SET(WorkWindow,         Widget,         "workWindow")
392    RSRC_SET(X,                  Position,       "x")
393    RSRC_SET(Y,                  Position,       "y")
394    RSRC_SET(_Screen,            void*,          "screen")
395
396 #if XmVersion >= 1002
397 // Constraint Resources -- Valid only in a frame
398    RSRC_SET(ChildType,                unsigned char, "childType")
399    RSRC_SET(ChildHorizontalAlignment, unsigned char, "childHorizontalAlignment")
400    RSRC_SET(ChildHorizontalSpacing,   Dimension,     "childHorizontalSpacing")
401    RSRC_SET(ChildVerticalAlignment,   unsigned char, "childVerticalAlignment")
402 #endif
403
404    inline WArgList& LeftAttachment(unsigned char to_what, Widget w) {
405       LeftAttachment(to_what);
406       LeftWidget(w);
407       return *this;
408    }
409    inline WArgList& LeftAttachment(unsigned char to_what, Widget w,int off) {
410       LeftAttachment(to_what);
411       LeftWidget(w);
412       LeftOffset(off);
413       return *this;
414    }
415    inline WArgList& LeftAttachment(unsigned char to_what, int posoff) {
416       LeftAttachment(to_what);
417       if( to_what == XmATTACH_POSITION ) LeftPosition(posoff);
418       else                               LeftOffset(posoff);
419       return *this;
420    }
421    inline WArgList& LeftAttachment(unsigned char to_what, int pos, int off) {
422       LeftAttachment(to_what);
423       LeftPosition(pos);
424       LeftOffset(off);
425       return *this;
426    }
427
428    inline WArgList& RightAttachment(unsigned char to_what, Widget w) {
429       RightAttachment(to_what);
430       RightWidget(w);
431       return *this;
432    }
433    inline WArgList& RightAttachment(unsigned char to_what, Widget w,int off) {
434       RightAttachment(to_what);
435       RightWidget(w);
436       RightOffset(off);
437       return *this;
438    }
439    inline WArgList& RightAttachment(unsigned char to_what, int posoff) {
440       RightAttachment(to_what);
441       if( to_what == XmATTACH_POSITION ) RightPosition(posoff);
442       else                               RightOffset(posoff);
443       return *this;
444    }
445    inline WArgList& RightAttachment(unsigned char to_what, int pos, int off) {
446       RightAttachment(to_what);
447       RightPosition(pos);
448       RightOffset(off);
449       return *this;
450    }
451
452    inline WArgList& TopAttachment(unsigned char to_what, Widget w) {
453       TopAttachment(to_what);
454       TopWidget(w);
455       return *this;
456    }
457    inline WArgList& TopAttachment(unsigned char to_what, Widget w,int off) {
458       TopAttachment(to_what);
459       TopWidget(w);
460       TopOffset(off);
461       return *this;
462    }
463    inline WArgList& TopAttachment(unsigned char to_what, int posoff) {
464       TopAttachment(to_what);
465       if( to_what == XmATTACH_POSITION ) TopPosition(posoff);
466       else                               TopOffset(posoff);
467       return *this;
468    }
469    inline WArgList& TopAttachment(unsigned char to_what, int pos, int off) {
470       TopAttachment(to_what);
471       TopPosition(pos);
472       TopOffset(off);
473       return *this;
474    }
475
476    inline WArgList& BottomAttachment(unsigned char to_what, Widget w) {
477       BottomAttachment(to_what);
478       BottomWidget(w);
479       return *this;
480    }
481    inline WArgList& BottomAttachment(unsigned char to_what, Widget w,int off) {
482       BottomAttachment(to_what);
483       BottomWidget(w);
484       BottomOffset(off);
485       return *this;
486    }
487    inline WArgList& BottomAttachment(unsigned char to_what, int posoff) {
488       BottomAttachment(to_what);
489       if( to_what == XmATTACH_POSITION ) BottomPosition(posoff);
490       else                               BottomOffset(posoff);
491       return *this;
492    }
493    inline WArgList& BottomAttachment(unsigned char to_what, int pos, int off) {
494       BottomAttachment(to_what);
495       BottomPosition(pos);
496       BottomOffset(off);
497       return *this;
498    }
499 };
500
501 inline Arg&
502 WArgList::operator [] (Cardinal n)
503 {
504    if (n < num_args|| n < alloc_args) return args[n];
505    else                               return Grow(n);
506 }
507
508
509 #endif // WArgList_h