1 /* 2 * Motif 3 * 4 * Copyright (c) 1987-2012, The Open Group. All rights reserved. 5 * 6 * These libraries and programs are free software; you can 7 * redistribute them and/or modify them under the terms of the GNU 8 * Lesser General Public License as published by the Free Software 9 * Foundation; either version 2 of the License, or (at your option) 10 * any later version. 11 * 12 * These libraries and programs are distributed in the hope that 13 * they will be useful, but WITHOUT ANY WARRANTY; without even the 14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 15 * PURPOSE. See the GNU Lesser General Public License for more 16 * details. 17 * 18 * You should have received a copy of the GNU Lesser General Public 19 * License along with these librararies and programs; if not, write 20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth 21 * Floor, Boston, MA 02110-1301 USA 22 * 23 */ 24 25 #ifndef XmButtonBoxP_h 26 #define XmButtonBoxP_h 27 28 #if defined(VMS) || defined(__VMS) 29 #include <X11/apienvset.h> 30 #endif 31 32 /************************************************************ 33 * INCLUDE FILES 34 ************************************************************/ 35 36 #include <Xm/ManagerP.h> 37 #include <Xm/ButtonBox.h> 38 39 /************************************************************ 40 * TYPEDEFS AND DEFINES 41 ************************************************************/ 42 43 /************************************************************ 44 * MACROS 45 ************************************************************/ 46 47 #define XmButtonBoxIndex (XmManagerIndex + 1) 48 49 #define XmButtonBox_equal_size(w) (((XmButtonBoxWidget)(w))->button_box.equal_size) 50 #define XmButtonBox_fill_option(w) (((XmButtonBoxWidget)(w))->button_box.fill_option) 51 #define XmButtonBox_margin_width(w) (((XmButtonBoxWidget)(w))->button_box.margin_width) 52 #define XmButtonBox_margin_height(w) (((XmButtonBoxWidget)(w))->button_box.margin_height) 53 #define XmButtonBox_spacing(w) (((XmButtonBoxWidget)(w))->button_box.spacing) 54 #define XmButtonBox_orientation(w) (((XmButtonBoxWidget)(w))->button_box.orientation) 55 #define XmButtonBox_default_button(w) (((XmButtonBoxWidget)(w))->button_box.default_button) 56 57 #define XmButtonBoxC_pref_width(w) (((XmBBoxConstraints)((Widget)(w))->core.constraints)->bbox.pref_width) 58 #define XmButtonBoxC_pref_height(w) (((XmBBoxConstraints)((Widget)(w))->core.constraints)->bbox.pref_height) 59 60 /************************************************************ 61 * GLOBAL DECLARATIONS 62 ************************************************************/ 63 64 #ifdef __cplusplus 65 extern "C" { 66 #endif 67 68 typedef struct _XmButtonBoxClassPart 69 { 70 XtPointer extension; /* In case its needed later */ 71 } XmButtonBoxClassPart; 72 73 typedef struct _XmButtonBoxClassRec 74 { 75 CoreClassPart core_class; 76 CompositeClassPart composite_class; 77 ConstraintClassPart constraint_class; 78 XmManagerClassPart manager_class; 79 XmButtonBoxClassPart buttonbox_class; 80 81 } XmButtonBoxClassRec; 82 83 typedef struct _XmBBoxConstraintsPart { 84 Dimension pref_width, pref_height; 85 } XmBBoxConstraintsPart; 86 87 typedef struct _XmBBoxConstraintsRec { 88 XmManagerConstraintPart manager; 89 XmBBoxConstraintsPart bbox; 90 } XmBBoxConstraintsRec, *XmBBoxConstraints; 91 92 /* 93 * Match XmOffset nomenclature 94 */ 95 typedef XmBBoxConstraintsPart XmButtonBoxConstraintPart; 96 97 typedef struct 98 { 99 /* resources */ 100 101 Boolean equal_size; 102 XmFillOption fill_option; 103 Dimension margin_width, margin_height; 104 Dimension spacing; 105 unsigned char orientation; 106 Widget default_button; 107 108 } XmButtonBoxPart; 109 110 typedef struct _XmButtonBoxRec 111 { 112 CorePart core; 113 CompositePart composite; 114 ConstraintPart constraint; 115 XmManagerPart manager; 116 XmButtonBoxPart button_box; 117 118 } XmButtonBoxRec; 119 120 /************************************************************ 121 * EXTERNAL DECLARATIONS 122 ************************************************************/ 123 124 extern XmButtonBoxClassRec xmButtonBoxClassRec; 125 126 /************************************************************ 127 * STATIC DECLARATIONS 128 ************************************************************/ 129 130 #ifdef __cplusplus 131 } /* Closes scope of 'extern "C"' declaration */ 132 #endif 133 134 #if defined(VMS) || defined(__VMS) 135 #include <X11/apienvrst.h> 136 #endif 137 138 #endif /* _XmButtonBoxP_h */ 139