~ubuntu-branches/ubuntu/dapper/fpc/dapper

« back to all changes in this revision

Viewing changes to packages/gtk/gtk/gtktable.pp

  • Committer: Bazaar Package Importer
  • Author(s): Carlos Laviola
  • Date: 2004-08-12 16:29:37 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040812162937-moo8ulvysp1ln771
Tags: 1.9.4-5
fp-compiler: needs ld, adding dependency on binutils.  (Closes: #265265)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
{
2
 
   $Id: gtktable.pp,v 1.1.2.1 2000/09/09 18:42:53 peter Exp $
3
 
}
4
 
 
5
 
{****************************************************************************
6
 
                                 Interface
7
 
****************************************************************************}
8
 
 
9
 
{$ifdef read_interface}
10
 
 
11
 
  type
12
 
     PGtkTable = ^TGtkTable;
13
 
     PGtkTableClass = ^TGtkTableClass;
14
 
     PGtkTableRowCol = ^TGtkTableRowCol;
15
 
     PGtkTableChild = ^TGtkTableChild;
16
 
     TGtkTable = record
17
 
          container : TGtkContainer;
18
 
          children : PGList;
19
 
          rows : PGtkTableRowCol;
20
 
          cols : PGtkTableRowCol;
21
 
          nrows : guint16;
22
 
          ncols : guint16;
23
 
          column_spacing : guint16;
24
 
          row_spacing : guint16;
25
 
          flag0 : {$ifdef win32}longint{$else}word{$endif};
26
 
       end;
27
 
 
28
 
     TGtkTableClass = record
29
 
          parent_class : TGtkContainerClass;
30
 
       end;
31
 
 
32
 
     TGtkTableChild = record
33
 
          widget : PGtkWidget;
34
 
          left_attach : guint16;
35
 
          right_attach : guint16;
36
 
          top_attach : guint16;
37
 
          bottom_attach : guint16;
38
 
          xpadding : guint16;
39
 
          ypadding : guint16;
40
 
          flag0 : {$ifdef win32}longint{$else}word{$endif};
41
 
       end;
42
 
 
43
 
     TGtkTableRowCol = record
44
 
          requisition : guint16;
45
 
          allocation : guint16;
46
 
          spacing : guint16;
47
 
          flag0 : {$ifdef win32}longint{$else}word{$endif};
48
 
       end;
49
 
 
50
 
  const
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);
55
 
 
56
 
  const
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);
81
 
 
82
 
  const
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);
103
 
 
104
 
 
105
 
Type
106
 
  GTK_TABLE=PGtkTable;
107
 
  GTK_TABLE_CLASS=PGtkTableClass;
108
 
 
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;
112
 
 
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';
123
 
 
124
 
{$endif read_interface}
125
 
 
126
 
 
127
 
{****************************************************************************
128
 
                              Implementation
129
 
****************************************************************************}
130
 
 
131
 
{$ifdef read_implementation}
132
 
 
133
 
function  homogeneous(var a : TGtkTable) : guint;
134
 
    begin
135
 
       homogeneous:=(a.flag0 and bm_TGtkTable_homogeneous) shr bp_TGtkTable_homogeneous;
136
 
    end;
137
 
 
138
 
procedure set_homogeneous(var a : TGtkTable; __homogeneous : guint);
139
 
    begin
140
 
       a.flag0:=a.flag0 or ((__homogeneous shl bp_TGtkTable_homogeneous) and bm_TGtkTable_homogeneous);
141
 
    end;
142
 
 
143
 
function  xexpand(var a : TGtkTableChild) : guint;
144
 
    begin
145
 
       xexpand:=(a.flag0 and bm_TGtkTableChild_xexpand) shr bp_TGtkTableChild_xexpand;
146
 
    end;
147
 
 
148
 
procedure set_xexpand(var a : TGtkTableChild; __xexpand : guint);
149
 
    begin
