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 #define gridColumn
"gridColumn"
44 #define gridRow
"gridRow"
45 #define gridColspan
"gridColspan"
46 #define gridRowspan
"gridRowspan"
47 #define gridHExpand
"gridHExpand"
48 #define gridVExpand
"gridVExpand"
49 #define gridHFill
"gridHFill"
50 #define gridVFill
"gridVFill"
51 #define gridMarginLeft
"gridMarginLeft"
52 #define gridMarginRight
"gridMarginRight"
53 #define gridMarginTop
"gridMarginTop"
54 #define gridMarginBottom
"gridMarginBottom"
55
56
57 typedef struct GridDef {
58 Dimension size;
59 Dimension pos;
60 Boolean expand;
61 } GridDef;
62
63 typedef struct GridClassPart {
64 int test;
65 } GridClassPart;
66
67 typedef struct GridClassRec {
68 CoreClassPart core_class;
69 CompositeClassPart composite_class;
70 ConstraintClassPart constraint_class;
71 XmManagerClassPart manager_class;
72 GridClassPart mywidgetclass;
73 } GridClassRec;
74
75
76 typedef struct GridPart {
77 int margin_left;
78 int margin_right;
79 int margin_top;
80 int margin_bottom;
81 int max_col;
82 int max_row;
83
84 Boolean sizerequest;
85 } GridPart;
86
87 typedef struct GridRec {
88 CorePart core;
89 CompositePart composite;
90 ConstraintPart constraint;
91 XmManagerPart manager;
92 GridPart mywidget;
93 } GridRec;
94
95 typedef struct GridContraintPart {
96 Dimension x;
97 Dimension y;
98 Dimension margin_left;
99 Dimension margin_right;
100 Dimension margin_top;
101 Dimension margin_bottom;
102 Boolean hexpand;
103 Boolean vexpand;
104 Boolean hfill;
105 Boolean vfill;
106 Dimension colspan;
107 Dimension rowspan;
108 Dimension pref_width;
109 Dimension pref_height;
110 } GridContraintPart;
111
112 typedef struct GridConstraintRec {
113 XmManagerConstraintPart manager;
114 GridContraintPart grid;
115 } GridConstraintRec;
116
117 typedef GridRec* MyWidget;
118
119 extern WidgetClass gridClass;
120
121 void grid_class_initialize();
122 void grid_initialize();
123 void grid_realize();
124 void grid_destroy();
125 void grid_resize();
126 void grid_expose();
127 Boolean grid_set_values();
128 Boolean grid_acceptfocus(Widget , Time*);
129
130 void grid_place_children(MyWidget w);
131
132 void grid_getfocus();
133 void grid_loosefocus();
134
135 void grid_constraint_init(
136 Widget request,
137 Widget neww,
138 ArgList args,
139 Cardinal* num_args
140 );
141
142 XtGeometryResult GridGeometryManager(Widget widget, XtWidgetGeometry *request, XtWidgetGeometry *reply);
143 void GridChangeManaged(Widget widget);
144 Boolean ConstraintSetValues(Widget old, Widget request, Widget neww, ArgList args, Cardinal *num_args);
145
146
147 #ifdef __cplusplus
148 }
149 #endif
150
151 #endif
152
153