1 /* $XConsortium: Form.h,v 1.30 94/04/17 20:12:08 kaleb Exp $ */
2 
3 
4 /***********************************************************
5 
6 Copyright (c) 1987, 1988, 1994  X Consortium
7 
8 Permission is hereby granted, free of charge, to any person obtaining a copy
9 of this software and associated documentation files (the "Software"), to deal
10 in the Software without restriction, including without limitation the rights
11 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 copies of the Software, and to permit persons to whom the Software is
13 furnished to do so, subject to the following conditions:
14 
15 The above copyright notice and this permission notice shall be included in
16 all copies or substantial portions of the Software.
17 
18 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
21 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
22 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 
25 Except as contained in this notice, the name of the X Consortium shall not be
26 used in advertising or otherwise to promote the sale, use or other dealings
27 in this Software without prior written authorization from the X Consortium.
28 
29 
30 Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
31 
32                         All Rights Reserved
33 
34 Permission to use, copy, modify, and distribute this software and its
35 documentation for any purpose and without fee is hereby granted,
36 provided that the above copyright notice appear in all copies and that
37 both that copyright notice and this permission notice appear in
38 supporting documentation, and that the name of Digital not be
39 used in advertising or publicity pertaining to distribution of the
40 software without specific, written prior permission.
41 
42 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
43 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
44 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
45 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
46 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
47 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
48 SOFTWARE.
49 
50 ******************************************************************/
51 
52 #ifndef _XawForm_h
53 #define _XawForm_h
54 
55 #include <X11/Constraint.h>
56 
57 /***********************************************************************
58  *
59  * Form Widget
60  *
61  ***********************************************************************/
62 
63 /* Parameters:
64 
65  Name		     Class		RepType		Default Value
66  ----		     -----		-------		-------------
67  background	     Background		Pixel		XtDefaultBackground
68  border		     BorderColor	Pixel		XtDefaultForeground
69  borderWidth	     BorderWidth	Dimension	1
70  defaultDistance     Thickness		int		4
71  destroyCallback     Callback		Pointer		NULL
72  height		     Height		Dimension	computed at realize
73  mappedWhenManaged   MappedWhenManaged	Boolean		True
74  sensitive	     Sensitive		Boolean		True
75  width		     Width		Dimension	computed at realize
76  x		     Position		Position	0
77  y		     Position		Position	0
78 
79 */
80 
81 /* Constraint parameters:
82 
83  Name		     Class		RepType		Default Value
84  ----		     -----		-------		-------------
85  bottom		     Edge		XtEdgeType	XtRubber
86  fromHoriz	     Widget		Widget		(left edge of form)
87  fromVert	     Widget		Widget		(top of form)
88  horizDistance	     Thickness		int		defaultDistance
89  left		     Edge		XtEdgeType	XtRubber
90  resizable	     Boolean		Boolean		False
91  right		     Edge		XtEdgeType	XtRubber
92  top		     Edge		XtEdgeType	XtRubber
93  vertDistance	     Thickness		int		defaultDistance
94 
95 */
96 
97 
98 #ifndef _XtStringDefs_h_
99 #define XtNtop "top"
100 #define XtRWidget "Widget"
101 #endif
102 
103 #define XtNdefaultDistance "defaultDistance"
104 #define XtNbottom "bottom"
105 #define XtNleft "left"
106 #define XtNright "right"
107 #define XtNfromHoriz "fromHoriz"
108 #define XtNfromVert "fromVert"
109 #define XtNhorizDistance "horizDistance"
110 #define XtNvertDistance "vertDistance"
111 #define XtNresizable "resizable"
112 
113 #define XtCEdge "Edge"
114 #define XtCWidget "Widget"
115 
116 #ifndef _XawEdgeType_e
117 #define _XawEdgeType_e
118 typedef enum {
119     XawChainTop,		/* Keep this edge a constant distance from
120 				   the top of the form */
121     XawChainBottom,		/* Keep this edge a constant distance from
122 				   the bottom of the form */
123     XawChainLeft,		/* Keep this edge a constant distance from
124 				   the left of the form */
125     XawChainRight,		/* Keep this edge a constant distance from
126 				   the right of the form */
127     XawRubber			/* Keep this edge a proportional distance
128 				   from the edges of the form*/
129 } XawEdgeType;
130 #endif /* _XawEdgeType_e */
131 
132 /*
133  * Unfortunatly I missed this definition for R4, so I cannot
134  * protect it with XAW_BC, it looks like this particular problem is
135  * one that we will have to live with for a while.
136  *
137  * Chris D. Peterson - 3/23/90.
138  */
139 
140 #define XtEdgeType XawEdgeType
141 
142 #define XtChainTop XawChainTop
143 #define XtChainBottom XawChainBottom
144 #define XtChainLeft XawChainLeft
145 #define XtChainRight XawChainRight
146 #define XtRubber XawRubber
147 
148 typedef struct _FormClassRec	*FormWidgetClass;
149 typedef struct _FormRec		*FormWidget;
150 
151 extern WidgetClass formWidgetClass;
152 
153 _XFUNCPROTOBEGIN
154 
155 extern void XawFormDoLayout(
156 #if NeedFunctionPrototypes
157     Widget		/* w */,
158 #if NeedWidePrototypes
159     /* Boolean */ int	/* do_layout */
160 #else
161     Boolean		/* do_layout */
162 #endif
163 #endif
164 );
165 
166 _XFUNCPROTOEND
167 
168 #endif /* _XawForm_h */
169