1 /***********************************************************
3 $XConsortium: PanedP.h,v 1.6 94/04/17 20:12:30 gildea Exp $
6 Copyright (c) 1987, 1988 X Consortium
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:
15 The above copyright notice and this permission notice shall be included in
16 all copies or substantial portions of the Software.
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.
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.
30 Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
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.
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
50 ******************************************************************/
53 * PanedP.h - Paned Composite Widget's private header file.
55 * Updated and significantly modified from the Athena VPaned Widget.
59 * By: Chris D. Peterson
61 * kit@expo.lcs.mit.edu
67 #include <X11/Xaw/Paned.h>
69 /*********************************************************************
71 * Paned Widget Private Data
73 *********************************************************************/
75 /* New fields for the Paned widget class record */
77 typedef struct _PanedClassPart
{
78 int foo
; /* keep compiler happy. */
81 /* Full Class record declaration */
82 typedef struct _PanedClassRec
{
83 CoreClassPart core_class
;
84 CompositeClassPart composite_class
;
85 ConstraintClassPart constraint_class
;
86 PanedClassPart paned_class
;
89 extern PanedClassRec panedClassRec
;
91 /* Paned constraint record */
92 typedef struct _PanedConstraintsPart
{
94 Dimension min
; /* Minimum height */
95 Dimension max
; /* Maximum height */
96 Boolean allow_resize
; /* TRUE iff child resize requests are ok */
97 Boolean show_grip
; /* TRUE iff child will have grip below it,
98 when it is not the bottom pane. */
99 Boolean skip_adjust
; /* TRUE iff child's height should not be */
100 /* changed without explicit user action. */
101 int position
; /* position location in Paned (relative to
102 other children) ** NIY ** */
103 Dimension preferred_size
; /* The Preferred size of the pane.
104 Iff this is zero then ask child for size.*/
105 Boolean resize_to_pref
; /* resize this pane to its preferred size
106 on a resize or change managed after
110 Position delta
; /* Desired Location */
111 Position olddelta
; /* The last value of dy. */
112 Boolean paned_adjusted_me
; /* Has the vpaned adjusted this widget w/o
113 user interaction to make things fit? */
114 Dimension wp_size
; /* widget's preferred size */
115 int size
; /* the size the widget will actually get. */
116 Widget grip
; /* The grip for this child */
118 } PanedConstraintsPart
, *Pane
;
120 typedef struct _PanedConstraintsRec
{
121 PanedConstraintsPart paned
;
122 } PanedConstraintsRec
, *PanedConstraints
;
125 * The Pane Stack Structure.
128 typedef struct _PaneStack
{
129 struct _PaneStack
* next
; /* The next element on the stack. */
130 Pane pane
; /* The pane in this element on the stack. */
131 int start_size
; /* The size of this element when it was pushed
135 /* New Fields for the Paned widget record */
138 Position grip_indent
; /* Location of grips (offset
139 from right margin) */
140 Boolean refiguremode
; /* Whether to refigure changes
142 XtTranslations grip_translations
; /* grip translation table */
143 Pixel internal_bp
; /* color of internal borders. */
144 Dimension internal_bw
; /* internal border width. */
145 XtOrientation orientation
; /* Orientation of paned widget. */
147 Cursor cursor
; /* Cursor for paned window */
148 Cursor grip_cursor
; /* inactive grip cursor */
149 Cursor v_grip_cursor
; /* inactive vert grip cursor */
150 Cursor h_grip_cursor
; /* inactive horiz grip cursor */
151 Cursor adjust_this_cursor
; /* active grip cursor: T */
152 Cursor v_adjust_this_cursor
; /* active vert grip cursor: T */
153 Cursor h_adjust_this_cursor
; /* active horiz grip cursor: T */
156 Cursor adjust_upper_cursor
; /* active grip cursor: U */
157 Cursor adjust_lower_cursor
; /* active grip cursor: D */
160 Cursor adjust_left_cursor
; /* active grip cursor: U */
161 Cursor adjust_right_cursor
; /* active grip cursor: D */
164 Boolean recursively_called
; /* for ChangeManaged */
165 Boolean resize_children_to_pref
; /* override constrain resources
166 and resize all children to
168 int start_loc
; /* mouse origin when adjusting */
169 Widget whichadd
; /* Which pane to add changes to */
170 Widget whichsub
; /* Which pane to sub changes from */
171 GC normgc
; /* GC to use when drawing borders */
172 GC invgc
; /* GC to use when erasing borders */
173 GC flipgc
; /* GC to use when animating
175 int num_panes
; /* count of managed panes */
176 PaneStack
* stack
; /* The pane stack for this widget.*/
179 /**************************************************************************
181 * Full instance record declaration
183 **************************************************************************/
185 typedef struct _PanedRec
{
187 CompositePart composite
;
188 ConstraintPart constraint
;
192 #endif /* _XawPanedP_h */
193 /* DON'T ADD STUFF AFTER THIS #endif */