]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtksizegroup.sgml
2.9.0
[~andy/gtk] / docs / reference / gtk / tmpl / gtksizegroup.sgml
1 <!-- ##### SECTION Title ##### -->
2 GtkSizeGroup
3
4 <!-- ##### SECTION Short_Description ##### -->
5 Grouping widgets so they request the same size
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 #GtkSizeGroup provides a mechanism for grouping a number of widgets
10 together so they all request the same amount of space.  This is
11 typically useful when you want a column of widgets to have the same
12 size, but you can't use a #GtkTable widget.
13 </para>
14 <para>
15 In detail, the size requested for each widget in a #GtkSizeGroup is
16 the maximum of the sizes that would have been requested for each
17 widget in the size group if they were not in the size group. The mode
18 of the size group (see gtk_size_group_set_mode()) determines whether
19 this applies to the horizontal size, the vertical size, or both sizes.
20 </para>
21 <para>
22 Note that size groups only affect the amount of space requested, not
23 the size that the widgets finally receive. If you want the widgets in
24 a #GtkSizeGroup to actually be the same size, you need to pack them in
25 such a way that they get the size they request and not more. For
26 example, if you are packing your widgets into a table, you would not
27 include the %GTK_FILL flag.
28 </para>
29 <para>
30 #GtkSizeGroup objects are referenced by each widget in the size group,
31 so once you have added all widgets to a #GtkSizeGroup, you can drop
32 the initial reference to the size group with g_object_unref(). If the
33 widgets in the size group are subsequently destroyed, then they will
34 be removed from the size group and drop their references on the size
35 group; when all widgets have been removed, the size group will be
36 freed.
37 </para>
38 <para>
39 Widgets can be part of multiple size groups; GTK+ will compute the
40 horizontal size of a widget from the horizontal requisition of all
41 widgets that can be reached from the widget by a chain of size groups
42 of type %GTK_SIZE_GROUP_HORIZONTAL or %GTK_SIZE_GROUP_BOTH, and the
43 vertical size from the vertical requisition of all widgets that can be
44 reached from the widget by a chain of size groups of type
45 %GTK_SIZE_GROUP_VERTICAL or %GTK_SIZE_GROUP_BOTH.
46 </para>
47
48 <!-- ##### SECTION See_Also ##### -->
49 <para>
50
51 </para>
52
53 <!-- ##### SECTION Stability_Level ##### -->
54
55
56 <!-- ##### STRUCT GtkSizeGroup ##### -->
57 <para>
58
59 </para>
60
61
62 <!-- ##### ARG GtkSizeGroup:ignore-hidden ##### -->
63 <para>
64
65 </para>
66
67 <!-- ##### ARG GtkSizeGroup:mode ##### -->
68 <para>
69
70 </para>
71
72 <!-- ##### ENUM GtkSizeGroupMode ##### -->
73 <para>
74
75 </para>
76
77 @GTK_SIZE_GROUP_NONE: 
78 @GTK_SIZE_GROUP_HORIZONTAL: 
79 @GTK_SIZE_GROUP_VERTICAL: 
80 @GTK_SIZE_GROUP_BOTH: 
81
82 <!-- ##### FUNCTION gtk_size_group_new ##### -->
83 <para>
84
85 </para>
86
87 @mode: 
88 @Returns: 
89
90
91 <!-- ##### FUNCTION gtk_size_group_set_mode ##### -->
92 <para>
93
94 </para>
95
96 @size_group: 
97 @mode: 
98
99
100 <!-- ##### FUNCTION gtk_size_group_get_mode ##### -->
101 <para>
102
103 </para>
104
105 @size_group: 
106 @Returns: 
107
108
109 <!-- ##### FUNCTION gtk_size_group_set_ignore_hidden ##### -->
110 <para>
111
112 </para>
113
114 @size_group: 
115 @ignore_hidden: 
116
117
118 <!-- ##### FUNCTION gtk_size_group_get_ignore_hidden ##### -->
119 <para>
120
121 </para>
122
123 @size_group: 
124 @Returns: 
125
126
127 <!-- ##### FUNCTION gtk_size_group_add_widget ##### -->
128 <para>
129
130 </para>
131
132 @size_group: 
133 @widget: 
134
135
136 <!-- ##### FUNCTION gtk_size_group_remove_widget ##### -->
137 <para>
138
139 </para>
140
141 @size_group: 
142 @widget: 
143
144
145 <!-- ##### FUNCTION gtk_size_group_get_widgets ##### -->
146 <para>
147
148 </para>
149
150 @size_group: 
151 @Returns: 
152
153