Paned.h revision 7a84e134
17a84e134Smrg/*
27a84e134Smrg* $Xorg: Paned.h,v 1.5 2001/02/09 02:03:45 xorgcvs Exp $
37a84e134Smrg*/
47a84e134Smrg
57a84e134Smrg
67a84e134Smrg/***********************************************************
77a84e134Smrg
87a84e134SmrgCopyright 1987, 1988, 1994, 1998  The Open Group
97a84e134Smrg
107a84e134SmrgPermission to use, copy, modify, distribute, and sell this software and its
117a84e134Smrgdocumentation for any purpose is hereby granted without fee, provided that
127a84e134Smrgthe above copyright notice appear in all copies and that both that
137a84e134Smrgcopyright notice and this permission notice appear in supporting
147a84e134Smrgdocumentation.
157a84e134Smrg
167a84e134SmrgThe above copyright notice and this permission notice shall be included in
177a84e134Smrgall copies or substantial portions of the Software.
187a84e134Smrg
197a84e134SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
207a84e134SmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
217a84e134SmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
227a84e134SmrgOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
237a84e134SmrgAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
247a84e134SmrgCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
257a84e134Smrg
267a84e134SmrgExcept as contained in this notice, the name of The Open Group shall not be
277a84e134Smrgused in advertising or otherwise to promote the sale, use or other dealings
287a84e134Smrgin this Software without prior written authorization from The Open Group.
297a84e134Smrg
307a84e134Smrg
317a84e134SmrgCopyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
327a84e134Smrg
337a84e134Smrg                        All Rights Reserved
347a84e134Smrg
357a84e134SmrgPermission to use, copy, modify, and distribute this software and its
367a84e134Smrgdocumentation for any purpose and without fee is hereby granted,
377a84e134Smrgprovided that the above copyright notice appear in all copies and that
387a84e134Smrgboth that copyright notice and this permission notice appear in
397a84e134Smrgsupporting documentation, and that the name of Digital not be
407a84e134Smrgused in advertising or publicity pertaining to distribution of the
417a84e134Smrgsoftware without specific, written prior permission.
427a84e134Smrg
437a84e134SmrgDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
447a84e134SmrgALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
457a84e134SmrgDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
467a84e134SmrgANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
477a84e134SmrgWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
487a84e134SmrgARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
497a84e134SmrgSOFTWARE.
507a84e134Smrg
517a84e134Smrg******************************************************************/
527a84e134Smrg/* $XFree86: xc/lib/Xaw/Paned.h,v 1.6 2001/01/17 19:42:28 dawes Exp $ */
537a84e134Smrg
547a84e134Smrg/*
557a84e134Smrg * Paned.h - Paned Composite Widget's public header file.
567a84e134Smrg *
577a84e134Smrg * Updated and significantly modifided from the Athena VPaned Widget.
587a84e134Smrg *
597a84e134Smrg * Date:    March 1, 1989
607a84e134Smrg *
617a84e134Smrg * By:      Chris D. Peterson
627a84e134Smrg *          MIT X Consortium
637a84e134Smrg *          kit@expo.lcs.mit.edu
647a84e134Smrg */
657a84e134Smrg
667a84e134Smrg#ifndef _XawPaned_h
677a84e134Smrg#define _XawPaned_h
687a84e134Smrg
697a84e134Smrg#include <X11/Intrinsic.h>
707a84e134Smrg#include <X11/Xmu/Converters.h>
717a84e134Smrg
727a84e134Smrg/* RESOURCES:
737a84e134Smrg
747a84e134Smrg Name		         Class		   RepType	    Default Value
757a84e134Smrg ----		         -----		   -------	    -------------
767a84e134Smrg background	         Background	   Pixel	    XtDefaultBackground
777a84e134Smrg betweenCursor	         Cursor	           Cursor	    **
787a84e134Smrg border		         BorderColor       Pixel	    XtDefaultForeground
797a84e134Smrg borderWidth	         BorderWidth       Dimension	    1
807a84e134Smrg cursor		         Cursor	           Cursor	    None
817a84e134Smrg destroyCallback         Callback	   Pointer	    NULL
827a84e134Smrg height		         Height	           Dimension	    0
837a84e134Smrg gripIndent	         GripIndent	   Position	    16
847a84e134Smrg gripCursor	         Cursor	           Cursor	    **
857a84e134Smrg horizontalGripCursol    Cursor	           Cursor	    sb_h_double_arrow
867a84e134Smrg horizontalBetweencursor Cursor	           Cursor	    sb_up_arrow
877a84e134Smrg internalBorderColor     BorderColor	   Pixel	    XtDefaultForeground
887a84e134Smrg internalBorderWidth     BorderWidth	   Position	    1
897a84e134Smrg leftCursor	         Cursor	           Cursor	    sb_left_arrow
907a84e134Smrg lowerCursor	         Cursor	           Cursor	    sb_down_arrow
917a84e134Smrg mappedWhenManaged       MappedWhenManaged Boolean	    True
927a84e134Smrg orientation             Orientation       XtOrientation    XtorientVertical
937a84e134Smrg refigureMode	         Boolean	   Boolean	    On
947a84e134Smrg rightCursor	         Cursor	           Cursor           sb_right_arrow
957a84e134Smrg sensitive	         Sensitive	   Boolean	    True
967a84e134Smrg upperCursor	         Cursor	           Cursor	    sb_up_arrow
977a84e134Smrg verticalBetweenCursor   Cursor	           Cursor           sb_left_arrow
987a84e134Smrg verticalGripCursor      Cursor	           Cursor           sb_v_double_arrow
997a84e134Smrg width		         Width	           Dimension	    0
1007a84e134Smrg x		         Position	   Position	    0
1017a84e134Smrg y		         Position	   Position    	    0
1027a84e134Smrg
1037a84e134Smrg** These resources now are set to the vertical or horizontal cursor
1047a84e134Smrg   depending upon orientation, by default.  If a value is specified here
1057a84e134Smrg   then that cursor will be used reguardless of orientation.
1067a84e134Smrg
1077a84e134Smrg
1087a84e134SmrgCONSTRAINT RESOURCES:
1097a84e134Smrg
1107a84e134Smrg Name		      Class		RepType		Default Value
1117a84e134Smrg ----		      -----		-------		-------------
1127a84e134Smrg allowResize	      Boolean	        Boolean         False
1137a84e134Smrg max		      Max	        Dimension	unlimited
1147a84e134Smrg min		      Min		Dimension	Grip Size
1157a84e134Smrg preferredPaneSize    PreferredPaneSize Dimension	PANED_ASK_CHILD
1167a84e134Smrg resizeToPreferred    Boolean		Boolean	 	False
1177a84e134Smrg showGrip	      ShowGrip		Boolean		True
1187a84e134Smrg skipAdjust	      Boolean	        Boolean         False
1197a84e134Smrg
1207a84e134Smrg*/
1217a84e134Smrg
1227a84e134Smrg#define PANED_ASK_CHILD 0
1237a84e134Smrg#define PANED_GRIP_SIZE 0
1247a84e134Smrg
1257a84e134Smrg#define XtNallowResize "allowResize"
1267a84e134Smrg#define XtNbetweenCursor "betweenCursor"
1277a84e134Smrg#define XtNverticalBetweenCursor "verticalBetweenCursor"
1287a84e134Smrg#define XtNhorizontalBetweenCursor "horizontalBetweenCursor"
1297a84e134Smrg#define XtNgripCursor "gripCursor"
1307a84e134Smrg#define XtNgripIndent "gripIndent"
1317a84e134Smrg#define XtNhorizontalGripCursor "horizontalGripCursor"
1327a84e134Smrg#define XtNinternalBorderColor "internalBorderColor"
1337a84e134Smrg#define XtNinternalBorderWidth "internalBorderWidth"
1347a84e134Smrg#define XtNleftCursor "leftCursor"
1357a84e134Smrg#define XtNlowerCursor "lowerCursor"
1367a84e134Smrg#define XtNrefigureMode "refigureMode"
1377a84e134Smrg#define XtNposition "position"
1387a84e134Smrg#define XtNmin "min"
1397a84e134Smrg#define XtNmax "max"
1407a84e134Smrg#define XtNpreferredPaneSize "preferredPaneSize"
1417a84e134Smrg#define XtNresizeToPreferred "resizeToPreferred"
1427a84e134Smrg#define XtNrightCursor "rightCursor"
1437a84e134Smrg#define XtNshowGrip "showGrip"
1447a84e134Smrg#define XtNskipAdjust "skipAdjust"
1457a84e134Smrg#define XtNupperCursor "upperCursor"
1467a84e134Smrg#define XtNverticalGripCursor "verticalGripCursor"
1477a84e134Smrg
1487a84e134Smrg#define XtCGripIndent "GripIndent"
1497a84e134Smrg#define XtCMin "Min"
1507a84e134Smrg#define XtCMax "Max"
1517a84e134Smrg#define XtCPreferredPaneSize "PreferredPaneSize"
1527a84e134Smrg#define XtCShowGrip "ShowGrip"
1537a84e134Smrg
1547a84e134Smrg/* Class record constant */
1557a84e134Smrgextern WidgetClass panedWidgetClass;
1567a84e134Smrg
1577a84e134Smrgtypedef struct _PanedClassRec	*PanedWidgetClass;
1587a84e134Smrgtypedef struct _PanedRec	*PanedWidget;
1597a84e134Smrg
1607a84e134Smrg/*
1617a84e134Smrg *  Public Procedures
1627a84e134Smrg */
1637a84e134Smrg
1647a84e134Smrg_XFUNCPROTOBEGIN
1657a84e134Smrg
1667a84e134Smrg/*
1677a84e134Smrg * Function:
1687a84e134Smrg *	XawPanedSetMinMax
1697a84e134Smrg *
1707a84e134Smrg * Parameters:
1717a84e134Smrg *	widget - widget that is a child of the Paned widget
1727a84e134Smrg *	min    - new min and max size for the pane
1737a84e134Smrg *	max    - ""
1747a84e134Smrg *
1757a84e134Smrg * Description:
1767a84e134Smrg *	Sets the min and max size for a pane.
1777a84e134Smrg */
1787a84e134Smrgvoid XawPanedSetMinMax
1797a84e134Smrg(
1807a84e134Smrg Widget			w,
1817a84e134Smrg int			min,
1827a84e134Smrg int			max
1837a84e134Smrg );
1847a84e134Smrg
1857a84e134Smrg/*
1867a84e134Smrg * Function:
1877a84e134Smrg *	XawPanedGetMinMax
1887a84e134Smrg *
1897a84e134Smrg * Parameters:
1907a84e134Smrg *	widget - widget that is a child of the Paned widget
1917a84e134Smrg *	min    - return the current min and max size for the pane
1927a84e134Smrg *	max    - ""
1937a84e134Smrg *
1947a84e134Smrg * Description:
1957a84e134Smrg *	Gets the min and max size for a pane.
1967a84e134Smrg */
1977a84e134Smrgvoid XawPanedGetMinMax
1987a84e134Smrg(
1997a84e134Smrg Widget			w,
2007a84e134Smrg int			*min_return,
2017a84e134Smrg int			*max_return
2027a84e134Smrg );
2037a84e134Smrg
2047a84e134Smrg/*
2057a84e134Smrg * Function:
2067a84e134Smrg *	XawPanedSetRefigureMode
2077a84e134Smrg *
2087a84e134Smrg * Parameters:
2097a84e134Smrg *	w    - paned widget
2107a84e134Smrg *	mode - if False then inhibit refigure
2117a84e134Smrg *
2127a84e134Smrg * Description:
2137a84e134Smrg *	  Allows a flag to be set the will inhibit  the paned widgets
2147a84e134Smrg *	relayout routine.
2157a84e134Smrg */
2167a84e134Smrgvoid XawPanedSetRefigureMode
2177a84e134Smrg(
2187a84e134Smrg Widget			w,
2197a84e134Smrg#if NeedWidePrototypes
2207a84e134Smrg int			mode
2217a84e134Smrg#else
2227a84e134Smrg Boolean		mode
2237a84e134Smrg#endif
2247a84e134Smrg );
2257a84e134Smrg
2267a84e134Smrg/*
2277a84e134Smrg * Function:
2287a84e134Smrg *	XawPanedGetNumSub
2297a84e134Smrg *
2307a84e134Smrg * Parameters:
2317a84e134Smrg *	w - paned widget
2327a84e134Smrg *
2337a84e134Smrg * Returns:
2347a84e134Smrg *	Number of panes in the paned widget.
2357a84e134Smrg */
2367a84e134Smrgint XawPanedGetNumSub
2377a84e134Smrg(
2387a84e134Smrg Widget			w
2397a84e134Smrg );
2407a84e134Smrg
2417a84e134Smrg/*
2427a84e134Smrg * Function:
2437a84e134Smrg *	XawPanedAllowResize
2447a84e134Smrg *
2457a84e134Smrg * Parameters:
2467a84e134Smrg *	widget - child of the paned widget
2477a84e134Smrg *
2487a84e134Smrg * Description:
2497a84e134Smrg *	  Allows a flag to be set that determines if the paned widget will
2507a84e134Smrg *	allow geometry requests from this child
2517a84e134Smrg */
2527a84e134Smrgvoid XawPanedAllowResize
2537a84e134Smrg(
2547a84e134Smrg Widget			w,
2557a84e134Smrg#if NeedWidePrototypes
2567a84e134Smrg int			allow_resize
2577a84e134Smrg#else
2587a84e134Smrg Boolean		allow_resize
2597a84e134Smrg#endif
2607a84e134Smrg );
2617a84e134Smrg
2627a84e134Smrg_XFUNCPROTOEND
2637a84e134Smrg
2647a84e134Smrg#endif /* _XawPaned_h */
265