2 * $XConsortium: Paned.h,v 1.15 94/04/17 20:12:29 kaleb Exp $
6 /***********************************************************
8 Copyright (c) 1987, 1988, 1994 X Consortium
10 Permission is hereby granted, free of charge, to any person obtaining a copy
11 of this software and associated documentation files (the "Software"), to deal
12 in the Software without restriction, including without limitation the rights
13 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14 copies of the Software, and to permit persons to whom the Software is
15 furnished to do so, subject to the following conditions:
17 The above copyright notice and this permission notice shall be included in
18 all copies or substantial portions of the Software.
20 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
24 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
25 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 Except as contained in this notice, the name of the X Consortium shall not be
28 used in advertising or otherwise to promote the sale, use or other dealings
29 in this Software without prior written authorization from the X Consortium.
32 Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
36 Permission to use, copy, modify, and distribute this software and its
37 documentation for any purpose and without fee is hereby granted,
38 provided that the above copyright notice appear in all copies and that
39 both that copyright notice and this permission notice appear in
40 supporting documentation, and that the name of Digital not be
41 used in advertising or publicity pertaining to distribution of the
42 software without specific, written prior permission.
44 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
45 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
46 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
47 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
48 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
49 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
52 ******************************************************************/
55 * Paned.h - Paned Composite Widget's public header file.
57 * Updated and significantly modifided from the Athena VPaned Widget.
61 * By: Chris D. Peterson
63 * kit@expo.lcs.mit.edu
69 #include <X11/Constraint.h>
70 #include <X11/Xmu/Converters.h>
72 /****************************************************************
74 * Vertical Paned Widget (SubClass of CompositeClass)
76 ****************************************************************/
80 Name Class RepType Default Value
81 ---- ----- ------- -------------
82 background Background Pixel XtDefaultBackground
83 betweenCursor Cursor Cursor **
84 border BorderColor Pixel XtDefaultForeground
85 borderWidth BorderWidth Dimension 1
86 cursor Cursor Cursor None
87 destroyCallback Callback Pointer NULL
88 height Height Dimension 0
89 gripIndent GripIndent Position 16
90 gripCursor Cursor Cursor **
91 horizontalGripCursol Cursor Cursor sb_h_double_arrow
92 horizontalBetweencursor Cursor Cursor sb_up_arrow
93 internalBorderColor BorderColor Pixel XtDefaultForeground
94 internalBorderWidth BorderWidth Position 1
95 leftCursor Cursor Cursor sb_left_arrow
96 lowerCursor Cursor Cursor sb_down_arrow
97 mappedWhenManaged MappedWhenManaged Boolean True
98 orientation Orientation XtOrientation XtorientVertical
99 refigureMode Boolean Boolean On
100 rightCursor Cursor Cursor sb_right_arrow
101 sensitive Sensitive Boolean True
102 upperCursor Cursor Cursor sb_up_arrow
103 verticalBetweenCursor Cursor Cursor sb_left_arrow
104 verticalGripCursor Cursor Cursor sb_v_double_arrow
105 width Width Dimension 0
106 x Position Position 0
107 y Position Position 0
109 ** These resources now are set to the vertical or horizontal cursor
110 depending upon orientation, by default. If a value is specified here
111 then that cursor will be used reguardless of orientation.
114 CONSTRAINT RESOURCES:
116 Name Class RepType Default Value
117 ---- ----- ------- -------------
118 allowResize Boolean Boolean False
119 max Max Dimension unlimited
120 min Min Dimension Grip Size
121 preferredPaneSize PerferredPaneSize Dimension PANED_ASK_CHILD
122 resizeToPreferred Boolean Boolean False
123 showGrip ShowGrip Boolean True
124 skipAdjust Boolean Boolean False
128 #define PANED_ASK_CHILD 0
129 #define PANED_GRIP_SIZE 0
132 #define XtNallowResize "allowResize"
133 #define XtNbetweenCursor "betweenCursor"
134 #define XtNverticalBetweenCursor "verticalBetweenCursor"
135 #define XtNhorizontalBetweenCursor "horizontalBetweenCursor"
136 #define XtNgripCursor "gripCursor"
137 #define XtNgripIndent "gripIndent"
138 #define XtNhorizontalGripCursor "horizontalGripCursor"
139 #define XtNinternalBorderColor "internalBorderColor"
140 #define XtNinternalBorderWidth "internalBorderWidth"
141 #define XtNleftCursor "leftCursor"
142 #define XtNlowerCursor "lowerCursor"
143 #define XtNrefigureMode "refigureMode"
144 #define XtNposition "position"
147 #define XtNpreferredPaneSize "preferredPaneSize"
148 #define XtNresizeToPreferred "resizeToPreferred"
149 #define XtNrightCursor "rightCursor"
150 #define XtNshowGrip "showGrip"
151 #define XtNskipAdjust "skipAdjust"
152 #define XtNupperCursor "upperCursor"
153 #define XtNverticalGripCursor "verticalGripCursor"
155 #define XtCGripIndent "GripIndent"
158 #define XtCPreferredPaneSize "PreferredPaneSize"
159 #define XtCShowGrip "ShowGrip"
161 /* Class record constant */
162 extern WidgetClass panedWidgetClass
;
164 typedef struct _PanedClassRec
*PanedWidgetClass
;
165 typedef struct _PanedRec
*PanedWidget
;
167 /************************************************************
171 ************************************************************/
175 /* Function Name: XawPanedSetMinMax
176 * Description: Sets the min and max size for a pane.
177 * Arguments: widget - the widget that is a child of the Paned widget.
178 * min, max - the new min and max size for the pane.
182 extern void XawPanedSetMinMax(
183 #if NeedFunctionPrototypes
190 /* Function Name: XawPanedGetMinMax
191 * Description: Gets the min and max size for a pane.
192 * Arguments: widget - the widget that is a child of the Paned widget.
193 ** RETURNED ** min, max - the current min and max size for the pane.
197 extern void XawPanedGetMinMax(
198 #if NeedFunctionPrototypes
200 int * /* min_return */,
201 int * /* max_return */
205 /* Function Name: XawPanedSetRefigureMode
206 * Description: Allows a flag to be set the will inhibit
207 * the paned widgets relayout routine.
208 * Arguments: w - the paned widget.
209 * mode - if FALSE then inhibit refigure.
213 extern void XawPanedSetRefigureMode(
214 #if NeedFunctionPrototypes
216 #if NeedWidePrototypes
217 /* Boolean */ int /* mode */
224 /* Function Name: XawPanedGetNumSub
225 * Description: Returns the number of panes in the paned widget.
226 * Arguments: w - the paned widget.
227 * Returns: the number of panes in the paned widget.
230 extern int XawPanedGetNumSub(
231 #if NeedFunctionPrototypes
236 /* Function Name: XawPanedAllowResize
237 * Description: Allows a flag to be set that determines if the paned
238 * widget will allow geometry requests from this child
239 * Arguments: widget - a child of the paned widget.
243 extern void XawPanedAllowResize(
244 #if NeedFunctionPrototypes
246 #if NeedWidePrototypes
247 /* Boolean */ int /* allow_resize */
249 Boolean
/* allow_resize */
256 #endif /* _XawPaned_h */