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 __Xmcolumnp_h__
26 #define __Xmcolumnp_h__
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 #include <Xm/XmP.h>
33 #include <Xm/BulletinBP.h>
34 #include <Xm/Column.h>
35 
36 typedef struct _XmColumnClassPart {
37     XtPointer extension;
38 } XmColumnClassPart;
39 
40 typedef struct _XmColumnClassRec {
41     CoreClassPart            core_class;
42     CompositeClassPart       composite_class;
43     ConstraintClassPart      constraint_class;
44     XmManagerClassPart       manager_class;
45     XmBulletinBoardClassPart bulletin_board_class;
46     XmColumnClassPart	     column_class;
47 } XmColumnClassRec;
48 
49 externalref XmColumnClassRec xmColumnClassRec;
50 
51 typedef struct _XmColumnConstraintPart {
52 
53     /* Public */
54     unsigned char       label_alignment;
55     unsigned char       label_type;
56     unsigned char       fill_style;
57 
58     Boolean		show_label;
59     Boolean		stretchable;
60 
61     Pixmap              label_pixmap;
62     XmString		label_string;
63 
64     XmFontList		label_font_list;
65 
66     /* Private */
67 
68     Widget              label_widget;
69     Dimension		request_width;
70     Dimension		request_height;
71     XRectangle		position;
72     Boolean		check_set_render_table; /* used by CheckSetEntryLabelRenderTable */
73 } XmColumnConstraintPart, * XmColumnConstraint;
74 
75 typedef struct _XmColumnConstraintRec {
76     XmManagerConstraintPart manager;
77     XmBulletinBoardConstraintPart bboard;
78     XmColumnConstraintPart  column;
79 } XmColumnConstraintRec, * XmColumnConstraintPtr;
80 
81 typedef struct _XmColumnPart {
82 
83     /* Public */
84 
85     unsigned char default_label_alignment;
86     unsigned char default_fill_style;
87     unsigned char orientation;
88     unsigned char distribution;
89 
90     Dimension	  item_spacing;
91     Dimension	  label_spacing;
92 
93     /* Private */
94 
95     Boolean	  resize_done;
96     Boolean	  check_set_render_table; /* used by CheckSetDefaultEntryLabelRenderTable */
97 
98 } XmColumnPart;
99 
100 typedef struct _XmColumnRec {
101     CorePart            core;
102     CompositePart       composite;
103     ConstraintPart      constraint;
104     XmManagerPart       manager;
105     XmBulletinBoardPart bulletin_board;
106     XmColumnPart        column;
107 } XmColumnRec;
108 
109 #define XmColumnIndex (XmBulletinBoardIndex + 1)
110 
111 #define XmColumnC_label_alignment(w) (((XmColumnConstraintPtr)((w)->core.constraints))->column.label_alignment)
112 #define XmColumnC_label_type(w) (((XmColumnConstraintPtr)((w)->core.constraints))->column.label_type)
113 #define XmColumnC_fill_style(w) (((XmColumnConstraintPtr)((w)->core.constraints))->column.fill_style)
114 #define XmColumnC_show_label(w) (((XmColumnConstraintPtr)((w)->core.constraints))->column.show_label)
115 #define XmColumnC_stretchable(w) (((XmColumnConstraintPtr)((w)->core.constraints))->column.stretchable)
116 #define XmColumnC_label_pixmap(w) (((XmColumnConstraintPtr)((w)->core.constraints))->column.label_pixmap)
117 #define XmColumnC_label_string(w) (((XmColumnConstraintPtr)((w)->core.constraints))->column.label_string)
118 #define XmColumnC_label_font_list(w) (((XmColumnConstraintPtr)((w)->core.constraints))->column.label_font_list)
119 #define XmColumnC_label_widget(w) (((XmColumnConstraintPtr)((w)->core.constraints))->column.label_widget)
120 #define XmColumnC_request_width(w) (((XmColumnConstraintPtr)((w)->core.constraints))->column.request_width)
121 #define XmColumnC_request_height(w) (((XmColumnConstraintPtr)((w)->core.constraints))->column.request_height)
122 #define XmColumnC_position(w) (((XmColumnConstraintPtr)((w)->core.constraints))->column.position)
123 
124 #define XmColumn_default_label_alignment(w) (((XmColumnWidget)(w))->column.default_label_alignment)
125 #define XmColumn_default_fill_style(w) (((XmColumnWidget)(w))->column.default_fill_style)
126 #define XmColumn_orientation(w) (((XmColumnWidget)(w))->column.orientation)
127 #define XmColumn_distribution(w) (((XmColumnWidget)(w))->column.distribution)
128 #define XmColumn_item_spacing(w) (((XmColumnWidget)(w))->column.item_spacing)
129 #define XmColumn_label_spacing(w) (((XmColumnWidget)(w))->column.label_spacing)
130 #define XmColumn_resize_done(w) (((XmColumnWidget)(w))->column.resize_done)
131 
132 #ifdef __cplusplus
133 }
134 #endif
135 
136 #endif /* __columnp_h__ */
137