remove OSF1 support
[oweals/cde.git] / cde / programs / dtinfo / dtinfo / wwl / include / WWL / WXmPrimitive.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: WXmPrimitive.h /main/3 1996/06/11 17:01:28 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 WXmPrimitive_h
46 #define WXmPrimitive_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 <X11/Core.h>
54 #include "WCore.h"
55 #include <Xm/Xm.h>
56
57 class WXmPrimitive : public WCore {
58 public :
59    DEFINE_INIT (WXmPrimitive, WCore, xmPrimitiveWidgetClass)
60    DEFINE_GETTER_SETTER (Background,Pixel,"background")
61    DEFINE_GETTER_SETTER (BackgroundPixmap,Pixmap,"backgroundPixmap")
62    DEFINE_GETTER_SETTER (BorderWidth,Dimension,"borderWidth")
63    DEFINE_GETTER_SETTER (BottomShadowColor,Pixel,"bottomShadowColor")
64    DEFINE_GETTER_SETTER (BottomShadowPixmap,Pixmap,"bottomShadowPixmap")
65    DEFINE_GETTER_SETTER (Foreground,Pixel,"foreground")
66    DEFINE_GETTER_SETTER (HighlightColor,Pixel,"highlightColor")
67    DEFINE_GETTER_SETTER (HighlightOnEnter,Boolean,"highlightOnEnter")
68    DEFINE_GETTER_SETTER (HighlightPixmap,Pixmap,"highlightPixmap")
69    DEFINE_GETTER_SETTER (HighlightThickness,short,"highlightThickness")
70    DEFINE_GETTER_SETTER (NavigationType,XmNavigationType,"navigationType")
71    DEFINE_GETTER_SETTER (ShadowThickness,short,"shadowThickness")
72    DEFINE_GETTER_SETTER (TopShadowColor,Pixel,"topShadowColor")
73    DEFINE_GETTER_SETTER (TopShadowPixmap,Pixmap,"topShadowPixmap")
74    DEFINE_GETTER_SETTER (TraversalOn,Boolean,"traversalOn")
75    DEFINE_GETTER_SETTER (UnitType,unsigned char,"unitType")
76    DEFINE_GETTER_SETTER (UserData,void*,"userData")
77    DEFINE_CALLBACK (HelpCallback,"helpCallback")
78
79 // Constraint Resources -- Valid only in a form
80
81    DEFINE_GETTER_SETTER (TopAttachment,unsigned char,"topAttachment")
82    DEFINE_GETTER_SETTER (BottomAttachment,unsigned char,"bottomAttachment")
83    DEFINE_GETTER_SETTER (LeftAttachment,unsigned char,"leftAttachment")
84    DEFINE_GETTER_SETTER (RightAttachment,unsigned char,"rightAttachment")
85    DEFINE_GETTER_SETTER (TopWidget,Widget,"topWidget")
86    DEFINE_GETTER_SETTER (BottomWidget,Widget,"bottomWidget")
87    DEFINE_GETTER_SETTER (LeftWidget,Widget,"leftWidget")
88    DEFINE_GETTER_SETTER (RightWidget,Widget,"rightWidget")
89    DEFINE_GETTER_SETTER (TopPosition,int,"topPosition")
90    DEFINE_GETTER_SETTER (BottomPosition,int,"bottomPosition")
91    DEFINE_GETTER_SETTER (LeftPosition,int,"leftPosition")
92    DEFINE_GETTER_SETTER (RightPosition,int,"rightPosition")
93    DEFINE_GETTER_SETTER (TopOffset,int,"topOffset")
94    DEFINE_GETTER_SETTER (BottomOffset,int,"bottomOffset")
95    DEFINE_GETTER_SETTER (LeftOffset,int,"leftOffset")
96    DEFINE_GETTER_SETTER (RightOffset,int,"rightOffset")
97    DEFINE_GETTER_SETTER (Resizable,Boolean,"resizable")
98
99 #if XmVersion >= 1002
100 // Constraint Resources -- Valid only in a frame
101
102    DEFINE_GETTER_SETTER (ChildType,unsigned char,"childType")
103    DEFINE_GETTER_SETTER (ChildHorizontalAlignment,unsigned char,"childHorizontalAlignment")
104    DEFINE_GETTER_SETTER (ChildHorizontalSpacing,Dimension,"childHorizontalSpacing")
105    DEFINE_GETTER_SETTER (ChildVerticalAlignment,unsigned char,"childVerticalAlignment")
106 #endif
107
108 // Constraint resources - valid only in a paned window
109
110    DEFINE_GETTER_SETTER (AllowResize,        Boolean,        "allowResize")
111    DEFINE_GETTER_SETTER (PaneMinimum,        Dimension,      "paneMinimum")
112    DEFINE_GETTER_SETTER (PaneMaximum,        Dimension,      "paneMaximum")
113    DEFINE_GETTER_SETTER (PositionIndex,      short,          "positionIndex")
114    DEFINE_GETTER_SETTER (SkipAdjust,         Boolean,        "skipAdjust")
115
116    inline void LeftAttachment( unsigned char to_what, Widget w ) {
117       Arg a; a.name = CASTRNAM "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
118        a.name = CASTRNAM "leftWidget";     a.value = (XtArgVal)w;       _Set(a);
119    }
120
121    inline void LeftAttachment( unsigned char to_what, Widget w, int offset ) {
122       Arg a; a.name = CASTRNAM "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
123        a.name = CASTRNAM "leftOffset";     a.value = (XtArgVal)offset;  _Set(a);
124        a.name = CASTRNAM "leftWidget";     a.value = (XtArgVal)w;       _Set(a);
125    }
126
127
128    inline void LeftAttachment( unsigned char to_what, int poffset ) {
129       Arg a; a.name = CASTRNAM "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
130       if( to_what == XmATTACH_POSITION ) {
131          a.name = CASTRNAM "leftPosition";
132          a.value = (XtArgVal)poffset;  _Set(a);
133       } else {
134          a.name = CASTRNAM "leftOffset";
135          a.value = (XtArgVal)poffset;  _Set(a);
136       }
137    }
138 // For some reason a warning is generated if the line
139 //       a.value = (XtArgVal)poffset;  _Set(a);
140 // is not duplicated in the if and else clauses
141
142    inline void LeftAttachment( unsigned char to_what, int position,
143                               int offset ) {
144       Arg a; a.name = CASTRNAM "leftAttachment"; a.value = (XtArgVal)to_what; _Set(a);
145       a.name = CASTRNAM "leftPosition"; a.value = (XtArgVal)position;  _Set(a);
146       a.name = CASTRNAM "leftOffset";   a.value = (XtArgVal)offset;  _Set(a);
147    }
148
149    inline void RightAttachment( unsigned char to_what, Widget w ) {
150       Arg a; a.name = CASTRNAM "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
151        a.name = CASTRNAM "rightWidget";     a.value = (XtArgVal)w;       _Set(a);
152    }
153
154    inline void RightAttachment( unsigned char to_what, Widget w, int offset ) {
155       Arg a; a.name = CASTRNAM "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
156        a.name = CASTRNAM "rightOffset";     a.value = (XtArgVal)offset;  _Set(a);
157        a.name = CASTRNAM "rightWidget";     a.value = (XtArgVal)w;       _Set(a);
158    }
159
160    inline void RightAttachment( unsigned char to_what, int poffset ) {
161       Arg a; a.name = CASTRNAM "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
162       if( to_what == XmATTACH_POSITION ) {
163          a.name = CASTRNAM "rightPosition";
164          a.value = (XtArgVal)poffset;  _Set(a);
165       } else {
166          a.name = CASTRNAM "rightOffset";
167          a.value = (XtArgVal)poffset;  _Set(a);
168       }
169    }
170
171    inline void RightAttachment( unsigned char to_what, int position,
172                               int offset ) {
173       Arg a; a.name = CASTRNAM "rightAttachment"; a.value = (XtArgVal)to_what; _Set(a);
174       a.name = CASTRNAM "rightPosition"; a.value = (XtArgVal)position;  _Set(a);
175       a.name = CASTRNAM "rightOffset";   a.value = (XtArgVal)offset;  _Set(a);
176    }
177  
178    inline void TopAttachment( unsigned char to_what, Widget w ) {
179       Arg a; a.name = CASTRNAM "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
180        a.name = CASTRNAM "topWidget";     a.value = (XtArgVal)w;       _Set(a);
181    }
182
183    inline void TopAttachment( unsigned char to_what, Widget w, int offset ) {
184       Arg a; a.name = CASTRNAM "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
185        a.name = CASTRNAM "topOffset";     a.value = (XtArgVal)offset;  _Set(a);
186        a.name = CASTRNAM "topWidget";     a.value = (XtArgVal)w;       _Set(a);
187    }
188
189    inline void TopAttachment( unsigned char to_what, int poffset ) {
190       Arg a; a.name = CASTRNAM "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
191       if( to_what == XmATTACH_POSITION ) {
192          a.name = CASTRNAM "topPosition";
193          a.value = (XtArgVal)poffset;  _Set(a);
194       } else {
195          a.name = CASTRNAM "topOffset";
196          a.value = (XtArgVal)poffset;  _Set(a);
197       }
198    }
199
200    inline void TopAttachment( unsigned char to_what, int position,
201                               int offset ) {
202       Arg a; a.name = CASTRNAM "topAttachment"; a.value = (XtArgVal)to_what; _Set(a);
203       a.name = CASTRNAM "topPosition"; a.value = (XtArgVal)position;  _Set(a);
204       a.name = CASTRNAM "topOffset";   a.value = (XtArgVal)offset;  _Set(a);
205    }
206
207    inline void BottomAttachment( unsigned char to_what, Widget w ) {
208       Arg a; a.name = CASTRNAM "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
209        a.name = CASTRNAM "bottomWidget";     a.value = (XtArgVal)w;       _Set(a);
210    }
211
212    inline void BottomAttachment( unsigned char to_what, Widget w, int offset ) {
213       Arg a; a.name = CASTRNAM "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
214        a.name = CASTRNAM "bottomOffset";     a.value = (XtArgVal)offset;  _Set(a);
215        a.name = CASTRNAM "bottomWidget";     a.value = (XtArgVal)w;       _Set(a);
216    }
217
218    inline void BottomAttachment( unsigned char to_what, int poffset ) {
219       Arg a; a.name = CASTRNAM "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
220       if( to_what == XmATTACH_POSITION ) {
221          a.name = CASTRNAM "bottomPosition";
222          a.value = (XtArgVal)poffset;  _Set(a);
223       } else {
224          a.name = CASTRNAM "bottomOffset";
225          a.value = (XtArgVal)poffset;  _Set(a);
226       }
227    }
228
229    inline void BottomAttachment( unsigned char to_what, int position,
230                               int offset ) {
231       Arg a; a.name = CASTRNAM "bottomAttachment"; a.value = (XtArgVal)to_what; _Set(a);
232       a.name = CASTRNAM "bottomPosition"; a.value = (XtArgVal)position;  _Set(a);
233       a.name = CASTRNAM "bottomOffset";   a.value = (XtArgVal)offset;  _Set(a);
234    }
235
236 };
237
238 #define NULLWXmPrimitive                WXmPrimitive((Widget)0)
239
240 #endif