]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtksizegroup.sgml
=== Released 2.3.1 ===
[~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 <!-- ##### STRUCT GtkSizeGroup ##### -->
54 <para>
55
56 </para>
57
58
59 <!-- ##### ARG GtkSizeGroup:mode ##### -->
60 <para>
61
62 </para>
63
64 <!-- ##### ENUM GtkSizeGroupMode ##### -->
65 <para>
66
67 </para>
68
69 @GTK_SIZE_GROUP_NONE: 
70 @GTK_SIZE_GROUP_HORIZONTAL: 
71 @GTK_SIZE_GROUP_VERTICAL: 
72 @GTK_SIZE_GROUP_BOTH: 
73
74 <!-- ##### FUNCTION gtk_size_group_new ##### -->
75 <para>
76
77 </para>
78
79 @mode: 
80 @Returns: 
81
82
83 <!-- ##### FUNCTION gtk_size_group_set_mode ##### -->
84 <para>
85
86 </para>
87
88 @size_group: 
89 @mode: 
90 <!-- # Unused Parameters # -->
91 @type: 
92
93
94 <!-- ##### FUNCTION gtk_size_group_get_mode ##### -->
95 <para>
96
97 </para>
98
99 @size_group: 
100 @Returns: 
101
102
103 <!-- ##### FUNCTION gtk_size_group_add_widget ##### -->
104 <para>
105
106 </para>
107
108 @size_group: 
109 @widget: 
110
111
112 <!-- ##### FUNCTION gtk_size_group_remove_widget ##### -->
113 <para>
114
115 </para>
116
117 @size_group: 
118 @widget: 
119
120