1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 #ifndef GRID_H
30 #define GRID_H
31
32 #include <X11/Intrinsic.h>
33 #include <X11/IntrinsicP.h>
34 #include <Xm/XmAll.h>
35 #include <Xm/Primitive.h>
36 #include <Xm/PrimitiveP.h>
37 #include <Xm/ManagerP.h>
38
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42
43
44 #define gridColumnSpacing
"gridColumnSpacing"
45 #define gridRowSpacing
"gridRowSpacing"
46 #define gridPaddingLeft
"gridPaddingLeft"
47 #define gridPaddingRight
"gridPaddingRight"
48 #define gridPaddingTop
"gridPaddingTop"
49 #define gridPaddingBottom
"gridPaddingBottom"
50
51
52 #define gridColumn
"gridColumn"
53 #define gridRow
"gridRow"
54 #define gridColspan
"gridColspan"
55 #define gridRowspan
"gridRowspan"
56 #define gridHExpand
"gridHExpand"
57 #define gridVExpand
"gridVExpand"
58 #define gridHFill
"gridHFill"
59 #define gridVFill
"gridVFill"
60 #define gridMarginLeft
"gridMarginLeft"
61 #define gridMarginRight
"gridMarginRight"
62 #define gridMarginTop
"gridMarginTop"
63 #define gridMarginBottom
"gridMarginBottom"
64 #define gridMinWidth
"gridMinWidth"
65
66
67 typedef struct GridDef {
68 Dimension size;
69 Dimension pos;
70 Boolean expand;
71 } GridDef;
72
73 typedef struct GridClassPart {
74 int test;
75 } GridClassPart;
76
77 typedef struct GridClassRec {
78 CoreClassPart core_class;
79 CompositeClassPart composite_class;
80 ConstraintClassPart constraint_class;
81 XmManagerClassPart manager_class;
82 GridClassPart gridwidgetclass;
83 } GridClassRec;
84
85
86 typedef struct GridPart {
87 int padding_left;
88 int padding_right;
89 int padding_top;
90 int padding_bottom;
91 int max_col;
92 int max_row;
93 Dimension columnspacing;
94 Dimension rowspacing;
95
96 Boolean sizerequest;
97 } GridPart;
98
99 typedef struct GridRec {
100 CorePart core;
101 CompositePart composite;
102 ConstraintPart constraint;
103 XmManagerPart manager;
104 GridPart grid;
105 } GridRec;
106
107 typedef struct GridContraintPart {
108 Dimension x;
109 Dimension y;
110 Dimension margin_left;
111 Dimension margin_right;
112 Dimension margin_top;
113 Dimension margin_bottom;
114 Boolean hexpand;
115 Boolean vexpand;
116 Boolean hfill;
117 Boolean vfill;
118 Dimension colspan;
119 Dimension rowspan;
120 Dimension pref_width;
121 Dimension pref_height;
122 Dimension min_width;
123 } GridContraintPart;
124
125 typedef struct GridConstraintRec {
126 XmManagerConstraintPart manager;
127 GridContraintPart grid;
128 } GridConstraintRec;
129
130 typedef GridRec* Grid;
131
132 extern WidgetClass gridClass;
133
134 void grid_class_initialize(
void);
135 void grid_initialize(Widget request, Widget new, ArgList args, Cardinal num_args);
136 void grid_realize(Widget w,XtValueMask *valueMask,XSetWindowAttributes *attributes);
137 void grid_destroy(Grid widget);
138 void grid_resize(Grid widget);
139 void grid_expose(Grid widget, XEvent *event, Region region);
140 Boolean grid_set_values(Widget old, Widget request, Widget neww, ArgList args, Cardinal *num_args);
141 Boolean grid_acceptfocus(Widget , Time*);
142
143 void grid_place_children(Grid w);
144
145 void grid_getfocus(Widget myw, XEvent *event, String *params, Cardinal *nparam);
146 void grid_loosefocus(Widget myw, XEvent *event, String *params, Cardinal *nparam);
147
148 void grid_constraint_init(
149 Widget request,
150 Widget neww,
151 ArgList args,
152 Cardinal* num_args
153 );
154
155 XtGeometryResult GridGeometryManager(Widget widget, XtWidgetGeometry *request, XtWidgetGeometry *reply);
156 void GridChangeManaged(Widget widget);
157 Boolean ConstraintSetValues(Widget old, Widget request, Widget neww, ArgList args, Cardinal *num_args);
158
159
160 #ifdef __cplusplus
161 }
162 #endif
163
164 #endif
165
166