2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
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)
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
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
24 * $XConsortium: WXmGadget.h /main/3 1996/06/11 17:00:19 cde-hal $
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.
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.
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
44 // This code is automatically generated in -*- C++ -*-
49 #include <X11/Object.h>
51 #include <X11/RectObj.h>
55 class WXmGadget : public WRect {
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")
67 // Constraint Resources -- Valid only in a form
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")
88 // Constraint Resources -- Valid only in a frame
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")
96 // Constraint resources - valid only in a paned window
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")
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);
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);
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";
120 a.name = CASTRNAM "leftOffset";
122 a.value = (XtArgVal)poffset; _Set(a);
125 inline void LeftAttachment( unsigned char to_what, int position,
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);
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);
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);
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";
148 a.name = CASTRNAM "rightOffset";
150 a.value = (XtArgVal)poffset; _Set(a);
153 inline void RightAttachment( unsigned char to_what, int position,
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);
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);
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);
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";
176 a.name = CASTRNAM "topOffset";
178 a.value = (XtArgVal)poffset; _Set(a);
181 inline void TopAttachment( unsigned char to_what, int position,
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);
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);
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);
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";
204 a.name = CASTRNAM "bottomOffset";
206 a.value = (XtArgVal)poffset; _Set(a);
209 inline void BottomAttachment( unsigned char to_what, int position,
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);
218 #define NULLWXmGadget WXmGadget((Widget)0)