remove OSF1 support
[oweals/cde.git] / cde / programs / dtinfo / dtinfo / wwl / include / WWL / WXmGadget.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  * $XConsortium: WXmGadget.h /main/3 1996/06/11 17:00:19 cde-hal $
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 // This code is automatically generated in -*- C++ -*-
45 #ifndef WXmGadget_h
46 #define WXmGadget_h
47
48 #include "wwl.h"
49 #include <X11/Object.h>
50 #include "WObject.h"
51 #include <X11/RectObj.h>
52 #include "WRect.h"
53 #include <Xm/Xm.h>
54
55 class WXmGadget : public WRect {
56 public :
57                 DEFINE_INIT (WXmGadget, WRect, xmGadgetClass)
58         DEFINE_GETTER_SETTER (BorderWidth,Dimension,"borderWidth")
59         DEFINE_GETTER_SETTER (TraversalOn,Boolean,"traversalOn")
60         DEFINE_GETTER_SETTER (HighlightOnEnter,Boolean,"highlightOnEnter")
61         DEFINE_GETTER_SETTER (HighlightThickness,short,"highlightThickness")
62         DEFINE_GETTER_SETTER (ShadowThickness,short,"shadowThickness")
63         DEFINE_GETTER_SETTER (UnitType,unsigned char,"unitType")
64         DEFINE_CALLBACK (HelpCallback,"helpCallback")
65         DEFINE_GETTER_SETTER (UserData,void*,"userData")
66
67 // Constraint Resources -- Valid only in a form
68
69         DEFINE_GETTER_SETTER (TopAttachment,unsigned char,"topAttachment")
70         DEFINE_GETTER_SETTER (BottomAttachment,unsigned char,"bottomAttachment")
71         DEFINE_GETTER_SETTER (LeftAttachment,unsigned char,"leftAttachment")
72         DEFINE_GETTER_SETTER (RightAttachment,unsigned char,"rightAttachment")
73         DEFINE_GETTER_SETTER (TopWidget,Widget,"topWidget")
74         DEFINE_GETTER_SETTER (BottomWidget,Widget,"bottomWidget")
75         DEFINE_GETTER_SETTER (LeftWidget,Widget,"leftWidget")
76         DEFINE_GETTER_SETTER (RightWidget,Widget,"rightWidget")
77         DEFINE_GETTER_SETTER (TopPosition,int,"topPosition")
78         DEFINE_GETTER_SETTER (BottomPosition,int,"bottomPosition")
79         DEFINE_GETTER_SETTER (LeftPosition,int,"leftPosition")
80         DEFINE_GETTER_SETTER (RightPosition,int,"rightPosition")
81         DEFINE_GETTER_SETTER (TopOffset,int,"topOffset")
82         DEFINE_GETTER_SETTER (BottomOffset,int,"bottomOffset")
83         DEFINE_GETTER_SETTER (LeftOffset,int,"leftOffset")
84         DEFINE_GETTER_SETTER (RightOffset,int,"rightOffset")
85         DEFINE_GETTER_SETTER (Resizable,Boolean,"resizable")
86
87 #if XmVersion >= 1002
88 // Constraint Resources -- Valid only in a frame
89
90    DEFINE_GETTER_SETTER (ChildType,unsigned char,"childType")
91    DEFINE_GETTER_SETTER (ChildHorizontalAlignment,unsigned char,"childHorizontalAlignment")
92    DEFINE_GETTER_SETTER (ChildHorizontalSpacing,Dimension,"childHorizontalSpacing")
93    DEFINE_GETTER_SETTER (ChildVerticalAlignment,unsigned char,"childVerticalAlignment")
94 #endif
95
96 // Constraint resources - valid only in a paned window
97
98    DEFINE_GETTER_SETTER (AllowResize,        Boolean,        "allowResize")
99    DEFINE_GETTER_SETTER (PaneMinimum,        Dimension,      "paneMinimum")
100    DEFINE_GETTER_SETTER (PaneMaximum,        Dimension,      "paneMaximum")
101    DEFINE_GETTER_SETTER (PositionIndex,      short,          "positionIndex")
102    DEFINE_GETTER_SETTER (SkipAdjust,         Boolean,        "skipAdjust")
103
104    inline void LeftAttachment( unsigned char to_what, Widget w ) {
105       Arg a; a.name = CASTRNAM "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
106        a.name = CASTRNAM "leftWidget";     a.value = (XtArgVal)w;       _Set(a);
107    }
108
109    inline void LeftAttachment( unsigned char to_what, Widget w, int offset ) {
110       Arg a; a.name = CASTRNAM "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
111        a.name = CASTRNAM "leftOffset";     a.value = (XtArgVal)offset;  _Set(a);
112        a.name = CASTRNAM "leftWidget";     a.value = (XtArgVal)w;       _Set(a);
113    }
114
115    inline void LeftAttachment( unsigned char to_what, int poffset ) {
116       Arg a; a.name = CASTRNAM "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
117       if( to_what == XmATTACH_POSITION ) {
118          a.name = CASTRNAM "leftPosition";
119       } else {
120          a.name = CASTRNAM "leftOffset";
121       }
122       a.value = (XtArgVal)poffset;  _Set(a);
123    }
124
125    inline void LeftAttachment( unsigned char to_what, int position,
126                               int offset ) {
127       Arg a; a.name = CASTRNAM "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
128       a.name = CASTRNAM "leftPosition"; a.value = (XtArgVal)position;  _Set(a);
129       a.name = CASTRNAM "leftOffset";   a.value = (XtArgVal)offset;  _Set(a);
130    }
131
132    inline void RightAttachment( unsigned char to_what, Widget w ) {
133       Arg a; a.name = CASTRNAM "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
134        a.name = CASTRNAM "rightWidget";     a.value = (XtArgVal)w;       _Set(a);
135    }
136
137    inline void RightAttachment( unsigned char to_what, Widget w, int offset ) {
138       Arg a; a.name = CASTRNAM "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
139        a.name = CASTRNAM "rightOffset";     a.value = (XtArgVal)offset;  _Set(a);
140        a.name = CASTRNAM "rightWidget";     a.value = (XtArgVal)w;       _Set(a);
141    }
142
143    inline void RightAttachment( unsigned char to_what, int poffset ) {
144       Arg a; a.name = CASTRNAM "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
145       if( to_what == XmATTACH_POSITION ) {
146          a.name = CASTRNAM "rightPosition";
147       } else {
148          a.name = CASTRNAM "rightOffset";
149       }
150       a.value = (XtArgVal)poffset;  _Set(a);
151    }
152
153    inline void RightAttachment( unsigned char to_what, int position,
154                               int offset ) {
155       Arg a; a.name = CASTRNAM "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
156       a.name = CASTRNAM "rightPosition"; a.value = (XtArgVal)position;  _Set(a);
157       a.name = CASTRNAM "rightOffset";   a.value = (XtArgVal)offset;  _Set(a);
158    }
159  
160    inline void TopAttachment( unsigned char to_what, Widget w ) {
161       Arg a; a.name = CASTRNAM "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
162        a.name = CASTRNAM "topWidget";     a.value = (XtArgVal)w;       _Set(a);
163    }
164
165    inline void TopAttachment( unsigned char to_what, Widget w, int offset ) {
166       Arg a; a.name = CASTRNAM "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
167        a.name = CASTRNAM "topOffset";     a.value = (XtArgVal)offset;  _Set(a);
168        a.name = CASTRNAM "topWidget";     a.value = (XtArgVal)w;       _Set(a);
169    }
170
171    inline void TopAttachment( unsigned char to_what, int poffset ) {
172       Arg a; a.name = CASTRNAM "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
173       if( to_what == XmATTACH_POSITION ) {
174          a.name = CASTRNAM "topPosition";
175       } else {
176          a.name = CASTRNAM "topOffset";
177       }
178       a.value = (XtArgVal)poffset;  _Set(a);
179    }
180
181    inline void TopAttachment( unsigned char to_what, int position,
182                               int offset ) {
183       Arg a; a.name = CASTRNAM "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
184       a.name = CASTRNAM "topPosition"; a.value = (XtArgVal)position;  _Set(a);
185       a.name = CASTRNAM "topOffset";   a.value = (XtArgVal)offset;  _Set(a);
186    }
187
188    inline void BottomAttachment( unsigned char to_what, Widget w ) {
189       Arg a; a.name = CASTRNAM "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
190        a.name = CASTRNAM "bottomWidget";     a.value = (XtArgVal)w;       _Set(a);
191    }
192
193    inline void BottomAttachment( unsigned char to_what, Widget w, int offset ) {
194       Arg a; a.name = CASTRNAM "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
195        a.name = CASTRNAM "bottomOffset";     a.value = (XtArgVal)offset;  _Set(a);
196        a.name = CASTRNAM "bottomWidget";     a.value = (XtArgVal)w;       _Set(a);
197    }
198
199    inline void BottomAttachment( unsigned char to_what, int poffset ) {
200       Arg a; a.name = CASTRNAM "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
201       if( to_what == XmATTACH_POSITION ) {
202          a.name = CASTRNAM "bottomPosition";
203       } else {
204          a.name = CASTRNAM "bottomOffset";
205       }
206       a.value = (XtArgVal)poffset;  _Set(a);
207    }
208
209    inline void BottomAttachment( unsigned char to_what, int position,
210                               int offset ) {
211       Arg a; a.name = CASTRNAM "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
212       a.name = CASTRNAM "bottomPosition"; a.value = (XtArgVal)position;  _Set(a);
213       a.name = CASTRNAM "bottomOffset";   a.value = (XtArgVal)offset;  _Set(a);
214    }
215
216 };
217
218 #define NULLWXmGadget           WXmGadget((Widget)0)
219
220 #endif