Back to home page

EIC code displayed by LXR

 
 

    


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

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 _XmOutlineP_h
0026 #define _XmOutlineP_h
0027 
0028 #if defined(VMS) || defined(__VMS)
0029 #include <X11/apienvset.h>
0030 #endif
0031 
0032 /************************************************************
0033 *   INCLUDE FILES
0034 *************************************************************/
0035 
0036 #include <Xm/HierarchyP.h>
0037 #include <Xm/Outline.h>
0038 #include <Xm/xmlist.h>
0039 
0040 #ifdef __cplusplus
0041 extern "C" {
0042 #endif
0043 
0044 /************************************************************
0045 *   TYPEDEFS AND DEFINES
0046 *************************************************************/
0047 
0048 /************************************************************
0049 *   MACROS
0050 *************************************************************/
0051 
0052 #define XmOutline_top_node_of_display(w) (((XmOutlineWidget)(w))->outline.top_node_of_display)
0053 #define XmOutline_max_width(w) (((XmOutlineWidget)(w))->outline.max_width)
0054 #define XmOutline_max_widget_width(w) (((XmOutlineWidget)(w))->outline.max_widget_width)
0055 #define XmOutline_child_op_list(w) (((XmOutlineWidget)(w))->outline.child_op_list)
0056 #define XmOutline_ul_point(w) (((XmOutlineWidget)(w))->outline.ul_point)
0057 #define XmOutline_lr_point(w) (((XmOutlineWidget)(w))->outline.lr_point)
0058 #define XmOutline_draw_gc(w) (((XmOutlineWidget)(w))->outline.draw_gc)
0059 
0060 #define XmOutline_indent_space(w) (((XmOutlineWidget)(w))->outline.indent_space)
0061 #define XmOutline_constrain_width(w) (((XmOutlineWidget)(w))->outline.constrain_width)
0062 #define XmOutline_connect_nodes(w) (((XmOutlineWidget)(w))->outline.connect_nodes)
0063 
0064 
0065 
0066 #define XmOutlineC_top_node_of_display(c) (((XmOutlineConstraintPtr)(c))->outline.top_node_of_display)
0067 #define XmOutlineC_widget_x(c) (((XmOutlineConstraintPtr)(c))->outline.widget_x)
0068 #define XmOutlineC_open_close_x(c) (((XmOutlineConstraintPtr)(c))->outline.open_close_x)
0069 #define XmOutlineC_height(c) (((XmOutlineConstraintPtr)(c))->outline.height)
0070 #define XmOutlineC_new_x(c) (((XmOutlineConstraintPtr)(c))->outline.new_x)
0071 #define XmOutlineC_new_y(c) (((XmOutlineConstraintPtr)(c))->outline.new_y)
0072 #define XmOutlineC_oc_new_x(c) (((XmOutlineConstraintPtr)(c))->outline.oc_new_x)
0073 #define XmOutlineC_oc_new_y(c) (((XmOutlineConstraintPtr)(c))->outline.oc_new_y)
0074 #define XmOutlineC_map(c) (((XmOutlineConstraintPtr)(c))->outline.map)
0075 #define XmOutlineC_unmap(c) (((XmOutlineConstraintPtr)(c))->outline.unmap)
0076 #define XmOutlineC_move(c) (((XmOutlineConstraintPtr)(c))->outline.move)
0077 
0078 /************************************************************
0079 *   GLOBAL DECLARATIONS
0080 *************************************************************/
0081 
0082 typedef void (*XmOutlineCalcLocationProc)(Widget, Boolean);
0083 typedef int (*XmOutlineMaxWidthProc)(Widget);
0084     
0085 typedef struct {
0086     /*Calculates the maximum width of the outline.*/
0087     XmOutlineMaxWidthProc calc_max_width;
0088     /* Calculates the locations of the objects. */
0089     XmOutlineCalcLocationProc calc_locations;
0090     /* Just in case we need it later. */
0091     XtPointer extension;
0092 } OutlineClassPart;
0093 
0094 typedef struct _XmOutlineClassRec {
0095     CoreClassPart       core_class;
0096     CompositeClassPart      composite_class;
0097     ConstraintClassPart     constraint_class;
0098     XmManagerClassPart      manager_class;
0099     HierarchyClassPart          hierarchy_class;
0100     OutlineClassPart        outline_class;
0101 } XmOutlineClassRec;
0102 
0103 externalref XmOutlineClassRec xmOutlineClassRec;
0104 
0105 typedef struct _OutlineNodeInfo {
0106     /*
0107      * Public (Resource) data.
0108      */
0109 
0110     /*
0111      * Private data.
0112      */
0113 
0114     HierarchyConstraintRec * top_node_of_display;
0115 
0116     Position widget_x, open_close_x; /*location of node and open/close button*/
0117 
0118     Dimension height;   /* height of this row (max of node and open button). */
0119 
0120     Position new_x, new_y, oc_new_x, oc_new_y;
0121     Boolean map, unmap, move;
0122 } OutlineNodeInfo;
0123 
0124 typedef OutlineNodeInfo XmOutlineConstraintPart;
0125 
0126 typedef struct _OutlineConstraintRec {
0127     XmManagerConstraintPart manager;
0128     HierNodeInfo    hierarchy;
0129     OutlineNodeInfo     outline;
0130 } XmOutlineConstraintRec, OutlineConstraintRec, *OutlineConstraints, *XmOutlineConstraintPtr;
0131 
0132 
0133 typedef struct _OutlinePart {
0134     /* Resources */
0135     Dimension indent_space; /* The number of pixels to indent each level */
0136  
0137     /* Private State */
0138 
0139     OutlineConstraints top_node_of_display;
0140 
0141     Dimension max_width;    /* Width of the widest row. */
0142     Dimension max_widget_width; /* Width of the widgets in the widest row. */
0143 
0144     XmList child_op_list;         /* List of child operations */
0145     XPoint ul_point, lr_point;  /* Bounding box for exposure compression */
0146 
0147     /* more resources */
0148     Boolean constrain_width;
0149     Boolean connect_nodes; 
0150 
0151     /* more private */
0152     GC draw_gc;
0153 
0154 } OutlinePart;
0155 
0156 typedef OutlinePart XmOutlinePart;
0157 
0158 typedef struct _XmOutlineRec {
0159     CorePart        core;
0160     CompositePart   composite;
0161     ConstraintPart  constraint;
0162     XmManagerPart   manager;
0163     HierarchyPart   hierarchy;
0164     OutlinePart     outline;
0165 } XmOutlineRec;
0166 
0167 #define XtInheritCalcMaxWidth       ((XmOutlineMaxWidthProc)_XtInherit)
0168 #define XtInheritCalcLocations      ((XmOutlineCalcLocationProc)_XtInherit)
0169 
0170 /************************************************************
0171 *   EXTERNAL DECLARATIONS
0172 *************************************************************/
0173 
0174 extern XmOutlineClassRec    xiOutlineClassRec;
0175 
0176 /************************************************************
0177 *   STATIC DECLARATIONS
0178 *************************************************************/
0179 
0180 #ifdef __cplusplus
0181 }   /* Closes scope of 'extern "C"' declaration */
0182 #endif
0183 
0184 #if defined(VMS) || defined(__VMS)
0185 #include <X11/apienvrst.h>
0186 #endif
0187 
0188 #endif /* _OutlineP_h */