2
$Id: gtktable.pp,v 1.1.2.1 2000/09/09 18:42:53 peter Exp $
5
{****************************************************************************
7
****************************************************************************}
9
{$ifdef read_interface}
12
PGtkTable = ^TGtkTable;
13
PGtkTableClass = ^TGtkTableClass;
14
PGtkTableRowCol = ^TGtkTableRowCol;
15
PGtkTableChild = ^TGtkTableChild;
17
container : TGtkContainer;
19
rows : PGtkTableRowCol;
20
cols : PGtkTableRowCol;
23
column_spacing : guint16;
24
row_spacing : guint16;
25
flag0 : {$ifdef win32}longint{$else}word{$endif};
28
TGtkTableClass = record
29
parent_class : TGtkContainerClass;
32
TGtkTableChild = record
34
left_attach : guint16;
35
right_attach : guint16;
37
bottom_attach : guint16;
40
flag0 : {$ifdef win32}longint{$else}word{$endif};
43
TGtkTableRowCol = record
44
requisition : guint16;
47
flag0 : {$ifdef win32}longint{$else}word{$endif};
51
bm_TGtkTable_homogeneous = $1;
52
bp_TGtkTable_homogeneous = 0;
53
function homogeneous(var a : TGtkTable) : guint;
54
procedure set_homogeneous(var a : TGtkTable; __homogeneous : guint);
57
bm_TGtkTableChild_xexpand = $1;
58
bp_TGtkTableChild_xexpand = 0;
59
bm_TGtkTableChild_yexpand = $2;
60
bp_TGtkTableChild_yexpand = 1;
61
bm_TGtkTableChild_xshrink = $4;
62
bp_TGtkTableChild_xshrink = 2;
63
bm_TGtkTableChild_yshrink = $8;
64
bp_TGtkTableChild_yshrink = 3;
65
bm_TGtkTableChild_xfill = $10;
66
bp_TGtkTableChild_xfill = 4;
67
bm_TGtkTableChild_yfill = $20;
68
bp_TGtkTableChild_yfill = 5;
69
function xexpand(var a : TGtkTableChild) : guint;
70
procedure set_xexpand(var a : TGtkTableChild; __xexpand : guint);
71
function yexpand(var a : TGtkTableChild) : guint;
72
procedure set_yexpand(var a : TGtkTableChild; __yexpand : guint);
73
function xshrink(var a : TGtkTableChild) : guint;
74
procedure set_xshrink(var a : TGtkTableChild; __xshrink : guint);
75
function yshrink(var a : TGtkTableChild) : guint;
76
procedure set_yshrink(var a : TGtkTableChild; __yshrink : guint);
77
function xfill(var a : TGtkTableChild) : guint;
78
procedure set_xfill(var a : TGtkTableChild; __xfill : guint);
79
function yfill(var a : TGtkTableChild) : guint;
80
procedure set_yfill(var a : TGtkTableChild; __yfill : guint);
83
bm_TGtkTableRowCol_need_expand = $1;
84
bp_TGtkTableRowCol_need_expand = 0;
85
bm_TGtkTableRowCol_need_shrink = $2;
86
bp_TGtkTableRowCol_need_shrink = 1;
87
bm_TGtkTableRowCol_expand = $4;
88
bp_TGtkTableRowCol_expand = 2;
89
bm_TGtkTableRowCol_shrink = $8;
90
bp_TGtkTableRowCol_shrink = 3;
91
bm_TGtkTableRowCol_empty = $10;
92
bp_TGtkTableRowCol_empty = 4;
93
function need_expand(var a : TGtkTableRowCol) : guint;
94
procedure set_need_expand(var a : TGtkTableRowCol; __need_expand : guint);
95
function need_shrink(var a : TGtkTableRowCol) : guint;
96
procedure set_need_shrink(var a : TGtkTableRowCol; __need_shrink : guint);
97
function expand(var a : TGtkTableRowCol) : guint;
98
procedure set_expand(var a : TGtkTableRowCol; __expand : guint);
99
function shrink(var a : TGtkTableRowCol) : guint;
100
procedure set_shrink(var a : TGtkTableRowCol; __shrink : guint);
101
function empty(var a : TGtkTableRowCol) : guint;
102
procedure set_empty(var a : TGtkTableRowCol; __empty : guint);
107
GTK_TABLE_CLASS=PGtkTableClass;
109
function GTK_TABLE_TYPE:TGtkType;cdecl;external gtkdll name 'gtk_table_get_type';
110
function GTK_IS_TABLE(obj:pointer):boolean;
111
function GTK_IS_TABLE_CLASS(klass:pointer):boolean;
113
function gtk_table_get_type:TGtkType;cdecl;external gtkdll name 'gtk_table_get_type';
114
function gtk_table_new(rows:guint; columns:guint; homogeneous:gboolean):PGtkWidget;cdecl;external gtkdll name 'gtk_table_new';
115
procedure gtk_table_resize(table:PGtkTable; rows:guint; columns:guint);cdecl;external gtkdll name 'gtk_table_resize';
116
procedure gtk_table_attach(table:PGtkTable; child:PGtkWidget; left_attach:guint; right_attach:guint; top_attach:guint; bottom_attach:guint; xoptions:TGtkAttachOptions; yoptions:TGtkAttachOptions; xpadding:guint; ypadding:guint);cdecl;external gtkdll name 'gtk_table_attach';
117
procedure gtk_table_attach_defaults(table:PGtkTable; widget:PGtkWidget; left_attach:guint; right_attach:guint; top_attach:guint; bottom_attach:guint);cdecl;external gtkdll name 'gtk_table_attach_defaults';
118
procedure gtk_table_set_row_spacing(table:PGtkTable; row:guint; spacing:guint);cdecl;external gtkdll name 'gtk_table_set_row_spacing';
119
procedure gtk_table_set_col_spacing(table:PGtkTable; column:guint; spacing:guint);cdecl;external gtkdll name 'gtk_table_set_col_spacing';
120
procedure gtk_table_set_row_spacings(table:PGtkTable; spacing:guint);cdecl;external gtkdll name 'gtk_table_set_row_spacings';
121
procedure gtk_table_set_col_spacings(table:PGtkTable; spacing:guint);cdecl;external gtkdll name 'gtk_table_set_col_spacings';
122
procedure gtk_table_set_homogeneous(table:PGtkTable; homogeneous:gboolean);cdecl;external gtkdll name 'gtk_table_set_homogeneous';
124
{$endif read_interface}
127
{****************************************************************************
129
****************************************************************************}
131
{$ifdef read_implementation}
133
function homogeneous(var a : TGtkTable) : guint;
135
homogeneous:=(a.flag0 and bm_TGtkTable_homogeneous) shr bp_TGtkTable_homogeneous;
138
procedure set_homogeneous(var a : TGtkTable; __homogeneous : guint);
140
a.flag0:=a.flag0 or ((__homogeneous shl bp_TGtkTable_homogeneous) and bm_TGtkTable_homogeneous);
143
function xexpand(var a : TGtkTableChild) : guint;
145
xexpand:=(a.flag0 and bm_TGtkTableChild_xexpand) shr bp_TGtkTableChild_xexpand;
148
procedure set_xexpand(var a : TGtkTableChild; __xexpand : guint);
150
a.flag0:=a.flag0 or ((__xexpand shl bp_TGtkTableChild_xexpand) and bm_TGtkTableChild_xexpand);
153
function yexpand(var a : TGtkTableChild) : guint;
155
yexpand:=(a.flag0 and bm_TGtkTableChild_yexpand) shr bp_TGtkTableChild_yexpand;
158
procedure set_yexpand(var a : TGtkTableChild; __yexpand : guint);
160
a.flag0:=a.flag0 or ((__yexpand shl bp_TGtkTableChild_yexpand) and bm_TGtkTableChild_yexpand);
163
function xshrink(var a : TGtkTableChild) : guint;
165
xshrink:=(a.flag0 and bm_TGtkTableChild_xshrink) shr bp_TGtkTableChild_xshrink;
168
procedure set_xshrink(var a : TGtkTableChild; __xshrink : guint);
170
a.flag0:=a.flag0 or ((__xshrink shl bp_TGtkTableChild_xshrink) and bm_TGtkTableChild_xshrink);
173
function yshrink(var a : TGtkTableChild) : guint;
175
yshrink:=(a.flag0 and bm_TGtkTableChild_yshrink) shr bp_TGtkTableChild_yshrink;
178
procedure set_yshrink(var a : TGtkTableChild; __yshrink : guint);
180
a.flag0:=a.flag0 or ((__yshrink shl bp_TGtkTableChild_yshrink) and bm_TGtkTableChild_yshrink);
183
function xfill(var a : TGtkTableChild) : guint;
185
xfill:=(a.flag0 and bm_TGtkTableChild_xfill) shr bp_TGtkTableChild_xfill;
188
procedure set_xfill(var a : TGtkTableChild; __xfill : guint);
190
a.flag0:=a.flag0 or ((__xfill shl bp_TGtkTableChild_xfill) and bm_TGtkTableChild_xfill);
193
function yfill(var a : TGtkTableChild) : guint;
195
yfill:=(a.flag0 and bm_TGtkTableChild_yfill) shr bp_TGtkTableChild_yfill;
198
procedure set_yfill(var a : TGtkTableChild; __yfill : guint);
200
a.flag0:=a.flag0 or ((__yfill shl bp_TGtkTableChild_yfill) and bm_TGtkTableChild_yfill);
203
function need_expand(var a : TGtkTableRowCol) : guint;
205
need_expand:=(a.flag0 and bm_TGtkTableRowCol_need_expand) shr bp_TGtkTableRowCol_need_expand;
208
procedure set_need_expand(var a : TGtkTableRowCol; __need_expand : guint);
210
a.flag0:=a.flag0 or ((__need_expand shl bp_TGtkTableRowCol_need_expand) and bm_TGtkTableRowCol_need_expand);
213
function need_shrink(var a : TGtkTableRowCol) : guint;
215
need_shrink:=(a.flag0 and bm_TGtkTableRowCol_need_shrink) shr bp_TGtkTableRowCol_need_shrink;
218
procedure set_need_shrink(var a : TGtkTableRowCol; __need_shrink : guint);
220
a.flag0:=a.flag0 or ((__need_shrink shl bp_TGtkTableRowCol_need_shrink) and bm_TGtkTableRowCol_need_shrink);
223
function expand(var a : TGtkTableRowCol) : guint;
225
expand:=(a.flag0 and bm_TGtkTableRowCol_expand) shr bp_TGtkTableRowCol_expand;
228
procedure set_expand(var a : TGtkTableRowCol; __expand : guint);
230
a.flag0:=a.flag0 or ((__expand shl bp_TGtkTableRowCol_expand) and bm_TGtkTableRowCol_expand);
233
function shrink(var a : TGtkTableRowCol) : guint;
235
shrink:=(a.flag0 and bm_TGtkTableRowCol_shrink) shr bp_TGtkTableRowCol_shrink;
238
procedure set_shrink(var a : TGtkTableRowCol; __shrink : guint);
240
a.flag0:=a.flag0 or ((__shrink shl bp_TGtkTableRowCol_shrink) and bm_TGtkTableRowCol_shrink);
243
function empty(var a : TGtkTableRowCol) : guint;
245
empty:=(a.flag0 and bm_TGtkTableRowCol_empty) shr bp_TGtkTableRowCol_empty;
248
procedure set_empty(var a : TGtkTableRowCol; __empty : guint);
250
a.flag0:=a.flag0 or ((__empty shl bp_TGtkTableRowCol_empty) and bm_TGtkTableRowCol_empty);
253
function GTK_IS_TABLE(obj:pointer):boolean;
255
GTK_IS_TABLE:=(obj<>nil) and GTK_IS_TABLE_CLASS(PGtkTypeObject(obj)^.klass);
258
function GTK_IS_TABLE_CLASS(klass:pointer):boolean;
260
GTK_IS_TABLE_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_TABLE_TYPE);
263
{$endif read_implementation}
267
$Log: gtktable.pp,v $
268
Revision 1.1.2.1 2000/09/09 18:42:53 peter
271
Revision 1.1 2000/07/13 06:34:06 michael
274
Revision 1.1 1999/11/24 23:36:36 peter
275
* moved to packages dir
277
Revision 1.9 1999/10/06 17:42:50 peter
278
* external is now only in the interface
279
* removed gtk 1.0 support
281
Revision 1.8 1999/07/23 16:13:12 peter
284
Revision 1.7 1999/05/11 00:39:30 peter
287
Revision 1.6 1999/05/10 15:20:28 peter
290
Revision 1.5 1999/05/10 09:04:02 peter
291
* gtk 1.2 port working
293
Revision 1.4 1998/11/09 10:10:34 peter
294
+ C type casts are now correctly handled
296
Revision 1.3 1998/10/21 20:23:16 peter
297
* cdecl, packrecord fixes (from the gtk.tar.gz)
299
* gtk.pp,gdk.pp for an all in one unit