1 /***********************************************************
3 $XConsortium: PanedP.h,v 1.4 89/05/11 01:06:12 kit Exp $
5 Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
6 and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
10 Permission to use, copy, modify, and distribute this software and its
11 documentation for any purpose and without fee is hereby granted,
12 provided that the above copyright notice appear in all copies and that
13 both that copyright notice and this permission notice appear in
14 supporting documentation, and that the names of Digital or MIT not be
15 used in advertising or publicity pertaining to distribution of the
16 software without specific, written prior permission.
18 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
19 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
20 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
21 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
22 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
23 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
26 ******************************************************************/
29 * PanedP.h - Paned Composite Widget's private header file.
31 * Updated and significantly modifided from the Athena VPaned Widget.
35 * By: Chris D. Peterson
37 * kit@expo.lcs.mit.edu
43 #include <./Xaw3_1Paned.h>
44 #include <X11/Constraint.h>
46 /*********************************************************************
48 * Paned Widget Private Data
50 *********************************************************************/
52 /* New fields for the Paned widget class record */
54 typedef struct _PanedClassPart
{
55 int foo
; /* keep compiler happy. */
58 /* Full Class record declaration */
59 typedef struct _PanedClassRec
{
60 CoreClassPart core_class
;
61 CompositeClassPart composite_class
;
62 ConstraintClassPart constraint_class
;
63 PanedClassPart paned_class
;
66 extern PanedClassRec panedClassRec
;
68 /* Paned constraint record */
69 typedef struct _PanedConstraintsPart
{
71 Dimension min
; /* Minimum height */
72 Dimension max
; /* Maximum height */
73 Boolean allow_resize
; /* TRUE iff child resize requests are ok */
74 Boolean show_grip
; /* TRUE iff child will have grip below it,
75 when it is not the bottom pane. */
76 Boolean skip_adjust
; /* TRUE iff child's height should not be */
77 /* changed without explicit user action. */
78 int position
; /* position location in Paned (relative to
79 other children) ** NIY ** */
80 Dimension preferred_size
; /* The Preferred size of the pane.
81 Iff this is zero then ask child for size.*/
82 Boolean resize_to_pref
; /* resize this pane to its preferred size
83 on a resize or change managed after
87 Position delta
; /* Desired Location */
88 Position olddelta
; /* The last value of dy. */
89 Boolean paned_adjusted_me
; /* Has the vpaned adjusted this widget w/o
90 user interaction to make things fit? */
91 Dimension wp_size
; /* widget's preferred size */
92 int size
; /* the size the widget will actually get. */
93 Widget grip
; /* The grip for this child */
95 } PanedConstraintsPart
, *Pane
;
97 typedef struct _PanedConstraintsRec
{
98 PanedConstraintsPart paned
;
99 } PanedConstraintsRec
, *PanedConstraints
;
102 * The Pane Stack Structure.
105 typedef struct _PaneStack
{
106 struct _PaneStack
* next
; /* The next element on the stack. */
107 Pane pane
; /* The pane in thise element on the stack. */
108 int start_size
; /* The size of this element when it was pushed
112 /* New Fields for the Paned widget record */
115 Position grip_indent
; /* Location of grips (offset
116 from right margin) */
117 Boolean refiguremode
; /* Whether to refigure changes
119 XtTranslations grip_translations
; /* grip translation table */
120 Pixel internal_bp
; /* color of internal borders. */
121 Dimension internal_bw
; /* internal border width. */
122 XtOrientation orientation
; /* Orientation of paned widget. */
124 Cursor cursor
; /* Cursor for paned window */
125 Cursor grip_cursor
; /* inactive grip cursor */
126 Cursor v_grip_cursor
; /* inactive vert grip cursor */
127 Cursor h_grip_cursor
; /* inactive horiz grip cursor */
128 Cursor adjust_this_cursor
; /* active grip cursor: T */
129 Cursor v_adjust_this_cursor
; /* active vert grip cursor: T */
130 Cursor h_adjust_this_cursor
; /* active horiz grip cursor: T */
133 Cursor adjust_upper_cursor
; /* active grip cursor: U */
134 Cursor adjust_lower_cursor
; /* active grip cursor: D */
137 Cursor adjust_left_cursor
; /* active grip cursor: U */
138 Cursor adjust_right_cursor
; /* active grip cursor: D */
141 Boolean recursively_called
; /* for ChangeManaged */
142 Boolean resize_children_to_pref
; /* override constrain resources
143 and resize all children to
145 int start_loc
; /* mouse origin when adjusting */
146 Widget whichadd
; /* Which pane to add changes to */
147 Widget whichsub
; /* Which pane to sub changes from */
148 GC normgc
; /* GC to use when drawing borders */
149 GC invgc
; /* GC to use when erasing borders */
150 GC flipgc
; /* GC to use when animating
152 int num_panes
; /* count of managed panes */
153 PaneStack
* stack
; /* The pane stack for this widget.*/
156 /**************************************************************************
158 * Full instance record declaration
160 **************************************************************************/
162 typedef struct _PanedRec
{
164 CompositePart composite
;
165 ConstraintPart constraint
;
169 #endif /* _XawPanedP_h */
170 /* DON'T ADD STUFF AFTER THIS #endif */