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 it's 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), frame1, FALSE, FALSE);
62 gtk_widget_set_size_request (frame1, 50, -1);
66 <!-- ##### SECTION See_Also ##### -->
71 <!-- ##### STRUCT GtkPaned ##### -->
76 <!-- ##### FUNCTION gtk_paned_add1 ##### -->
78 Adds a child to the top or left pane with
79 default parameters. This is equivalent
80 to <literal>gtk_paned_pack1 (paned, child, FALSE, TRUE)</literal>.
83 @paned: a paned widget
84 @child: the child to add
87 <!-- ##### FUNCTION gtk_paned_add2 ##### -->
89 Adds a child to the bottom or right pane with default
90 parameters. This is equivalent to
91 <literal>gtk_paned_pack2 (paned, child, TRUE, TRUE)</literal>.
94 @paned: a paned widget
95 @child: the child to add
98 <!-- ##### MACRO gtk_paned_handle_size ##### -->
100 Old name for gtk_paned_set_handle_size().
105 <!-- ##### MACRO gtk_paned_gutter_size ##### -->
107 Old name for gtk_paned_set_gutter_size().
114 <!-- ##### FUNCTION gtk_paned_pack1 ##### -->
116 Adds a child to the top or left pane.
119 @paned: a paned widget
120 @child: the child to add
121 @resize: should this child expand when the paned widget is resized.
122 @shrink: can this child be made smaller than its requsition.
125 <!-- ##### FUNCTION gtk_paned_pack2 ##### -->
127 Adds a child to the bottom or right pane.
130 @paned: a paned widget
131 @child: the child to add
132 @resize: should this child expand when the paned widget is resized.
133 @shrink: can this child be made smaller than its requsition.
136 <!-- ##### MACRO gtk_paned_set_gutter_size ##### -->
138 In older versions of GTK+, this function used to set the width of the
139 gutter (the area between the two panes). It does nothing now.
143 @s: the width of the gutter in pixels
146 <!-- ##### FUNCTION gtk_paned_set_position ##### -->
155 <!-- ##### FUNCTION gtk_paned_get_position ##### -->
164 <!-- ##### ARG GtkPaned:position ##### -->
169 <!-- ##### ARG GtkPaned:position-set ##### -->