Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:15:30

0001 /*
0002  * Motif
0003  *
0004  * Copyright (c) 1987-2012, The Open Group. All rights reserved.
0005  *
0006  * These libraries and programs are free software; you can
0007  * redistribute them and/or modify them under the terms of the GNU
0008  * Lesser General Public License as published by the Free Software
0009  * Foundation; either version 2 of the License, or (at your option)
0010  * any later version.
0011  *
0012  * These libraries and programs are distributed in the hope that
0013  * they will be useful, but WITHOUT ANY WARRANTY; without even the
0014  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
0015  * PURPOSE. See the GNU Lesser General Public License for more
0016  * details.
0017  *
0018  * You should have received a copy of the GNU Lesser General Public
0019  * License along with these librararies and programs; if not, write
0020  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
0021  * Floor, Boston, MA 02110-1301 USA
0022  * 
0023  */
0024 
0025 #ifndef _XmTreeP_h_
0026 #define _XmTreeP_h_
0027 
0028 
0029 /************************************************************
0030 *   INCLUDE FILES
0031 *************************************************************/
0032 
0033 #include <Xm/HierarchyP.h>
0034 #include <Xm/Tree.h>
0035 #include <Xm/xmlist.h>
0036 
0037 /************************************************************
0038 *   TYPEDEFS AND DEFINES
0039 *************************************************************/
0040 
0041 #ifdef __cplusplus
0042 extern "C" {
0043 #endif
0044 
0045 
0046 /************************************************************
0047 *   MACROS
0048 *************************************************************/
0049 
0050 #define XmTree_h_node_space(w) (((XmTreeWidget)(w))->tree.h_node_space)
0051 #define XmTree_v_node_space(w) (((XmTreeWidget)(w))->tree.v_node_space)
0052 #define XmTree_connect_style(w) (((XmTreeWidget)(w))->tree.connect_style)
0053 #define XmTree_max_width(w) (((XmTreeWidget)(w))->tree.max_width)
0054 #define XmTree_max_height(w) (((XmTreeWidget)(w))->tree.max_height)
0055 #define XmTree_child_op_list(w) (((XmTreeWidget)(w))->tree.child_op_list)
0056 #define XmTree_ul_point(w) (((XmTreeWidget)(w))->tree.ul_point)
0057 #define XmTree_lr_point(w) (((XmTreeWidget)(w))->tree.lr_point)
0058 #define XmTree_orientation(w) (((XmTreeWidget)(w))->tree.orientation)
0059 #define XmTree_compress_style(w) (((XmTreeWidget)(w))->tree.compress_style)
0060 #define XmTree_vertical_delta(w) (((XmTreeWidget)(w))->tree.vertical_delta)
0061 #define XmTree_horizontal_delta(w) (((XmTreeWidget)(w))->tree.horizontal_delta)
0062 
0063 #define XmTreeC_open_close_padding(c) (((XmTreeConstraintPtr)(c))->tree.open_close_padding)
0064 #define XmTreeC_box_x(c) (((XmTreeConstraintPtr)(c))->tree.box_x)
0065 #define XmTreeC_box_y(c) (((XmTreeConstraintPtr)(c))->tree.box_y)
0066 #define XmTreeC_bb_width(c) (((XmTreeConstraintPtr)(c))->tree.bb_width)
0067 #define XmTreeC_bb_height(c) (((XmTreeConstraintPtr)(c))->tree.bb_height)
0068 #define XmTreeC_widget_offset(c) (((XmTreeConstraintPtr)(c))->tree.widget_offset)
0069 #define XmTreeC_placed(c) (((XmTreeConstraintPtr)(c))->tree.placed)
0070 #define XmTreeC_color(c) (((XmTreeConstraintPtr)(c))->tree.color)
0071 #define XmTreeC_background_color(c) (((XmTreeConstraintPtr)(c))->tree.background_color)
0072 #define XmTreeC_line_width(c) (((XmTreeConstraintPtr)(c))->tree.line_width)
0073 #define XmTreeC_line_style(c) (((XmTreeConstraintPtr)(c))->tree.line_style)
0074 #define XmTreeC_gc(c) (((XmTreeConstraintPtr)(c))->tree.gc)
0075 #define XmTreeC_new_x(c) (((XmTreeConstraintPtr)(c))->tree.new_x)
0076 #define XmTreeC_new_y(c) (((XmTreeConstraintPtr)(c))->tree.new_y)
0077 #define XmTreeC_oc_new_x(c) (((XmTreeConstraintPtr)(c))->tree.oc_new_x)
0078 #define XmTreeC_oc_new_y(c) (((XmTreeConstraintPtr)(c))->tree.oc_new_y)
0079 #define XmTreeC_map(c) (((XmTreeConstraintPtr)(c))->tree.map)
0080 #define XmTreeC_unmap(c) (((XmTreeConstraintPtr)(c))->tree.unmap)
0081 #define XmTreeC_move(c) (((XmTreeConstraintPtr)(c))->tree.move)
0082 #define XmTreeC_is_compressed(c) (((XmTreeConstraintPtr)(c))->tree.is_compressed)
0083 
0084 /************************************************************
0085 *   GLOBAL DECLARATIONS
0086 *************************************************************/
0087 
0088 typedef struct {
0089     XtPointer extension;    /* Just in case we need it later. */
0090 } TreeClassPart;
0091 
0092 typedef struct _XmTreeClassRec {
0093     CoreClassPart       core_class;
0094     CompositeClassPart      composite_class;
0095     ConstraintClassPart     constraint_class;
0096     XmManagerClassPart      manager_class;
0097     HierarchyClassPart          hierarchy_class;
0098     TreeClassPart           tree_class;
0099 } XmTreeClassRec;
0100 externalref  XmTreeClassRec xmTreeClassRec;
0101 
0102 typedef struct _TreeNodeInfo {
0103     /*
0104      * Public (Resource) data.
0105      */
0106 
0107     int open_close_padding; /* Number of pixels to leave between o/c button
0108                    and node button (can be negative). */
0109 
0110     /*
0111      * Private data.
0112      */
0113 
0114     Position box_x, box_y;
0115     Dimension bb_width, bb_height; /*Bounding box for myself and my children*/
0116     Dimension widget_offset;    /* Amount of space to leave for the open
0117                    close button to the left of the node.*/
0118     Boolean placed;
0119 
0120     Pixel color;        /* color to draw line in. */
0121     int line_width;
0122 
0123     GC gc;
0124 
0125     Position new_x, new_y, oc_new_x, oc_new_y;
0126     Boolean map, unmap, move;
0127     Boolean is_compressed;  /* for space compression, is this node moved? */
0128 
0129     /* more resources */
0130     int line_style;
0131     Pixel background_color;     /* color to draw line in. */
0132 } TreeNodeInfo;
0133 
0134 typedef struct _TreeConstraintRec {
0135     XmManagerConstraintPart manager;
0136     HierNodeInfo    hierarchy;
0137     TreeNodeInfo    tree;
0138 } XmTreeConstraintRec, TreeConstraintRec, *TreeConstraints, *XmTreeConstraintPtr;
0139 
0140 
0141 typedef struct _TreePart {
0142     /* Resources */
0143 
0144     Dimension h_node_space, v_node_space; /* Space between various nodes. */
0145 
0146     XmTreeConnectStyle connect_style; /* The connection style. */
0147 
0148 
0149     /* Private State */
0150 
0151     Dimension max_width;    /* Our new desired width. */
0152     Dimension max_height;   /* Our new desired height. */
0153     
0154     XmList child_op_list;       /* List of child operations */
0155     XPoint ul_point, lr_point;  /* Bounding box for exposure compression. */
0156 
0157     /* more resources */
0158     unsigned char orientation;     /* XmHORIZONTAL or XmVERTICAL */
0159 
0160     XmTreeCompressStyle compress_style;  /* how to do space compression */
0161 
0162     Dimension vertical_delta; /* if doing space compression, how many pixels */
0163                               /* to offset alternating siblings vertically */
0164     Dimension horizontal_delta;  /* or horizontally */
0165 } TreePart;
0166 
0167 typedef struct _XmTreeRec {
0168     CorePart        core;
0169     CompositePart   composite;
0170     ConstraintPart  constraint;
0171     XmManagerPart   manager;
0172     HierarchyPart   hierarchy;
0173     TreePart        tree;
0174 } XmTreeRec;
0175 
0176 /*
0177  * Typedefs to conform to the XmField macro's naming convention
0178  */
0179 typedef TreePart XmTreePart;
0180 typedef TreeNodeInfo XmTreeConstraintPart;
0181 
0182 /************************************************************
0183 *   EXTERNAL DECLARATIONS
0184 *************************************************************/
0185 
0186 extern XmTreeClassRec   xmTreeClassRec;
0187 
0188 /************************************************************
0189 *   STATIC DECLARATIONS
0190 *************************************************************/
0191 
0192 #ifdef __cplusplus
0193 }   /* Closes scope of 'extern "C"' declaration */
0194 #endif
0195 
0196 #if defined(VMS) || defined(__VMS)
0197 #include <X11/apienvrst.h>
0198 #endif
0199 
0200 #endif /* _TreeP_h */
0201 
0202 
0203 
0204 
0205 
0206