1 /** 2 * 3 * $Header: /cvsroot/lesstif/lesstif/include/Motif-2.1/Xm/PanedWP.h,v 1.1 2004/08/28 19:23:25 dannybackx Exp $ 4 * 5 * Copyright (C) 1995-1998 Free Software Foundation, Inc. 6 * Copyright (C) 1998-2000 LessTif Development Team 7 * 8 * This file is part of the GNU LessTif Library. 9 * 10 * This library is free software; you can redistribute it and/or 11 * modify it under the terms of the GNU Library General Public 12 * License as published by the Free Software Foundation; either 13 * version 2 of the License, or (at your option) any later version. 14 * 15 * This library is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 * Library General Public License for more details. 19 * 20 * You should have received a copy of the GNU Library General Public 21 * License along with this library; if not, write to the Free 22 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23 * 24 **/ 25 26 #ifndef _XM_PANEDWP_H 27 #define _XM_PANEDWP_H 28 29 #include <Xm/PanedW.h> 30 #include <Xm/ManagerP.h> 31 32 #ifdef __cplusplus 33 extern "C" { 34 #endif 35 36 37 /* Define the Constraint Resources */ 38 typedef struct _XmPanedWindowConstraintPart { 39 int position; /* position location in PanedWindow */ 40 int dwidth; /* desired width */ /* NEW, needed ? */ 41 int dheight; /* desired height */ 42 Position dx; /* desired location */ /* NEW, needed ? */ 43 Position dy; /* desired location */ 44 Position olddx; /* last value of above */ 45 Position olddy; /* last value of above */ 46 Dimension min; /* min height */ 47 Dimension max; /* max height */ 48 Boolean isPane; /* true if constraint of a pane, else false */ 49 50 Boolean allow_resize; /* true if child resize requests ok */ 51 Boolean skip_adjust; /* true if child height can't change without 52 * user input */ 53 /* private part */ 54 Widget sash; /* Sash widget attached to this child */ 55 Widget separator; /* Separator widget attached to this child */ 56 short position_index; 57 } XmPanedWindowConstraintPart; 58 59 typedef struct _XmPanedWindowConstraintRec { 60 XmManagerConstraintPart manager; 61 XmPanedWindowConstraintPart panedw; 62 } XmPanedWindowConstraintRec, *XmPanedWindowConstraintPtr; 63 64 /* Define the paned window instance part */ 65 typedef struct { 66 Boolean refiguremode; /* refigure now or later */ 67 Boolean separator_on; /* separators visible */ 68 69 Dimension margin_height; 70 Dimension margin_width; 71 72 Dimension spacing; 73 74 Dimension sash_width; 75 Dimension sash_height; 76 Dimension sash_shadow_thickness; 77 Position sash_indent; 78 79 /* private part */ 80 int startx, starty; /* mouse start y */ 81 short increment_count; /* sash increment count */ 82 short pane_count; /* number of managed panes */ 83 short num_slots; /* number of avail slots for children */ 84 short num_managed_children; /* number of managed children */ 85 86 Boolean recursively_called; /* for change_managed and creation 87 * of sash and sep children */ 88 Boolean resize_at_realize; /* Obscure M*tif comment: for realize 89 * if GeometryNo condition??? */ 90 91 XmPanedWindowConstraintPtr top_pane; 92 XmPanedWindowConstraintPtr bottom_pane; 93 94 GC flipgc; /* GC for animating borders */ 95 WidgetList managed_children; /* guess */ 96 97 unsigned char orientation; /* new for 2.0 */ 98 } XmPanedWindowPart; 99 100 /* Define the full instance record */ 101 typedef struct _XmPanedWindowRec { 102 CorePart core; 103 CompositePart composite; 104 ConstraintPart constraint; 105 XmManagerPart manager; 106 XmPanedWindowPart paned_window; 107 } XmPanedWindowRec; 108 109 /* Define class part structure */ 110 typedef struct { 111 XtPointer extension; 112 } XmPanedWindowClassPart; 113 114 /* Define the full class record */ 115 typedef struct _XmPanedWindowClassRec { 116 CoreClassPart core_class; 117 CompositeClassPart composite_class; 118 ConstraintClassPart constraint_class; 119 XmManagerClassPart manager_class; 120 XmPanedWindowClassPart paned_window_class; 121 } XmPanedWindowClassRec; 122 123 XMLIBEXPORT extern XmPanedWindowClassRec xmPanedWindowClassRec; 124 125 /* Access macros */ 126 #define PW_Orientation(w) \ 127 (((XmPanedWindowWidget)w)->paned_window.orientation) 128 #define PW_StartX(w) \ 129 (((XmPanedWindowWidget)w)->paned_window.startx) 130 131 #define PWC_DX(w) \ 132 (((XmPanedWindowConstraintPtr)((w)->core.constraints))->panedw.dx) 133 #define PWC_DWidth(w) \ 134 (((XmPanedWindowConstraintPtr)((w)->core.constraints))->panedw.dwidth) 135 #define PWC_OldDX(w) \ 136 (((XmPanedWindowConstraintPtr)((w)->core.constraints))->panedw.olddx) 137 138 #ifdef __cplusplus 139 } 140 #endif 141 142 143 #endif /* _XM_PANEDWP_H */ 144