150
 
       a.flag0:=a.flag0 or ((__xexpand shl bp_TGtkTableChild_xexpand) and bm_TGtkTableChild_xexpand);
151
 
    end;
152
 
 
153
 
function  yexpand(var a : TGtkTableChild) : guint;
154
 
    begin
155
 
       yexpand:=(a.flag0 and bm_TGtkTableChild_yexpand) shr bp_TGtkTableChild_yexpand;
156
 
    end;
157
 
 
158
 
procedure set_yexpand(var a : TGtkTableChild; __yexpand : guint);
159
 
    begin
160
 
       a.flag0:=a.flag0 or ((__yexpand shl bp_TGtkTableChild_yexpand) and bm_TGtkTableChild_yexpand);
161
 
    end;
162
 
 
163
 
function  xshrink(var a : TGtkTableChild) : guint;
164
 
    begin
165
 
       xshrink:=(a.flag0 and bm_TGtkTableChild_xshrink) shr bp_TGtkTableChild_xshrink;
166
 
    end;
167
 
 
168
 
procedure set_xshrink(var a : TGtkTableChild; __xshrink : guint);
169
 
    begin
170
 
       a.flag0:=a.flag0 or ((__xshrink shl bp_TGtkTableChild_xshrink) and bm_TGtkTableChild_xshrink);
171
 
    end;
172
 
 
173
 
function  yshrink(var a : TGtkTableChild) : guint;
174
 
    begin
175
 
       yshrink:=(a.flag0 and bm_TGtkTableChild_yshrink) shr bp_TGtkTableChild_yshrink;
176
 
    end;
177
 
 
178
 
procedure set_yshrink(var a : TGtkTableChild; __yshrink : guint);
179
 
    begin
180
 
       a.flag0:=a.flag0 or ((__yshrink shl bp_TGtkTableChild_yshrink) and bm_TGtkTableChild_yshrink);
181
 
    end;
182
 
 
183
 
function  xfill(var a : TGtkTableChild) : guint;
184
 
    begin
185
 
       xfill:=(a.flag0 and bm_TGtkTableChild_xfill) shr bp_TGtkTableChild_xfill;
186
 
    end;
187
 
 
188
 
procedure set_xfill(var a : TGtkTableChild; __xfill : guint);
189
 
    begin
190
 
       a.flag0:=a.flag0 or ((__xfill shl bp_TGtkTableChild_xfill) and bm_TGtkTableChild_xfill);
191
 
    end;
192
 
 
193
 
function  yfill(var a : TGtkTableChild) : guint;
194
 
    begin
195
 
       yfill:=(a.flag0 and bm_TGtkTableChild_yfill) shr bp_TGtkTableChild_yfill;
196
 
    end;
197
 
 
198
 
procedure set_yfill(var a : TGtkTableChild; __yfill : guint);
199
 
    begin
200
 
       a.flag0:=a.flag0 or ((__yfill shl bp_TGtkTableChild_yfill) and bm_TGtkTableChild_yfill);
201
 
    end;
202
 
 
203
 
function  need_expand(var a : TGtkTableRowCol) : guint;
204
 
    begin
205
 
       need_expand:=(a.flag0 and bm_TGtkTableRowCol_need_expand) shr bp_TGtkTableRowCol_need_expand;
206
 
    end;
207
 
 
208
 
procedure set_need_expand(var a : TGtkTableRowCol; __need_expand : guint);
209
 
    begin
210
 
       a.flag0:=a.flag0 or ((__need_expand shl bp_TGtkTableRowCol_need_expand) and bm_TGtkTableRowCol_need_expand);
211
 
    end;
212
 
 
213
 
function  need_shrink(var a : TGtkTableRowCol) : guint;
214
 
    begin
215
 
       need_shrink:=(a.flag0 and bm_TGtkTableRowCol_need_shrink) shr bp_TGtkTableRowCol_need_shrink;
216
 
    end;
217
 
 
218
 
procedure set_need_shrink(var a : TGtkTableRowCol; __need_shrink : guint);
219
 
    begin
