1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 Base class for widgets with two adjustable panes
7 <!-- ##### SECTION Long_Description ##### -->
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
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.
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
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().
48 <title>Creating a paned widget with minimum sizes.</title>
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);
56 gtk_widget_set_size_request (hpaned, 200 + GTK_PANED (hpaned)->gutter_size, -1);
58 gtk_paned_pack1 (GTK_PANED (hpaned), frame1, TRUE, FALSE);
59 gtk_widget_set_size_request (frame1, 50, -1);
61 gtk_paned_pack2 (GTK_PANED (hpaned), frame2, FALSE, FALSE);
62 gtk_widget_set_size_request (frame2, 50, -1);
66 <!-- ##### SECTION See_Also ##### -->
71 <!-- ##### STRUCT GtkPaned ##### -->
76 <!-- ##### SIGNAL GtkPaned::accept-position ##### -->
81 @paned: the object which received the signal.
84 <!-- ##### SIGNAL GtkPaned::cancel-position ##### -->
89 @paned: the object which received the signal.
92 <!-- ##### SIGNAL GtkPaned::cycle-child-focus ##### -->
97 @paned: the object which received the signal.
101 <!-- ##### SIGNAL GtkPaned::cycle-handle-focus ##### -->
106 @paned: the object which received the signal.
110 <!-- ##### SIGNAL GtkPaned::move-handle ##### -->
115 @paned: the object which received the signal.
119 <!-- ##### SIGNAL GtkPaned::toggle-handle-focus ##### -->
124 @paned: the object which received the signal.
127 <!-- ##### ARG GtkPaned:max-position ##### -->
132 <!-- ##### ARG GtkPaned:min-position ##### -->
137 <!-- ##### ARG GtkPaned:position ##### -->
142 <!-- ##### ARG GtkPaned:position-set ##### -->
147 <!-- ##### ARG GtkPaned:resize ##### -->
152 <!-- ##### ARG GtkPaned:shrink ##### -->
157 <!-- ##### ARG GtkPaned:handle-size ##### -->
162 <!-- ##### FUNCTION gtk_paned_add1 ##### -->
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>.
169 @paned: a paned widget
170 @child: the child to add
173 <!-- ##### FUNCTION gtk_paned_add2 ##### -->
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>.
180 @paned: a paned widget
181 @child: the child to add
184 <!-- ##### MACRO gtk_paned_gutter_size ##### -->
186 Old name for gtk_paned_set_gutter_size().
193 <!-- ##### FUNCTION gtk_paned_pack1 ##### -->
195 Adds a child to the top or left pane.
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.
204 <!-- ##### FUNCTION gtk_paned_pack2 ##### -->
206 Adds a child to the bottom or right pane.
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.
215 <!-- ##### FUNCTION gtk_paned_get_child1 ##### -->
224 <!-- ##### FUNCTION gtk_paned_get_child2 ##### -->
233 <!-- ##### MACRO gtk_paned_set_gutter_size ##### -->
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.
240 @s: the width of the gutter in pixels
243 <!-- ##### FUNCTION gtk_paned_set_position ##### -->
252 <!-- ##### FUNCTION gtk_paned_get_position ##### -->