749N/A/*
749N/A * $XConsortium: TreeP.h,v 1.14 94/04/17 20:13:24 jim Exp $
749N/A *
749N/A
749N/ACopyright (c) 1990 X Consortium
749N/A
749N/APermission is hereby granted, free of charge, to any person obtaining a copy
749N/Aof this software and associated documentation files (the "Software"), to deal
749N/Ain the Software without restriction, including without limitation the rights
749N/Ato use, copy, modify, merge, publish, distribute, sublicense, and/or sell
749N/Acopies of the Software, and to permit persons to whom the Software is
749N/Afurnished to do so, subject to the following conditions:
749N/A
749N/AThe above copyright notice and this permission notice shall be included in
749N/Aall copies or substantial portions of the Software.
749N/A
749N/ATHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
749N/AIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
749N/AFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
749N/AX CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
749N/AAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
749N/ACONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
749N/A
749N/AExcept as contained in this notice, the name of the X Consortium shall not be
749N/Aused in advertising or otherwise to promote the sale, use or other dealings
749N/Ain this Software without prior written authorization from the X Consortium.
749N/A
749N/A * Copyright 1989 Prentice Hall
749N/A *
749N/A * Permission to use, copy, modify, and distribute this software for any
749N/A * purpose and without fee is hereby granted, provided that the above
749N/A * copyright notice appear in all copies and that both the copyright notice
749N/A * and this permission notice appear in supporting documentation.
749N/A *
749N/A * Prentice Hall and the authors disclaim all warranties with regard
749N/A * to this software, including all implied warranties of merchantability and
749N/A * fitness. In no event shall Prentice Hall or the authors be liable
749N/A * for any special, indirect or cosequential damages or any damages whatsoever
749N/A * resulting from loss of use, data or profits, whether in an action of
749N/A * contract, negligence or other tortious action, arising out of or in
749N/A * connection with the use or performance of this software.
749N/A *
749N/A * Authors: Jim Fulton, MIT X Consortium,
749N/A * based on a version by Douglas Young, Prentice Hall
749N/A *
749N/A * This widget is based on the Tree widget described on pages 397-419 of
749N/A * Douglas Young's book "The X Window System, Programming and Applications
749N/A * with Xt OSF/Motif Edition." The layout code has been rewritten to use
749N/A * additional blank space to make the structure of the graph easier to see
749N/A * as well as to support vertical trees.
749N/A */
749N/A
749N/A
749N/A#ifndef _XawTreeP_h
749N/A#define _XawTreeP_h
749N/A
749N/A#include <X11/Xaw/Tree.h>
749N/A
749N/Atypedef struct _TreeClassPart {
749N/A int ignore;
749N/A} TreeClassPart;
749N/A
749N/Atypedef struct _TreeClassRec {
749N/A CoreClassPart core_class;
749N/A CompositeClassPart composite_class;
749N/A ConstraintClassPart constraint_class;
749N/A TreeClassPart tree_class;
749N/A} TreeClassRec;
749N/A
749N/Aextern TreeClassRec treeClassRec;
749N/A
749N/Atypedef struct {
749N/A /* fields available through resources */
749N/A Dimension hpad; /* hSpace/HSpace */
749N/A Dimension vpad; /* vSpace/VSpace */
749N/A Dimension line_width; /* lineWidth/LineWidth */
749N/A Pixel foreground; /* foreground/Foreground */
749N/A XtGravity gravity; /* gravity/Gravity */
749N/A Boolean auto_reconfigure; /* autoReconfigure/AutoReconfigure */
749N/A /* private fields */
749N/A GC gc; /* used to draw lines */
749N/A Widget tree_root; /* hidden root off all children */
749N/A Dimension *largest; /* list of largest per depth */
749N/A int n_largest; /* number of elements in largest */
749N/A Dimension maxwidth, maxheight; /* for shrink wrapping */
749N/A} TreePart;
749N/A
749N/A
749N/Atypedef struct _TreeRec {
749N/A CorePart core;
749N/A CompositePart composite;
749N/A ConstraintPart constraint;
749N/A TreePart tree;
749N/A} TreeRec;
749N/A
749N/A
749N/A/*
749N/A * structure attached to all children
749N/A */
749N/Atypedef struct _TreeConstraintsPart {
749N/A /* resources */
749N/A Widget parent; /* treeParent/TreeParent */
749N/A GC gc; /* treeGC/TreeGC */
749N/A /* private data */
749N/A Widget *children;
749N/A int n_children;
749N/A int max_children;
749N/A Dimension bbsubwidth, bbsubheight; /* bounding box of sub tree */
749N/A Dimension bbwidth, bbheight; /* bounding box including node */
749N/A Position x, y;
749N/A} TreeConstraintsPart;
749N/A
749N/Atypedef struct _TreeConstraintsRec {
749N/A TreeConstraintsPart tree;
749N/A} TreeConstraintsRec, *TreeConstraints;
749N/A
749N/A
749N/A/*
749N/A * useful macros
749N/A */
749N/A
749N/A#define TREE_CONSTRAINT(w) \
749N/A ((TreeConstraints)((w)->core.constraints))
749N/A
749N/A#define TREE_INITIAL_DEPTH 10 /* for allocating largest array */
749N/A#define TREE_HORIZONTAL_DEFAULT_SPACING 20
749N/A#define TREE_VERTICAL_DEFAULT_SPACING 6
749N/A
749N/A#endif /* _XawTreeP_h */
749N/A
749N/A
749N/A