xref: /386bsd/usr/X386/include/X11/Xaw/PanedP.h (revision a2142627)
1 /***********************************************************
2 
3   $XConsortium: PanedP.h,v 1.5 91/05/09 20:58:23 gildea Exp $
4 
5 Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
6 and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
7 
8                         All Rights Reserved
9 
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.
17 
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
24 SOFTWARE.
25 
26 ******************************************************************/
27 
28 /*
29  * PanedP.h - Paned Composite Widget's private header file.
30  *
31  * Updated and significantly modified from the Athena VPaned Widget.
32  *
33  * Date:    March 1, 1989
34  *
35  * By:      Chris D. Peterson
36  *          MIT X Consortium
37  *          kit@expo.lcs.mit.edu
38  */
39 
40 #ifndef _XawPanedP_h
41 #define _XawPanedP_h
42 
43 #include <X11/Xaw/Paned.h>
44 
45 /*********************************************************************
46  *
47  * Paned Widget Private Data
48  *
49  *********************************************************************/
50 
51 /* New fields for the Paned widget class record */
52 
53 typedef struct _PanedClassPart {
54     int foo;			/* keep compiler happy. */
55 } PanedClassPart;
56 
57 /* Full Class record declaration */
58 typedef struct _PanedClassRec {
59     CoreClassPart       core_class;
60     CompositeClassPart  composite_class;
61     ConstraintClassPart constraint_class;
62     PanedClassPart     paned_class;
63 } PanedClassRec;
64 
65 extern PanedClassRec panedClassRec;
66 
67 /* Paned constraint record */
68 typedef struct _PanedConstraintsPart {
69   /* Resources. */
70     Dimension	min;		/* Minimum height */
71     Dimension	max;		/* Maximum height */
72     Boolean	allow_resize;	/* TRUE iff child resize requests are ok */
73     Boolean     show_grip;	/* TRUE iff child will have grip below it,
74 				   when it is not the bottom pane. */
75     Boolean	skip_adjust;	/* TRUE iff child's height should not be */
76 				/* changed without explicit user action. */
77     int		position;	/* position location in Paned (relative to
78 				   other children) ** NIY ** */
79     Dimension   preferred_size;	/* The Preferred size of the pane.
80 				   Iff this is zero then ask child for size.*/
81     Boolean     resize_to_pref;	/* resize this pane to its preferred size
82 				   on a resize or change managed after
83 				   realize. */
84 
85   /* Private state. */
86     Position	delta;		/* Desired Location */
87     Position	olddelta;	/* The last value of dy. */
88     Boolean     paned_adjusted_me; /* Has the vpaned adjusted this widget w/o
89 				     user interaction to make things fit? */
90     Dimension	wp_size;	/* widget's preferred size */
91     int         size;		/* the size the widget will actually get. */
92     Widget	grip;		/* The grip for this child */
93 
94 } PanedConstraintsPart, *Pane;
95 
96 typedef struct _PanedConstraintsRec {
97     PanedConstraintsPart paned;
98 } PanedConstraintsRec, *PanedConstraints;
99 
100 /*
101  * The Pane Stack Structure.
102  */
103 
104 typedef struct _PaneStack {
105     struct _PaneStack * next;	/* The next element on the stack. */
106     Pane pane;			/* The pane in this element on the stack. */
107     int start_size;		/* The size of this element when it was pushed
108 				   onto the stack. */
109 } PaneStack;
110 
111 /* New Fields for the Paned widget record */
112 typedef struct {
113     /* resources */
114     Position    grip_indent;               /* Location of grips (offset
115 					      from right margin) */
116     Boolean     refiguremode;              /* Whether to refigure changes
117 					      right now */
118     XtTranslations grip_translations;      /* grip translation table */
119     Pixel       internal_bp;               /* color of internal borders. */
120     Dimension   internal_bw;	           /* internal border width. */
121     XtOrientation orientation;	           /* Orientation of paned widget. */
122 
123     Cursor	cursor;		           /* Cursor for paned window */
124     Cursor	grip_cursor;               /* inactive grip cursor */
125     Cursor	v_grip_cursor;             /* inactive vert grip cursor */
126     Cursor	h_grip_cursor;             /* inactive horiz grip cursor */
127     Cursor	adjust_this_cursor;        /* active grip cursor: T */
128     Cursor	v_adjust_this_cursor;      /* active vert grip cursor: T */
129     Cursor	h_adjust_this_cursor;      /* active horiz grip cursor: T */
130 
131 				          /* vertical. */
132     Cursor	adjust_upper_cursor;      /* active grip cursor: U */
133     Cursor	adjust_lower_cursor;      /* active grip cursor: D */
134 
135 				          /* horizontal. */
136     Cursor	adjust_left_cursor;       /* active grip cursor: U */
137     Cursor	adjust_right_cursor;      /* active grip cursor: D */
138 
139     /* private */
140     Boolean	recursively_called;        /* for ChangeManaged */
141     Boolean	resize_children_to_pref;   /* override constrain resources
142 					      and resize all children to
143 					      preferred size. */
144     int         start_loc;	           /* mouse origin when adjusting */
145     Widget      whichadd;                  /* Which pane to add changes to */
146     Widget      whichsub;                  /* Which pane to sub changes from */
147     GC          normgc;                    /* GC to use when drawing borders */
148     GC          invgc;                     /* GC to use when erasing borders */
149     GC          flipgc;                    /* GC to use when animating
150 					      borders */
151     int		num_panes;                 /* count of managed panes */
152     PaneStack * stack;		           /* The pane stack for this widget.*/
153 } PanedPart;
154 
155 /**************************************************************************
156  *
157  * Full instance record declaration
158  *
159  **************************************************************************/
160 
161 typedef struct _PanedRec {
162     CorePart       core;
163     CompositePart  composite;
164     ConstraintPart constraint;
165     PanedPart     paned;
166 } PanedRec;
167 
168 #endif /* _XawPanedP_h */
169 /* DON'T ADD STUFF AFTER THIS #endif */
170