]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkpaned.sgml
=== Released 2.3.3 ===
[~andy/gtk] / docs / reference / gtk / tmpl / gtkpaned.sgml
1 <!-- ##### SECTION Title ##### -->
2 GtkPaned
3
4 <!-- ##### SECTION Short_Description ##### -->
5 Base class for widgets with two adjustable panes
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 #GtkPaned is the base class for widgets with two panes,
10 arranged either horizontally (#GtkHPaned) or
11 vertically (#GtkVPaned). Child widgets are 
12 added to the panes of the widget with
13 gtk_paned_pack1() and gtk_paned_pack2(). The division
14 beween the two children is set by default from the
15 size requests of the children, but it can be adjusted
16 by the user.
17 </para>
18 <para>
19 A paned widget draws a separator between the two
20 child widgets and a small handle that the user
21 can drag to adjust the division. It does not
22 draw any relief around the children or around
23 the separator. (The space in which the separator
24 is called the gutter.) Often, it is useful
25 to put each child inside a #GtkFrame with the
26 shadow type set to %GTK_SHADOW_IN so that the
27 gutter appears as a ridge.
28 </para>
29 <para>
30 Each child has two options that can be set, 
31 @resize and @shrink. If @resize is true, then when the
32 #GtkPaned is resized, that child will expand
33 or shrink along with the paned widget. If @shrink
34 is true, then when that child can be made smaller
35 than its requisition by the user. Setting @shrink
36 to %FALSE allows the application to set a minimum
37 size. If @resize is false for both children, then
38 this is treated as if @resize is true for both
39 children.
40 </para>
41 <para>
42 The application can set the position of the slider
43 as if it were set by the user, by calling
44 gtk_paned_set_position().
45 </para>
46
47 <example>
48 <title>Creating a paned widget with minimum sizes.</title>
49 <programlisting>
50 GtkWidget *hpaned = gtk_hpaned_new (<!-- -->);
51 GtkWidget *frame1 = gtk_frame_new (NULL);
52 GtkWidget *frame2 = gtk_frame_new (NULL);
53 gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_IN);
54 gtk_frame_set_shadow_type (GTK_FRAME (frame2), GTK_SHADOW_IN);
55
56 gtk_widget_set_size_request (hpaned, 200 + GTK_PANED (hpaned)->gutter_size, -1);
57
58 gtk_paned_pack1 (GTK_PANED (hpaned), frame1, TRUE, FALSE);
59 gtk_widget_set_size_request (frame1, 50, -1);
60
61 gtk_paned_pack2 (GTK_PANED (hpaned), frame2, FALSE, FALSE);
62 gtk_widget_set_size_request (frame2, 50, -1);
63 </programlisting>
64 </example>
65
66 <!-- ##### SECTION See_Also ##### -->
67 <para>
68
69 </para>
70
71 <!-- ##### STRUCT GtkPaned ##### -->
72 <para>
73 </para>
74
75
76 <!-- ##### SIGNAL GtkPaned::accept-position ##### -->
77 <para>
78
79 </para>
80
81 @paned: the object which received the signal.
82 @Returns: 
83
84 <!-- ##### SIGNAL GtkPaned::cancel-position ##### -->
85 <para>
86
87 </para>
88
89 @paned: the object which received the signal.
90 @Returns: 
91
92 <!-- ##### SIGNAL GtkPaned::cycle-child-focus ##### -->
93 <para>
94
95 </para>
96
97 @paned: the object which received the signal.
98 @arg1: 
99 @Returns: 
100
101 <!-- ##### SIGNAL GtkPaned::cycle-handle-focus ##### -->
102 <para>
103
104 </para>
105
106 @paned: the object which received the signal.
107 @arg1: 
108 @Returns: 
109
110 <!-- ##### SIGNAL GtkPaned::move-handle ##### -->
111 <para>
112
113 </para>
114
115 @paned: the object which received the signal.
116 @arg1: 
117 @Returns: 
118
119 <!-- ##### SIGNAL GtkPaned::toggle-handle-focus ##### -->
120 <para>
121
122 </para>
123
124 @paned: the object which received the signal.
125 @Returns: 
126
127 <!-- ##### ARG GtkPaned:max-position ##### -->
128 <para>
129
130 </para>
131
132 <!-- ##### ARG GtkPaned:min-position ##### -->
133 <para>
134
135 </para>
136
137 <!-- ##### ARG GtkPaned:position ##### -->
138 <para>
139
140 </para>
141
142 <!-- ##### ARG GtkPaned:position-set ##### -->
143 <para>
144
145 </para>
146
147 <!-- ##### ARG GtkPaned:resize ##### -->
148 <para>
149
150 </para>
151
152 <!-- ##### ARG GtkPaned:shrink ##### -->
153 <para>
154
155 </para>
156
157 <!-- ##### ARG GtkPaned:handle-size ##### -->
158 <para>
159
160 </para>
161
162 <!-- ##### FUNCTION gtk_paned_add1 ##### -->
163 <para>
164 Adds a child to the top or left pane with
165 default parameters. This is equivalent
166 to <literal>gtk_paned_pack1 (paned, child, FALSE, TRUE)</literal>.
167 </para>
168
169 @paned: a paned widget
170 @child: the child to add
171
172
173 <!-- ##### FUNCTION gtk_paned_add2 ##### -->
174 <para>
175 Adds a child to the bottom or right pane with default
176 parameters. This is equivalent to 
177 <literal>gtk_paned_pack2 (paned, child, TRUE, TRUE)</literal>.
178 </para>
179
180 @paned: a paned widget
181 @child: the child to add
182
183
184 <!-- ##### MACRO gtk_paned_gutter_size ##### -->
185 <para>
186 Old name for gtk_paned_set_gutter_size().
187 </para>
188
189 @p: 
190 @s: 
191
192
193 <!-- ##### FUNCTION gtk_paned_pack1 ##### -->
194 <para>
195 Adds a child to the top or left pane.
196 </para>
197
198 @paned: a paned widget
199 @child: the child to add
200 @resize: should this child expand when the paned widget is resized.
201 @shrink: can this child be made smaller than its requsition.
202
203
204 <!-- ##### FUNCTION gtk_paned_pack2 ##### -->
205 <para>
206 Adds a child to the bottom or right pane.
207 </para>
208
209 @paned: a paned widget
210 @child: the child to add
211 @resize: should this child expand when the paned widget is resized.
212 @shrink: can this child be made smaller than its requsition.
213
214
215 <!-- ##### FUNCTION gtk_paned_get_child1 ##### -->
216 <para>
217
218 </para>
219
220 @paned: 
221 @Returns: 
222
223
224 <!-- ##### FUNCTION gtk_paned_get_child2 ##### -->
225 <para>
226
227 </para>
228
229 @paned: 
230 @Returns: 
231
232
233 <!-- ##### MACRO gtk_paned_set_gutter_size ##### -->
234 <para>
235 In older versions of GTK+, this function used to set the width of the 
236 gutter (the area between the two panes). It does nothing now.
237 </para>
238
239 @p: a paned widget
240 @s: the width of the gutter in pixels
241
242
243 <!-- ##### FUNCTION gtk_paned_set_position ##### -->
244 <para>
245
246 </para>
247
248 @paned: 
249 @position: 
250
251
252 <!-- ##### FUNCTION gtk_paned_get_position ##### -->
253 <para>
254
255 </para>
256
257 @paned: 
258 @Returns: 
259
260