220
 
       a.flag0:=a.flag0 or ((__need_shrink shl bp_TGtkTableRowCol_need_shrink) and bm_TGtkTableRowCol_need_shrink);
221
 
    end;
222
 
 
223
 
function  expand(var a : TGtkTableRowCol) : guint;
224
 
    begin
225
 
       expand:=(a.flag0 and bm_TGtkTableRowCol_expand) shr bp_TGtkTableRowCol_expand;
226
 
    end;
227
 
 
228
 
procedure set_expand(var a : TGtkTableRowCol; __expand : guint);
229
 
    begin
230
 
       a.flag0:=a.flag0 or ((__expand shl bp_TGtkTableRowCol_expand) and bm_TGtkTableRowCol_expand);
231
 
    end;
232
 
 
233
 
function  shrink(var a : TGtkTableRowCol) : guint;
234
 
    begin
235
 
       shrink:=(a.flag0 and bm_TGtkTableRowCol_shrink) shr bp_TGtkTableRowCol_shrink;
236
 
    end;
237
 
 
238
 
procedure set_shrink(var a : TGtkTableRowCol; __shrink : guint);
239
 
    begin
240
 
       a.flag0:=a.flag0 or ((__shrink shl bp_TGtkTableRowCol_shrink) and bm_TGtkTableRowCol_shrink);
241
 
    end;
242
 
 
243
 
function  empty(var a : TGtkTableRowCol) : guint;
244
 
    begin
245
 
       empty:=(a.flag0 and bm_TGtkTableRowCol_empty) shr bp_TGtkTableRowCol_empty;
246
 
    end;
247
 
 
248
 
procedure set_empty(var a : TGtkTableRowCol; __empty : guint);
249
 
    begin
250
 
       a.flag0:=a.flag0 or ((__empty shl bp_TGtkTableRowCol_empty) and bm_TGtkTableRowCol_empty);
251
 
    end;
252
 
 
253
 
function  GTK_IS_TABLE(obj:pointer):boolean;
254
 
begin
255
 
  GTK_IS_TABLE:=(obj<>nil) and GTK_IS_TABLE_CLASS(PGtkTypeObject(obj)^.klass);
256
 
end;
257
 
 
258
 
function  GTK_IS_TABLE_CLASS(klass:pointer):boolean;
259
 
begin
260
 
  GTK_IS_TABLE_CLASS:=(klass<>nil) and (PGtkTypeClass(klass)^.thetype=GTK_TABLE_TYPE);
261
 
end;
262
 
 
263
 
{$endif read_implementation}
264
 
 
265
 
 
266
 
{
267
 
  $Log: gtktable.pp,v $
268
 
  Revision 1.1.2.1  2000/09/09 18:42:53  peter
269
 
    * gtk win32 fixes
270
 
 
271
 
  Revision 1.1  2000/07/13 06:34:06  michael
272
 
  + Initial import
273
 
 
274
 
  Revision 1.1  1999/11/24 23:36:36  peter
275
 
    * moved to packages dir
276
 
 
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
280
 
 
281
 
  Revision 1.8  1999/07/23 16:13:12  peter
282
 
    * use packrecords C
283
 
 
284
 
  Revision 1.7  1999/05/11 00:39:30  peter
285
 
    * win32 fixes
286
 
 
287
 
  Revision 1.6  1999/05/10 15:20:28  peter
288
 
    * cdecl fixes
289
 
 
290
 
  Revision 1.5  1999/05/10 09:04:02  peter
291
 
    * gtk 1.2 port working
292
 
 
293
 
  Revision 1.4  1998/11/09 10:10:34  peter
294
 
    + C type casts are now correctly handled
295
 
 
296
 
  Revision 1.3  1998/10/21 20:23:16  peter
297
 
    * cdecl, packrecord fixes (from the gtk.tar.gz)
298
 
    * win32 support
299
 
    * gtk.pp,gdk.pp for an all in one unit
300
 
 
301
 
}
302