1 /***********************************************************
2 
3 Copyright 1987, 1988, 1994, 1998  The Open Group
4 
5 Permission to use, copy, modify, distribute, and sell this software and its
6 documentation for any purpose is hereby granted without fee, provided that
7 the above copyright notice appear in all copies and that both that
8 copyright notice and this permission notice appear in supporting
9 documentation.
10 
11 The above copyright notice and this permission notice shall be included in
12 all copies or substantial portions of the Software.
13 
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
17 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20 
21 Except as contained in this notice, the name of The Open Group shall not be
22 used in advertising or otherwise to promote the sale, use or other dealings
23 in this Software without prior written authorization from The Open Group.
24 
25 
26 Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
27 
28                         All Rights Reserved
29 
30 Permission to use, copy, modify, and distribute this software and its
31 documentation for any purpose and without fee is hereby granted,
32 provided that the above copyright notice appear in all copies and that
33 both that copyright notice and this permission notice appear in
34 supporting documentation, and that the name of Digital not be
35 used in advertising or publicity pertaining to distribution of the
36 software without specific, written prior permission.
37 
38 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
44 SOFTWARE.
45 
46 ******************************************************************/
47 
48 /*
49  * Paned.h - Paned Composite Widget's public header file.
50  *
51  * Updated and significantly modifided from the Athena VPaned Widget.
52  *
53  * Date:    March 1, 1989
54  *
55  * By:      Chris D. Peterson
56  *          MIT X Consortium
57  *          kit@expo.lcs.mit.edu
58  */
59 
60 #ifndef _XawPaned_h
61 #define _XawPaned_h
62 
63 #include <X11/Intrinsic.h>
64 #include <X11/Xmu/Converters.h>
65 
66 /* RESOURCES:
67 
68  Name		         Class		   RepType	    Default Value
69  ----		         -----		   -------	    -------------
70  background	         Background	   Pixel	    XtDefaultBackground
71  betweenCursor	         Cursor	           Cursor	    **
72  border		         BorderColor       Pixel	    XtDefaultForeground
73  borderWidth	         BorderWidth       Dimension	    1
74  cursor		         Cursor	           Cursor	    None
75  destroyCallback         Callback	   Pointer	    NULL
76  height		         Height	           Dimension	    0
77  gripIndent	         GripIndent	   Position	    16
78  gripCursor	         Cursor	           Cursor	    **
79  horizontalGripCursol    Cursor	           Cursor	    sb_h_double_arrow
80  horizontalBetweencursor Cursor	           Cursor	    sb_up_arrow
81  internalBorderColor     BorderColor	   Pixel	    XtDefaultForeground
82  internalBorderWidth     BorderWidth	   Position	    1
83  leftCursor	         Cursor	           Cursor	    sb_left_arrow
84  lowerCursor	         Cursor	           Cursor	    sb_down_arrow
85  mappedWhenManaged       MappedWhenManaged Boolean	    True
86  orientation             Orientation       XtOrientation    XtorientVertical
87  refigureMode	         Boolean	   Boolean	    On
88  rightCursor	         Cursor	           Cursor           sb_right_arrow
89  sensitive	         Sensitive	   Boolean	    True
90  upperCursor	         Cursor	           Cursor	    sb_up_arrow
91  verticalBetweenCursor   Cursor	           Cursor           sb_left_arrow
92  verticalGripCursor      Cursor	           Cursor           sb_v_double_arrow
93  width		         Width	           Dimension	    0
94  x		         Position	   Position	    0
95  y		         Position	   Position	    0
96 
97 ** These resources now are set to the vertical or horizontal cursor
98    depending upon orientation, by default.  If a value is specified here
99    then that cursor will be used reguardless of orientation.
100 
101 
102 CONSTRAINT RESOURCES:
103 
104  Name		      Class		RepType		Default Value
105  ----		      -----		-------		-------------
106  allowResize	      Boolean	        Boolean         False
107  max		      Max	        Dimension	unlimited
108  min		      Min		Dimension	Grip Size
109  preferredPaneSize    PreferredPaneSize Dimension	PANED_ASK_CHILD
110  resizeToPreferred    Boolean		Boolean		False
111  showGrip	      ShowGrip		Boolean		True
112  skipAdjust	      Boolean	        Boolean         False
113 
114 */
115 
116 #define PANED_ASK_CHILD 0
117 #define PANED_GRIP_SIZE 0
118 
119 #define XtNallowResize "allowResize"
120 #define XtNbetweenCursor "betweenCursor"
121 #define XtNverticalBetweenCursor "verticalBetweenCursor"
122 #define XtNhorizontalBetweenCursor "horizontalBetweenCursor"
123 #define XtNgripCursor "gripCursor"
124 #define XtNgripIndent "gripIndent"
125 #define XtNhorizontalGripCursor "horizontalGripCursor"
126 #define XtNinternalBorderColor "internalBorderColor"
127 #define XtNinternalBorderWidth "internalBorderWidth"
128 #define XtNleftCursor "leftCursor"
129 #define XtNlowerCursor "lowerCursor"
130 #define XtNrefigureMode "refigureMode"
131 #define XtNposition "position"
132 #define XtNmin "min"
133 #define XtNmax "max"
134 #define XtNpreferredPaneSize "preferredPaneSize"
135 #define XtNresizeToPreferred "resizeToPreferred"
136 #define XtNrightCursor "rightCursor"
137 #define XtNshowGrip "showGrip"
138 #define XtNskipAdjust "skipAdjust"
139 #define XtNupperCursor "upperCursor"
140 #define XtNverticalGripCursor "verticalGripCursor"
141 
142 #define XtCGripIndent "GripIndent"
143 #define XtCMin "Min"
144 #define XtCMax "Max"
145 #define XtCPreferredPaneSize "PreferredPaneSize"
146 #define XtCShowGrip "ShowGrip"
147 
148 /* Class record constant */
149 extern WidgetClass panedWidgetClass;
150 
151 typedef struct _PanedClassRec	*PanedWidgetClass;
152 typedef struct _PanedRec	*PanedWidget;
153 
154 /*
155  *  Public Procedures
156  */
157 
158 _XFUNCPROTOBEGIN
159 
160 /*
161  * Function:
162  *	XawPanedSetMinMax
163  *
164  * Parameters:
165  *	widget - widget that is a child of the Paned widget
166  *	min    - new min and max size for the pane
167  *	max    - ""
168  *
169  * Description:
170  *	Sets the min and max size for a pane.
171  */
172 void XawPanedSetMinMax
173 (
174  Widget			w,
175  int			min,
176  int			max
177  );
178 
179 /*
180  * Function:
181  *	XawPanedGetMinMax
182  *
183  * Parameters:
184  *	widget - widget that is a child of the Paned widget
185  *	min    - return the current min and max size for the pane
186  *	max    - ""
187  *
188  * Description:
189  *	Gets the min and max size for a pane.
190  */
191 void XawPanedGetMinMax
192 (
193  Widget			w,
194  int			*min_return,
195  int			*max_return
196  );
197 
198 /*
199  * Function:
200  *	XawPanedSetRefigureMode
201  *
202  * Parameters:
203  *	w    - paned widget
204  *	mode - if False then inhibit refigure
205  *
206  * Description:
207  *	  Allows a flag to be set the will inhibit  the paned widgets
208  *	relayout routine.
209  */
210 void XawPanedSetRefigureMode
211 (
212  Widget			w,
213 #if NeedWidePrototypes
214  int			mode
215 #else
216  Boolean		mode
217 #endif
218  );
219 
220 /*
221  * Function:
222  *	XawPanedGetNumSub
223  *
224  * Parameters:
225  *	w - paned widget
226  *
227  * Returns:
228  *	Number of panes in the paned widget.
229  */
230 int XawPanedGetNumSub
231 (
232  Widget			w
233  );
234 
235 /*
236  * Function:
237  *	XawPanedAllowResize
238  *
239  * Parameters:
240  *	widget - child of the paned widget
241  *
242  * Description:
243  *	  Allows a flag to be set that determines if the paned widget will
244  *	allow geometry requests from this child
245  */
246 void XawPanedAllowResize
247 (
248  Widget			w,
249 #if NeedWidePrototypes
250  int			allow_resize
251 #else
252  Boolean		allow_resize
253 #endif
254  );
255 
256 _XFUNCPROTOEND
257 
258 #endif /* _XawPaned_h */
259