1 /*
2  * Motif Tools Library, Version 3.1
3  * $Id: Layout.h,v 1.1.1.1 2001/02/10 13:45:48 motiftools Exp $
4  *
5  * Written by David Flanagan.
6  * Copyright (c) 1992-2001 by David Flanagan.
7  * All Rights Reserved.  See the file COPYRIGHT for details.
8  * This is open source software.  See the file LICENSE for details.
9  * There is no warranty for this software.  See NO_WARRANTY for details.
10  *
11  * $Log: Layout.h,v $
12  * Revision 1.1.1.1  2001/02/10 13:45:48  motiftools
13  * Initial import of Xmt310 to CVS
14  *
15  *
16  */
17 
18 #ifndef _XmtLayout_h
19 #define _XmtLayout_h
20 
21 #include <Xm/BulletinB.h>
22 
23 typedef struct _XmtLayoutClassRec*       XmtLayoutWidgetClass;
24 typedef struct _XmtLayoutRec*            XmtLayoutWidget;
25 
26 externalref WidgetClass xmtLayoutWidgetClass;
27 
28 #include <Xmt/LayoutG.h>
29 
30 typedef enum {
31     XmtLayoutFilled=0,
32     XmtLayoutFlushLeft=1,
33     XmtLayoutFlushTop=1,
34     XmtLayoutFlushRight=2,
35     XmtLayoutFlushBottom=2,
36     XmtLayoutCentered=3
37 } XmtLayoutJustification;
38 
39 typedef enum {
40     XmtLayoutTop,
41     XmtLayoutBottom,
42     XmtLayoutLeft,
43     XmtLayoutRight
44 } XmtLayoutEdge;
45 
46 typedef enum {
47     XmtLayoutFrameNone,
48     XmtLayoutFrameBox,
49     XmtLayoutFrameLeft,
50     XmtLayoutFrameRight,
51     XmtLayoutFrameTop,
52     XmtLayoutFrameBottom
53 } XmtLayoutFrameType;
54 
55 typedef enum {
56     XmtLayoutFrameShadowIn,
57     XmtLayoutFrameShadowOut,
58     XmtLayoutFrameEtchedIn,
59     XmtLayoutFrameEtchedOut,
60     XmtLayoutFrameSingleLine,
61     XmtLayoutFrameDoubleLine
62 } XmtLayoutFrameLineType;
63 
64 typedef enum {
65     XmtLayoutFrameInside,
66     XmtLayoutFrameThrough,
67     XmtLayoutFrameOutside
68 } XmtLayoutFramePosition;
69 
70 /*
71  * This enumerated type is used by the XmtLayoutBox gadget to control
72  * how it spaces items in a row or column
73  */
74 typedef enum {
75     XmtLayoutSpaceNone,
76     XmtLayoutSpaceEven,
77     XmtLayoutSpaceLREven,
78     XmtLayoutSpaceInterval,
79     XmtLayoutSpaceLCR,
80     XmtLayoutSpaceLTabbed,
81     XmtLayoutSpaceCTabbed,  /* thanks to F. Sullivan Segal for this one */
82     XmtLayoutSpaceRTabbed
83 } XmtLayoutSpaceType;
84 
85 typedef enum {
86     XmtLayoutPoints,       /* 1/72 of an inch */
87     XmtLayoutInches,       /* 25.4 millimeters */
88     XmtLayoutMillimeters,  /* depends on display resolution */
89     XmtLayoutEms,          /* width of 'M' in widget font */
90     XmtLayoutEns           /* 1/2 of an em */
91 } XmtLayoutUnitType;
92 
93 externalref _Xconst char XmtLayoutStrings[];
94 #ifndef XmtNbackground
95 #define XmtNbackground ((char*)&XmtLayoutStrings[0])
96 #endif
97 #ifndef XmtNbitmap
98 #define XmtNbitmap ((char*)&XmtLayoutStrings[11])
99 #endif
100 #ifndef XmtNbitmask
101 #define XmtNbitmask ((char*)&XmtLayoutStrings[18])
102 #endif
103 #ifndef XmtNdebugLayout
104 #define XmtNdebugLayout ((char*)&XmtLayoutStrings[26])
105 #endif
106 #ifndef XmtNdefaultSpacing
107 #define XmtNdefaultSpacing ((char*)&XmtLayoutStrings[38])
108 #endif
109 #ifndef XmtNequal
110 #define XmtNequal ((char*)&XmtLayoutStrings[53])
111 #endif
112 #ifndef XmtNfont
113 #define XmtNfont ((char*)&XmtLayoutStrings[59])
114 #endif
115 #ifndef XmtNfontList
116 #define XmtNfontList ((char*)&XmtLayoutStrings[64])
117 #endif
118 #ifndef XmtNforeground
119 #define XmtNforeground ((char*)&XmtLayoutStrings[73])
120 #endif
121 #ifndef XmtNitemStretch
122 #define XmtNitemStretch ((char*)&XmtLayoutStrings[84])
123 #endif
124 #ifndef XmtNlabel
125 #define XmtNlabel ((char*)&XmtLayoutStrings[96])
126 #endif
127 #ifndef XmtNlabelString
128 #define XmtNlabelString ((char*)&XmtLayoutStrings[102])
129 #endif
130 #ifndef XmtNlayout
131 #define XmtNlayout ((char*)&XmtLayoutStrings[114])
132 #endif
133 #ifndef XmtNlayoutAfter
134 #define XmtNlayoutAfter ((char*)&XmtLayoutStrings[121])
135 #endif
136 #ifndef XmtNlayoutAllowResize
137 #define XmtNlayoutAllowResize ((char*)&XmtLayoutStrings[133])
138 #endif
139 #ifndef XmtNlayoutBefore
140 #define XmtNlayoutBefore ((char*)&XmtLayoutStrings[151])
141 #endif
142 #ifndef XmtNlayoutCaption
143 #define XmtNlayoutCaption ((char*)&XmtLayoutStrings[164])
144 #endif
145 #ifndef XmtNlayoutCaptionAlignment
146 #define XmtNlayoutCaptionAlignment ((char*)&XmtLayoutStrings[178])
147 #endif
148 #ifndef XmtNlayoutCaptionJustification
149 #define XmtNlayoutCaptionJustification ((char*)&XmtLayoutStrings[201])
150 #endif
151 #ifndef XmtNlayoutCaptionMargin
152 #define XmtNlayoutCaptionMargin ((char*)&XmtLayoutStrings[228])
153 #endif
154 #ifndef XmtNlayoutCaptionPosition
155 #define XmtNlayoutCaptionPosition ((char*)&XmtLayoutStrings[248])
156 #endif
157 #ifndef XmtNlayoutFrameLineType
158 #define XmtNlayoutFrameLineType ((char*)&XmtLayoutStrings[270])
159 #endif
160 #ifndef XmtNlayoutFrameMargin
161 #define XmtNlayoutFrameMargin ((char*)&XmtLayoutStrings[290])
162 #endif
163 #ifndef XmtNlayoutFramePosition
164 #define XmtNlayoutFramePosition ((char*)&XmtLayoutStrings[308])
165 #endif
166 #ifndef XmtNlayoutFrameThickness
167 #define XmtNlayoutFrameThickness ((char*)&XmtLayoutStrings[328])
168 #endif
169 #ifndef XmtNlayoutFrameType
170 #define XmtNlayoutFrameType ((char*)&XmtLayoutStrings[349])
171 #endif
172 #ifndef XmtNlayoutHeight
173 #define XmtNlayoutHeight ((char*)&XmtLayoutStrings[365])
174 #endif
175 #ifndef XmtNlayoutIn
176 #define XmtNlayoutIn ((char*)&XmtLayoutStrings[378])
177 #endif
178 #ifndef XmtNlayoutJustification
179 #define XmtNlayoutJustification ((char*)&XmtLayoutStrings[387])
180 #endif
181 #ifndef XmtNlayoutMarginHeight
182 #define XmtNlayoutMarginHeight ((char*)&XmtLayoutStrings[407])
183 #endif
184 #ifndef XmtNlayoutMarginWidth
185 #define XmtNlayoutMarginWidth ((char*)&XmtLayoutStrings[426])
186 #endif
187 #ifndef XmtNlayoutPosition
188 #define XmtNlayoutPosition ((char*)&XmtLayoutStrings[444])
189 #endif
190 #ifndef XmtNlayoutSensitive
191 #define XmtNlayoutSensitive ((char*)&XmtLayoutStrings[459])
192 #endif
193 #ifndef XmtNlayoutShrinkability
194 #define XmtNlayoutShrinkability ((char*)&XmtLayoutStrings[475])
195 #endif
196 #ifndef XmtNlayoutStretchability
197 #define XmtNlayoutStretchability ((char*)&XmtLayoutStrings[495])
198 #endif
199 #ifndef XmtNlayoutWidth
200 #define XmtNlayoutWidth ((char*)&XmtLayoutStrings[516])
201 #endif
202 #ifndef XmtNorientation
203 #define XmtNorientation ((char*)&XmtLayoutStrings[528])
204 #endif
205 #ifndef XmtNpixmap
206 #define XmtNpixmap ((char*)&XmtLayoutStrings[540])
207 #endif
208 #ifndef XmtNspace
209 #define XmtNspace ((char*)&XmtLayoutStrings[547])
210 #endif
211 #ifndef XmtNspaceStretch
212 #define XmtNspaceStretch ((char*)&XmtLayoutStrings[553])
213 #endif
214 #ifndef XmtNspaceType
215 #define XmtNspaceType ((char*)&XmtLayoutStrings[566])
216 #endif
217 #ifndef XmtCBitmap
218 #define XmtCBitmap ((char*)&XmtLayoutStrings[576])
219 #endif
220 #ifndef XmtCBitmask
221 #define XmtCBitmask ((char*)&XmtLayoutStrings[583])
222 #endif
223 #ifndef XmtCDebugLayout
224 #define XmtCDebugLayout ((char*)&XmtLayoutStrings[591])
225 #endif
226 #ifndef XmtCDefaultSpacing
227 #define XmtCDefaultSpacing ((char*)&XmtLayoutStrings[603])
228 #endif
229 #ifndef XmtCEqual
230 #define XmtCEqual ((char*)&XmtLayoutStrings[618])
231 #endif
232 #ifndef XmtCItemStretch
233 #define XmtCItemStretch ((char*)&XmtLayoutStrings[624])
234 #endif
235 #ifndef XmtCLayout
236 #define XmtCLayout ((char*)&XmtLayoutStrings[636])
237 #endif
238 #ifndef XmtCLayoutAfter
239 #define XmtCLayoutAfter ((char*)&XmtLayoutStrings[643])
240 #endif
241 #ifndef XmtCLayoutAllowResize
242 #define XmtCLayoutAllowResize ((char*)&XmtLayoutStrings[655])
243 #endif
244 #ifndef XmtCLayoutBefore
245 #define XmtCLayoutBefore ((char*)&XmtLayoutStrings[673])
246 #endif
247 #ifndef XmtCLayoutCaption
248 #define XmtCLayoutCaption ((char*)&XmtLayoutStrings[686])
249 #endif
250 #ifndef XmtCLayoutCaptionAlignment
251 #define XmtCLayoutCaptionAlignment ((char*)&XmtLayoutStrings[700])
252 #endif
253 #ifndef XmtCLayoutCaptionJustification
254 #define XmtCLayoutCaptionJustification ((char*)&XmtLayoutStrings[723])
255 #endif
256 #ifndef XmtCLayoutCaptionMargin
257 #define XmtCLayoutCaptionMargin ((char*)&XmtLayoutStrings[750])
258 #endif
259 #ifndef XmtCLayoutCaptionPosition
260 #define XmtCLayoutCaptionPosition ((char*)&XmtLayoutStrings[770])
261 #endif
262 #ifndef XmtCLayoutFrameLineType
263 #define XmtCLayoutFrameLineType ((char*)&XmtLayoutStrings[792])
264 #endif
265 #ifndef XmtCLayoutFrameMargin
266 #define XmtCLayoutFrameMargin ((char*)&XmtLayoutStrings[812])
267 #endif
268 #ifndef XmtCLayoutFramePosition
269 #define XmtCLayoutFramePosition ((char*)&XmtLayoutStrings[830])
270 #endif
271 #ifndef XmtCLayoutFrameThickness
272 #define XmtCLayoutFrameThickness ((char*)&XmtLayoutStrings[850])
273 #endif
274 #ifndef XmtCLayoutFrameType
275 #define XmtCLayoutFrameType ((char*)&XmtLayoutStrings[871])
276 #endif
277 #ifndef XmtCLayoutHeight
278 #define XmtCLayoutHeight ((char*)&XmtLayoutStrings[887])
279 #endif
280 #ifndef XmtCLayoutIn
281 #define XmtCLayoutIn ((char*)&XmtLayoutStrings[900])
282 #endif
283 #ifndef XmtCLayoutJustification
284 #define XmtCLayoutJustification ((char*)&XmtLayoutStrings[909])
285 #endif
286 #ifndef XmtCLayoutMarginHeight
287 #define XmtCLayoutMarginHeight ((char*)&XmtLayoutStrings[929])
288 #endif
289 #ifndef XmtCLayoutMarginWidth
290 #define XmtCLayoutMarginWidth ((char*)&XmtLayoutStrings[948])
291 #endif
292 #ifndef XmtCLayoutPosition
293 #define XmtCLayoutPosition ((char*)&XmtLayoutStrings[966])
294 #endif
295 #ifndef XmtCLayoutSensitive
296 #define XmtCLayoutSensitive ((char*)&XmtLayoutStrings[981])
297 #endif
298 #ifndef XmtCLayoutShrinkability
299 #define XmtCLayoutShrinkability ((char*)&XmtLayoutStrings[997])
300 #endif
301 #ifndef XmtCLayoutStretchability
302 #define XmtCLayoutStretchability ((char*)&XmtLayoutStrings[1017])
303 #endif
304 #ifndef XmtCLayoutWidth
305 #define XmtCLayoutWidth ((char*)&XmtLayoutStrings[1038])
306 #endif
307 #ifndef XmtCPixmap
308 #define XmtCPixmap ((char*)&XmtLayoutStrings[1050])
309 #endif
310 #ifndef XmtCSpace
311 #define XmtCSpace ((char*)&XmtLayoutStrings[1057])
312 #endif
313 #ifndef XmtCSpaceStretch
314 #define XmtCSpaceStretch ((char*)&XmtLayoutStrings[1063])
315 #endif
316 #ifndef XmtCSpaceType
317 #define XmtCSpaceType ((char*)&XmtLayoutStrings[1076])
318 #endif
319 #ifndef XmtRXmtLayoutEdge
320 #define XmtRXmtLayoutEdge ((char*)&XmtLayoutStrings[1086])
321 #endif
322 #ifndef XmtRXmtLayoutFrameLineType
323 #define XmtRXmtLayoutFrameLineType ((char*)&XmtLayoutStrings[1100])
324 #endif
325 #ifndef XmtRXmtLayoutFramePosition
326 #define XmtRXmtLayoutFramePosition ((char*)&XmtLayoutStrings[1123])
327 #endif
328 #ifndef XmtRXmtLayoutFrameType
329 #define XmtRXmtLayoutFrameType ((char*)&XmtLayoutStrings[1146])
330 #endif
331 #ifndef XmtRXmtLayoutJustification
332 #define XmtRXmtLayoutJustification ((char*)&XmtLayoutStrings[1165])
333 #endif
334 #ifndef XmtRXmtLayoutSpaceType
335 #define XmtRXmtLayoutSpaceType ((char*)&XmtLayoutStrings[1188])
336 #endif
337 
338 #if XmVersion >= 2000
339 #ifndef XmtNrenderTable
340 #define XmtNrenderTable "renderTable"
341 #endif
342 #endif
343 
344 _XFUNCPROTOBEGIN
345 #if NeedFunctionPrototypes
346 extern Widget XmtCreateLayout(Widget, String, ArgList, Cardinal);
347 extern Widget XmtCreateLayoutDialog(Widget, String, ArgList, Cardinal);
348 extern void XmtRegisterLayoutParser(void);
349 extern void XmtRegisterLayoutCreateMethod(void);
350 extern void XmtLayoutDisableLayout(Widget);
351 extern void XmtLayoutEnableLayout(Widget);
352 extern int XmtLayoutConvertSizeToPixels(Widget, double, XmtLayoutUnitType);
353 #else
354 extern Widget XmtCreateLayout();
355 extern Widget XmtCreateLayoutDialog();
356 extern void XmtRegisterLayoutParser();
357 extern void XmtRegisterLayoutCreateMethod();
358 extern void XmtLayoutDisableLayout();
359 extern void XmtLayoutEnableLayout();
360 extern int XmtLayoutConvertSizeToPixels();
361 #endif
362 _XFUNCPROTOEND
363 
364 #endif /* _XmtLayout_h */
365