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
  
30
  
31
  
32
  
33
  
34
  
35
  
36
  
37
  
38
  
39
  
40
  
41
  
42
  
43
  
44
  
45
  
46
  
47
  
48
  
49
  
50
  
51
  
52
  
53
  
54
  
55
  
56
  
57
  
58
  
59
  
60
  
61
  
62
  
63
  
64
  
65
  
66
  
67
  
68
  
69
  
70
  
71
  
72
  
73
  
74
  
75
  
76
  
77
  
78
  
79
  
80
  
81
  
82
  
83
  
84
  
85
  
86
  
87
  
88
  
89
  
90
  
91
  
92
  
93
  
94
  
95
  
96
  
97
  
98
  
99
  
100
  
101
  
102
  
103
  
104
  
105
  
106
  
107
  
108
  
109
  
110
  
111
  
112
  
113
  
114
  
115
  
116
  
117
  
118
  
119
  
120
  
121
  
122
  
123
  
124
  
125
  
126
  
127
  
128
  
129
  
130
  
131
  
132
  
133
  
134
  
135
  
136
  
137
  
138
  
/* -*- C -*- */ 
class GTK2.Table; 
inherit GTK2.Container; 
 
//! The GTK2.Table allows the programmer to arrange widgets in rows and 
//! columns, making it easy to align many widgets next to each other, 
//! horizontally and vertically. 
//! <p> 
//! IMG: GTK2.Table(2,2,0)->attach_defaults( GTK2.Label("0,0"), 0, 1, 0, 1)->attach_defaults( GTK2.Label("0,1"), 0, 1, 1, 2)->attach_defaults( GTK2.Label("1,0"), 1, 2, 0, 1)->attach_defaults( GTK2.Label("1,1"), 1, 2, 1, 2)->set_col_spacings(10)->set_row_spacings(10) 
//! IMG: GTK2.Table(2,2,0)->attach_defaults( GTK2.Label("0,0-1,0"), 0, 2, 0, 1)->attach_defaults( GTK2.Label("0,1"), 0, 1, 1, 2)->attach_defaults( GTK2.Label("1,1"), 1, 2, 1, 2)->set_col_spacings(10)->set_row_spacings(10) 
//! </p> 
 
//! Properties: 
//! int column-spacing 
//! int homogeneous 
//! int n-columns 
//! int n-rows 
//! int row-spacing 
//! <p> 
//! Child properties: 
//! int bottom-attach 
//! int left-attach 
//! int right-attach 
//! int top-attach 
//! int x-options 
//! int x-padding 
//! int y-options 
//! int y-padding 
 
void create(int|mapping(string:mixed) width_or_props, 
            ?int height, ?int homogeneousp) 
//! Used to create a new table widget. An initial size must be given by 
//! specifying how many rows and columns the table should have, 
//! although this can be changed later with resize(). 
//! <p> 
//! There can never be more than 65535 colums nor more than 65535 rows. 
//! </p><p> 
//! setting homogeneousp to 1 forces the all tablecells to be exactly 
//! the same size.</p> 
{ 
  pgtk2_verify_not_inited(); 
  pgtk2_verify_setup(); 
  { 
    if (TYPEOF(Pike_sp[-args]) == PIKE_T_INT) { 
      INT_TYPE w,h,hom; 
      GtkWidget *gt; 
      get_all_args(NULL,args,"%i%i%i",&w,&h,&hom); 
      gt=gtk_table_new(w,h,hom); 
      THIS->obj=G_OBJECT(gt); 
    } else { 
      INIT_WITH_PROPS(GTK_TYPE_TABLE); 
    } 
    pgtk2_pop_n_elems(args); 
  } 
  pgtk2__init_this_object(); 
} 
 
void resize(int rows, int columns); 
//! If you need to change a table's size after it has been created, 
//! this function allows you to do so. 
 
void attach(GTK2.Widget subwidget, int left, int right, 
            int top, int bottom, int xoptions, int yoptions, 
            int xpad, int ypad); 
//! The left and right attach arguments specify where to place the 
//! widget, and how many boxes to use. If you want a button in the 
//! lower right table entry of our 2x2 table, and want it to fill that 
//! entry ONLY. left_attach would be = 1, right_attach = 2, top_attach 
//! = 1, bottom_attach = 2. 
//! <p> 
//! Now, if you wanted a widget to take up the whole top row of our 2x2 
//! table, you'd use left_attach = 0, right_attach = 2, top_attach = 0, 
//! bottom_attach = 1. 
//! </p> 
//! <p>The xoptions and yoptions are used to specify packing options and 
//! may be OR'ed together to allow multiple options.</p> 
//! <p> 
//! These options are: 
//! <ul> 
//! <li> GTK2.Fill - If the table box is larger than the widget, and 
//! GTK_FILL is specified, the widget will expand to use all the room 
//! available.</li> 
//! <li> GTK2.Shrink - If the table widget was allocated less space then 
//! was requested (usually by the user resizing the window), then the 
//! widgets would normally just be pushed off the bottom of the window 
//! and disappear. If GTK_SHRINK is specified, the widgets will shrink 
//! with the table.</li> 
//! <li> GTK2.Expand - This will cause the table cell to expand to use 
//! up any remaining space in the window.</li> 
//!  </ul> 
//! </p><p> 
//! Padding is just like in boxes, creating a clear area around the 
//! widget specified in pixels</p> 
 
void attach_defaults(GTK2.Widget subwidget, int left, int right, 
                     int top, int bottom); 
//! As there are many options associated with attach(), this 
//! convenience function provides the programmer with a means to add 
//! children to a table with identical padding and expansion options. 
//! <p> 
//! xoptions, yoptions, xpadding and ypadding are all set the their 
//! default values. For the options that is GTK2.Fill|GTK2.Expand. For 
//! the padding it is 0.</p> 
 
void set_col_spacing(int x, int spacing); 
//! alters the amount of space between a given table column and the 
//! adjacent columns. 
 
void set_row_spacing(int y, int spacing); 
//! alters the amount of space between a given table row and the 
//! adjacent rows. 
 
void set_col_spacings(int spacing); 
//! Sets the space between every column in the table equal to spacing. 
 
void set_row_spacings(int spacing); 
//! Sets the space between every row in the table equal to spacing. 
 
void set_homogeneous(int homogeneousp); 
//! Set the homogeneous flag. 
 
int get_default_row_spacing(); 
//! Gets the default row spacing for the table. 
 
int get_homogeneous(); 
//! Returns whether the table cells are all constrained to the same 
//! width and height. 
 
int get_row_spacing(int row); 
//! Gets the amount of space between row and row+1. 
 
int get_col_spacing(int col); 
//! Gets the amound of space between col and col+1. 
 
int get_default_col_spacing(); 
//! Gets the default column spacing for the table.