]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkpaned.sgml
Make 3.0 parallel-installable to 2.x
[~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. No separator is drawn
28 if one of the children is missing.
29 </para>
30 <para>
31 Each child has two options that can be set, 
32 @resize and @shrink. If @resize is true, then when the
33 #GtkPaned is resized, that child will expand
34 or shrink along with the paned widget. If @shrink
35 is true, then when that child can be made smaller
36 than its requisition by the user. Setting @shrink
37 to %FALSE allows the application to set a minimum
38 size. If @resize is false for both children, then
39 this is treated as if @resize is true for both
40 children.
41 </para>
42 <para>
43 The application can set the position of the slider
44 as if it were set by the user, by calling
45 gtk_paned_set_position().
46 </para>
47
48 <example>
49 <title>Creating a paned widget with minimum sizes.</title>
50 <programlisting>
51 GtkWidget *hpaned = gtk_hpaned_new (<!-- -->);
52 GtkWidget *frame1 = gtk_frame_new (NULL);
53 GtkWidget *frame2 = gtk_frame_new (NULL);
54 gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_IN);
55 gtk_frame_set_shadow_type (GTK_FRAME (frame2), GTK_SHADOW_IN);
56
57 gtk_widget_set_size_request (hpaned, 200 + GTK_PANED (hpaned)->gutter_size, -1);
58
59 gtk_paned_pack1 (GTK_PANED (hpaned), frame1, TRUE, FALSE);
60 gtk_widget_set_size_request (frame1, 50, -1);
61
62 gtk_paned_pack2 (GTK_PANED (hpaned), frame2, FALSE, FALSE);
63 gtk_widget_set_size_request (frame2, 50, -1);
64 </programlisting>
65 </example>
66
67 <!-- ##### SECTION See_Also ##### -->
68 <para>
69
70 </para>
71
72 <!-- ##### SECTION Stability_Level ##### -->
73
74
75 <!-- ##### SECTION Image ##### -->
76
77
78 <!-- ##### STRUCT GtkPaned ##### -->
79 <para>
80 </para>
81
82
83 <!-- ##### SIGNAL GtkPaned::accept-position ##### -->
84 <para>
85
86 </para>
87
88 @paned: the object which received the signal.
89 @Returns: 
90
91 <!-- ##### SIGNAL GtkPaned::cancel-position ##### -->
92 <para>
93
94 </para>
95
96 @paned: the object which received the signal.
97 @Returns: 
98
99 <!-- ##### SIGNAL GtkPaned::cycle-child-focus ##### -->
100 <para>
101
102 </para>
103
104 @Returns: 
105 @Param4: 
106 @Returns: 
107 <!-- # Unused Parameters # -->
108 @paned: the object which received the signal.
109
110 <!-- ##### SIGNAL GtkPaned::cycle-handle-focus ##### -->
111 <para>
112
113 </para>
114
115 @Returns: 
116 @Param4: 
117 @Returns: 
118 <!-- # Unused Parameters # -->
119 @paned: the object which received the signal.
120
121 <!-- ##### SIGNAL GtkPaned::move-handle ##### -->
122 <para>
123
124 </para>
125
126 @Returns: 
127 @Param4: 
128 @Returns: 
129 <!-- # Unused Parameters # -->
130 @paned: the object which received the signal.
131
132 <!-- ##### SIGNAL GtkPaned::toggle-handle-focus ##### -->
133 <para>
134
135 </para>
136
137 @paned: the object which received the signal.
138 @Returns: 
139
140 <!-- ##### ARG GtkPaned:max-position ##### -->
141 <para>
142
143 </para>
144
145 <!-- ##### ARG GtkPaned:min-position ##### -->
146 <para>
147
148 </para>
149
150 <!-- ##### ARG GtkPaned:position ##### -->
151 <para>
152
153 </para>
154
155 <!-- ##### ARG GtkPaned:position-set ##### -->
156 <para>
157
158 </para>
159
160 <!-- ##### ARG GtkPaned:resize ##### -->
161 <para>
162
163 </para>
164
165 <!-- ##### ARG GtkPaned:shrink ##### -->
166 <para>
167
168 </para>
169
170 <!-- ##### ARG GtkPaned:handle-size ##### -->
171 <para>
172
173 </para>
174
175 <!-- ##### FUNCTION gtk_paned_add1 ##### -->
176 <para>
177 Adds a child to the top or left pane with
178 default parameters. This is equivalent
179 to <literal>gtk_paned_pack1 (paned, child, FALSE, TRUE)</literal>.
180 </para>
181
182 @paned: a paned widget
183 @child: the child to add
184
185
186 <!-- ##### FUNCTION gtk_paned_add2 ##### -->
187 <para>
188 Adds a child to the bottom or right pane with default
189 parameters. This is equivalent to 
190 <literal>gtk_paned_pack2 (paned, child, TRUE, TRUE)</literal>.
191 </para>
192
193 @paned: a paned widget
194 @child: the child to add
195
196
197 <!-- ##### FUNCTION gtk_paned_pack1 ##### -->
198 <para>
199 Adds a child to the top or left pane.
200 </para>
201
202 @paned: a paned widget
203 @child: the child to add
204 @resize: should this child expand when the paned widget is resized.
205 @shrink: can this child be made smaller than its requisition.
206
207
208 <!-- ##### FUNCTION gtk_paned_pack2 ##### -->
209 <para>
210 Adds a child to the bottom or right pane.
211 </para>
212
213 @paned: a paned widget
214 @child: the child to add
215 @resize: should this child expand when the paned widget is resized.
216 @shrink: can this child be made smaller than its requisition.
217
218
219 <!-- ##### FUNCTION gtk_paned_get_child1 ##### -->
220 <para>
221
222 </para>
223
224 @paned: 
225 @Returns: 
226
227
228 <!-- ##### FUNCTION gtk_paned_get_child2 ##### -->
229 <para>
230
231 </para>
232
233 @paned: 
234 @Returns: 
235
236
237 <!-- ##### FUNCTION gtk_paned_set_position ##### -->
238 <para>
239
240 </para>
241
242 @paned: 
243 @position: 
244
245
246 <!-- ##### FUNCTION gtk_paned_get_position ##### -->
247 <para>
248
249 </para>
250
251 @paned: 
252 @Returns: 
253
254
255 <!-- ##### FUNCTION gtk_paned_get_handle_window ##### -->
256 <para>
257
258 </para>
259
260 @paned: 
261 @Returns: 
262
263