gtk+3: fix dependencies for new gnome/accessibility/at-spi2-core
[oi-userland.git] / components / x11 / libXaw5 / src / X11 / TreeP.h
blobfb587dbff83d5cdb5dee1d8db72883f5f74a66b4
1 /*
2 * $XConsortium: TreeP.h,v 1.14 94/04/17 20:13:24 jim Exp $
5 Copyright (c) 1990 X Consortium
7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 of this software and associated documentation files (the "Software"), to deal
9 in the Software without restriction, including without limitation the rights
10 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 copies of the Software, and to permit persons to whom the Software is
12 furnished to do so, subject to the following conditions:
14 The above copyright notice and this permission notice shall be included in
15 all copies or substantial portions of the Software.
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 Except as contained in this notice, the name of the X Consortium shall not be
25 used in advertising or otherwise to promote the sale, use or other dealings
26 in this Software without prior written authorization from the X Consortium.
28 * Copyright 1989 Prentice Hall
30 * Permission to use, copy, modify, and distribute this software for any
31 * purpose and without fee is hereby granted, provided that the above
32 * copyright notice appear in all copies and that both the copyright notice
33 * and this permission notice appear in supporting documentation.
35 * Prentice Hall and the authors disclaim all warranties with regard
36 * to this software, including all implied warranties of merchantability and
37 * fitness. In no event shall Prentice Hall or the authors be liable
38 * for any special, indirect or cosequential damages or any damages whatsoever
39 * resulting from loss of use, data or profits, whether in an action of
40 * contract, negligence or other tortious action, arising out of or in
41 * connection with the use or performance of this software.
43 * Authors: Jim Fulton, MIT X Consortium,
44 * based on a version by Douglas Young, Prentice Hall
46 * This widget is based on the Tree widget described on pages 397-419 of
47 * Douglas Young's book "The X Window System, Programming and Applications
48 * with Xt OSF/Motif Edition." The layout code has been rewritten to use
49 * additional blank space to make the structure of the graph easier to see
50 * as well as to support vertical trees.
54 #ifndef _XawTreeP_h
55 #define _XawTreeP_h
57 #include <X11/Xaw/Tree.h>
59 typedef struct _TreeClassPart {
60 int ignore;
61 } TreeClassPart;
63 typedef struct _TreeClassRec {
64 CoreClassPart core_class;
65 CompositeClassPart composite_class;
66 ConstraintClassPart constraint_class;
67 TreeClassPart tree_class;
68 } TreeClassRec;
70 extern TreeClassRec treeClassRec;
72 typedef struct {
73 /* fields available through resources */
74 Dimension hpad; /* hSpace/HSpace */
75 Dimension vpad; /* vSpace/VSpace */
76 Dimension line_width; /* lineWidth/LineWidth */
77 Pixel foreground; /* foreground/Foreground */
78 XtGravity gravity; /* gravity/Gravity */
79 Boolean auto_reconfigure; /* autoReconfigure/AutoReconfigure */
80 /* private fields */
81 GC gc; /* used to draw lines */
82 Widget tree_root; /* hidden root off all children */
83 Dimension *largest; /* list of largest per depth */
84 int n_largest; /* number of elements in largest */
85 Dimension maxwidth, maxheight; /* for shrink wrapping */
86 } TreePart;
89 typedef struct _TreeRec {
90 CorePart core;
91 CompositePart composite;
92 ConstraintPart constraint;
93 TreePart tree;
94 } TreeRec;
98 * structure attached to all children
100 typedef struct _TreeConstraintsPart {
101 /* resources */
102 Widget parent; /* treeParent/TreeParent */
103 GC gc; /* treeGC/TreeGC */
104 /* private data */
105 Widget *children;
106 int n_children;
107 int max_children;
108 Dimension bbsubwidth, bbsubheight; /* bounding box of sub tree */
109 Dimension bbwidth, bbheight; /* bounding box including node */
110 Position x, y;
111 } TreeConstraintsPart;
113 typedef struct _TreeConstraintsRec {
114 TreeConstraintsPart tree;
115 } TreeConstraintsRec, *TreeConstraints;
119 * useful macros
122 #define TREE_CONSTRAINT(w) \
123 ((TreeConstraints)((w)->core.constraints))
125 #define TREE_INITIAL_DEPTH 10 /* for allocating largest array */
126 #define TREE_HORIZONTAL_DEFAULT_SPACING 20
127 #define TREE_VERTICAL_DEFAULT_SPACING 6
129 #endif /* _XawTreeP_h */