upload tizen2.0 source
[framework/uifw/xorg/lib/libxaw.git] / include / X11 / Xaw / PanedP.h
1 /***********************************************************
2
3 Copyright 1987, 1988, 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  * Updated and significantly modified from the Athena VPaned Widget.
50  *
51  * Date:    March 1, 1989
52  *
53  * By:      Chris D. Peterson
54  *          MIT X Consortium
55  *          kit@expo.lcs.mit.edu
56  */
57
58 #ifndef _XawPanedP_h
59 #define _XawPanedP_h
60
61 #include <X11/Xaw/Paned.h>
62
63 /* New fields for the Paned widget class record */
64 typedef struct _PanedClassPart {
65     XtPointer extension;
66 } PanedClassPart;
67
68 /* Full Class record declaration */
69 typedef struct _PanedClassRec {
70     CoreClassPart       core_class;
71     CompositeClassPart  composite_class;
72     ConstraintClassPart constraint_class;
73     PanedClassPart      paned_class;
74 } PanedClassRec;
75
76 extern PanedClassRec panedClassRec;
77
78 /* Paned constraint record */
79 typedef struct _PanedConstraintsPart {
80     /* Resources */
81     Dimension   min;            /* Minimum height */
82     Dimension   max;            /* Maximum height */
83     Boolean     allow_resize;   /* True if child resize requests are ok */
84     Boolean     show_grip;      /* True if child will have grip below it,
85                                    when it is not the bottom pane */
86     Boolean skip_adjust;        /* True if child's height should not be
87                                    changed without explicit user action */
88     int         position;       /* position location in Paned (relative to
89                                    other children) ** NIY ** */
90     Dimension   preferred_size; /* The Preferred size of the pane.
91                                    If this is zero then ask child for size*/
92     Boolean     resize_to_pref; /* resize this pane to its preferred size
93                                    on a resize or change managed after
94                                    realize */
95
96     /* Private state */
97     Position    delta;          /* Desired Location */
98     Position    olddelta;       /* The last value of dy */
99     Boolean     paned_adjusted_me; /* Has the vpaned adjusted this widget w/o
100                                      user interaction to make things fit? */
101     Dimension   wp_size;        /* widget's preferred size */
102     int size;                   /* the size the widget will actually get */
103     Widget      grip;           /* The grip for this child */
104 } PanedConstraintsPart, *Pane;
105
106 typedef struct _PanedConstraintsRec {
107     PanedConstraintsPart paned;
108 } PanedConstraintsRec, *PanedConstraints;
109
110 /*
111  * The Pane Stack Structure
112  */
113 typedef struct _PaneStack {
114     struct _PaneStack *next;    /* The next element on the stack */
115     Pane pane;                  /* The pane in this element on the stack */
116     int start_size;             /* The size of this element when it
117                                    was pushed onto the stack */
118 } PaneStack;
119
120 /* New Fields for the Paned widget record */
121 typedef struct {
122     /* resources */
123     Position    grip_indent;               /* Location of grips (offset
124                                               from right margin) */
125     Boolean     refiguremode;              /* Whether to refigure changes
126                                               right now */
127     XtTranslations grip_translations;      /* grip translation table */
128     Pixel       internal_bp;            /* color of internal borders */
129     Dimension   internal_bw;            /* internal border width */
130     XtOrientation orientation;          /* Orientation of paned widget */
131
132     Cursor      cursor;                    /* Cursor for paned window */
133     Cursor      grip_cursor;               /* inactive grip cursor */
134     Cursor      v_grip_cursor;             /* inactive vert grip cursor */
135     Cursor      h_grip_cursor;             /* inactive horiz grip cursor */
136     Cursor      adjust_this_cursor;        /* active grip cursor: T */
137     Cursor      v_adjust_this_cursor;      /* active vert grip cursor: T */
138     Cursor      h_adjust_this_cursor;      /* active horiz grip cursor: T */
139
140     /* vertical */
141     Cursor      adjust_upper_cursor;      /* active grip cursor: U */
142     Cursor      adjust_lower_cursor;      /* active grip cursor: D */
143
144     /* horizontal */
145     Cursor      adjust_left_cursor;        /* active grip cursor: U */
146     Cursor      adjust_right_cursor;       /* active grip cursor: D */
147
148     /* private */
149     Boolean     recursively_called;        /* for ChangeManaged */
150     Boolean     resize_children_to_pref;   /* override constrain resources
151                                               and resize all children to
152                                            preferred size */
153     int         start_loc;                 /* mouse origin when adjusting */
154     Widget      whichadd;                  /* Which pane to add changes to */
155     Widget      whichsub;                  /* Which pane to sub changes from */
156     GC          normgc;                    /* GC to use when drawing borders */
157     GC          invgc;                     /* GC to use when erasing borders */
158     GC          flipgc;                    /* GC to use when animating borders */
159     int         num_panes;                 /* count of managed panes */
160     PaneStack   *stack;                    /* The pane stack for this widget */
161 #ifndef OLDXAW
162     XtPointer pad[4];   /* for future use and keep binary compatability */
163 #endif
164 } PanedPart;
165
166 /*
167  * Full instance record declaration
168  */
169 typedef struct _PanedRec {
170     CorePart       core;
171     CompositePart  composite;
172     ConstraintPart constraint;
173     PanedPart      paned;
174 } PanedRec;
175
176 #endif /* _XawPanedP_h */