1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
7
<link rel="home" href="index.html" title="GTK+ 2 Reference Manual">
8
<link rel="up" href="AbstractObjects.html" title="Abstract Base Classes">
9
<link rel="prev" href="GtkBin.html" title="GtkBin">
10
<link rel="next" href="GtkButtonBox.html" title="GtkButtonBox">
11
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17
<td><a accesskey="p" href="GtkBin.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
<td><a accesskey="u" href="AbstractObjects.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20
<th width="100%" align="center">GTK+ 2 Reference Manual</th>
21
<td><a accesskey="n" href="GtkButtonBox.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23
<tr><td colspan="5" class="shortcuts">
24
<a href="#GtkBox.synopsis" class="shortcut">Top</a>
26
<a href="#GtkBox.description" class="shortcut">Description</a>
28
<a href="#GtkBox.object-hierarchy" class="shortcut">Object Hierarchy</a>
30
<a href="#GtkBox.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
32
<a href="#GtkBox.properties" class="shortcut">Properties</a>
34
<a href="#GtkBox.child-properties" class="shortcut">Child Properties</a>
37
<div class="refentry">
38
<a name="GtkBox"></a><div class="titlepage"></div>
39
<div class="refnamediv"><table width="100%"><tr>
41
<h2><span class="refentrytitle"><a name="GtkBox.top_of_page"></a>GtkBox</span></h2>
42
<p>GtkBox — Base class for box containers</p>
44
<td valign="top" align="right"></td>
46
<div class="refsynopsisdiv">
47
<a name="GtkBox.synopsis"></a><h2>Synopsis</h2>
48
<pre class="synopsis">
49
#include <gtk/gtk.h>
51
struct <a class="link" href="GtkBox.html#GtkBox-struct" title="struct GtkBox">GtkBox</a>;
52
struct <a class="link" href="GtkBox.html#GtkBoxChild" title="struct GtkBoxChild">GtkBoxChild</a>;
53
<span class="returnvalue">void</span> <a class="link" href="GtkBox.html#gtk-box-pack-start" title="gtk_box_pack_start ()">gtk_box_pack_start</a> (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
54
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
55
<em class="parameter"><code><span class="type">gboolean</span> expand</code></em>,
56
<em class="parameter"><code><span class="type">gboolean</span> fill</code></em>,
57
<em class="parameter"><code><span class="type">guint</span> padding</code></em>);
58
<span class="returnvalue">void</span> <a class="link" href="GtkBox.html#gtk-box-pack-end" title="gtk_box_pack_end ()">gtk_box_pack_end</a> (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
59
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
60
<em class="parameter"><code><span class="type">gboolean</span> expand</code></em>,
61
<em class="parameter"><code><span class="type">gboolean</span> fill</code></em>,
62
<em class="parameter"><code><span class="type">guint</span> padding</code></em>);
63
<span class="returnvalue">void</span> <a class="link" href="GtkBox.html#gtk-box-pack-start-defaults" title="gtk_box_pack_start_defaults ()">gtk_box_pack_start_defaults</a> (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
64
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);
65
<span class="returnvalue">void</span> <a class="link" href="GtkBox.html#gtk-box-pack-end-defaults" title="gtk_box_pack_end_defaults ()">gtk_box_pack_end_defaults</a> (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
66
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);
67
<span class="returnvalue">gboolean</span> <a class="link" href="GtkBox.html#gtk-box-get-homogeneous" title="gtk_box_get_homogeneous ()">gtk_box_get_homogeneous</a> (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>);
68
<span class="returnvalue">void</span> <a class="link" href="GtkBox.html#gtk-box-set-homogeneous" title="gtk_box_set_homogeneous ()">gtk_box_set_homogeneous</a> (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
69
<em class="parameter"><code><span class="type">gboolean</span> homogeneous</code></em>);
70
<span class="returnvalue">gint</span> <a class="link" href="GtkBox.html#gtk-box-get-spacing" title="gtk_box_get_spacing ()">gtk_box_get_spacing</a> (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>);
71
<span class="returnvalue">void</span> <a class="link" href="GtkBox.html#gtk-box-set-spacing" title="gtk_box_set_spacing ()">gtk_box_set_spacing</a> (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
72
<em class="parameter"><code><span class="type">gint</span> spacing</code></em>);
73
<span class="returnvalue">void</span> <a class="link" href="GtkBox.html#gtk-box-reorder-child" title="gtk_box_reorder_child ()">gtk_box_reorder_child</a> (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
74
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
75
<em class="parameter"><code><span class="type">gint</span> position</code></em>);
76
<span class="returnvalue">void</span> <a class="link" href="GtkBox.html#gtk-box-query-child-packing" title="gtk_box_query_child_packing ()">gtk_box_query_child_packing</a> (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
77
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
78
<em class="parameter"><code><span class="type">gboolean</span> *expand</code></em>,
79
<em class="parameter"><code><span class="type">gboolean</span> *fill</code></em>,
80
<em class="parameter"><code><span class="type">guint</span> *padding</code></em>,
81
<em class="parameter"><code><a class="link" href="gtk2-Standard-Enumerations.html#GtkPackType" title="enum GtkPackType"><span class="type">GtkPackType</span></a> *pack_type</code></em>);
82
<span class="returnvalue">void</span> <a class="link" href="GtkBox.html#gtk-box-set-child-packing" title="gtk_box_set_child_packing ()">gtk_box_set_child_packing</a> (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
83
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
84
<em class="parameter"><code><span class="type">gboolean</span> expand</code></em>,
85
<em class="parameter"><code><span class="type">gboolean</span> fill</code></em>,
86
<em class="parameter"><code><span class="type">guint</span> padding</code></em>,
87
<em class="parameter"><code><a class="link" href="gtk2-Standard-Enumerations.html#GtkPackType" title="enum GtkPackType"><span class="type">GtkPackType</span></a> pack_type</code></em>);
90
<div class="refsect1">
91
<a name="GtkBox.object-hierarchy"></a><h2>Object Hierarchy</h2>
92
<pre class="synopsis">
94
+----GInitiallyUnowned
95
+----<a class="link" href="GtkObject.html" title="GtkObject">GtkObject</a>
96
+----<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
97
+----<a class="link" href="GtkContainer.html" title="GtkContainer">GtkContainer</a>
99
+----<a class="link" href="GtkButtonBox.html" title="GtkButtonBox">GtkButtonBox</a>
100
+----<a class="link" href="GtkVBox.html" title="GtkVBox">GtkVBox</a>
101
+----<a class="link" href="GtkHBox.html" title="GtkHBox">GtkHBox</a>
104
<div class="refsect1">
105
<a name="GtkBox.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
108
AtkImplementorIface, <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a> and <a class="link" href="gtk2-Orientable.html#GtkOrientable">GtkOrientable</a>.</p>
110
<div class="refsect1">
111
<a name="GtkBox.properties"></a><h2>Properties</h2>
112
<pre class="synopsis">
113
"<a class="link" href="GtkBox.html#GtkBox--homogeneous" title='The "homogeneous" property'>homogeneous</a>" <span class="type">gboolean</span> : Read / Write
114
"<a class="link" href="GtkBox.html#GtkBox--spacing" title='The "spacing" property'>spacing</a>" <span class="type">gint</span> : Read / Write
117
<div class="refsect1">
118
<a name="GtkBox.child-properties"></a><h2>Child Properties</h2>
119
<pre class="synopsis">
120
"<a class="link" href="GtkBox.html#GtkBox--c-expand" title='The "expand" child property'>expand</a>" <span class="type">gboolean</span> : Read / Write
121
"<a class="link" href="GtkBox.html#GtkBox--c-fill" title='The "fill" child property'>fill</a>" <span class="type">gboolean</span> : Read / Write
122
"<a class="link" href="GtkBox.html#GtkBox--c-pack-type" title='The "pack-type" child property'>pack-type</a>" <a class="link" href="gtk2-Standard-Enumerations.html#GtkPackType" title="enum GtkPackType"><span class="type">GtkPackType</span></a> : Read / Write
123
"<a class="link" href="GtkBox.html#GtkBox--c-padding" title='The "padding" child property'>padding</a>" <span class="type">guint</span> : Read / Write
124
"<a class="link" href="GtkBox.html#GtkBox--c-position" title='The "position" child property'>position</a>" <span class="type">gint</span> : Read / Write
127
<div class="refsect1">
128
<a name="GtkBox.description"></a><h2>Description</h2>
130
GtkBox is an abstract widget which encapsulates functionality for a
131
particular kind of container, one that organizes a variable number of
132
widgets into a rectangular area. GtkBox has a number of derived
133
classes, e.g. <a class="link" href="GtkHBox.html" title="GtkHBox"><span class="type">GtkHBox</span></a> and <a class="link" href="GtkVBox.html" title="GtkVBox"><span class="type">GtkVBox</span></a>.
136
The rectangular area of a GtkBox is organized into either a single row
137
or a single column of child widgets depending upon whether the box is
138
of type <a class="link" href="GtkHBox.html" title="GtkHBox"><span class="type">GtkHBox</span></a> or <a class="link" href="GtkVBox.html" title="GtkVBox"><span class="type">GtkVBox</span></a>, respectively. Thus, all children of a
139
GtkBox are allocated one dimension in common, which is the height of a
140
row, or the width of a column.
143
GtkBox uses a notion of <span class="emphasis"><em>packing</em></span>. Packing refers to
144
adding widgets with reference to a particular position in a
145
<a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>. For a GtkBox, there are two reference positions: the
146
<span class="emphasis"><em>start</em></span> and the <span class="emphasis"><em>end</em></span> of the box.
147
For a <a class="link" href="GtkVBox.html" title="GtkVBox"><span class="type">GtkVBox</span></a>, the start is defined as the top of the box and the end is
148
defined as the bottom. For a <a class="link" href="GtkHBox.html" title="GtkHBox"><span class="type">GtkHBox</span></a> the start is defined as the
149
left side and the end is defined as the right side.
152
Use repeated calls to <a class="link" href="GtkBox.html#gtk-box-pack-start" title="gtk_box_pack_start ()"><code class="function">gtk_box_pack_start()</code></a> to pack widgets into a
153
GtkBox from start to end. Use <a class="link" href="GtkBox.html#gtk-box-pack-end" title="gtk_box_pack_end ()"><code class="function">gtk_box_pack_end()</code></a> to add widgets from
154
end to start. You may intersperse these calls and add widgets from
155
both ends of the same GtkBox.
158
Use <a class="link" href="GtkBox.html#gtk-box-pack-start-defaults" title="gtk_box_pack_start_defaults ()"><code class="function">gtk_box_pack_start_defaults()</code></a> or <a class="link" href="GtkBox.html#gtk-box-pack-end-defaults" title="gtk_box_pack_end_defaults ()"><code class="function">gtk_box_pack_end_defaults()</code></a>
159
to pack widgets into a GtkBox if you do not need to specify the
160
<span class="type">"expand"</span>, <span class="type">"fill"</span>, or <span class="type">"padding"</span> child properties
161
for the child to be added.
164
Because GtkBox is a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>, you may also use
165
<a class="link" href="GtkContainer.html#gtk-container-add" title="gtk_container_add ()"><code class="function">gtk_container_add()</code></a> to insert widgets into the box, and they will be
166
packed as if with <a class="link" href="GtkBox.html#gtk-box-pack-start-defaults" title="gtk_box_pack_start_defaults ()"><code class="function">gtk_box_pack_start_defaults()</code></a>. Use
167
<a class="link" href="GtkContainer.html#gtk-container-remove" title="gtk_container_remove ()"><code class="function">gtk_container_remove()</code></a> to remove widgets from the GtkBox.
170
Use <a class="link" href="GtkBox.html#gtk-box-set-homogeneous" title="gtk_box_set_homogeneous ()"><code class="function">gtk_box_set_homogeneous()</code></a> to specify whether or not all children
171
of the GtkBox are forced to get the same amount of space.
174
Use <a class="link" href="GtkBox.html#gtk-box-set-spacing" title="gtk_box_set_spacing ()"><code class="function">gtk_box_set_spacing()</code></a> to determine how much space will be
175
minimally placed between all children in the GtkBox.
178
Use <a class="link" href="GtkBox.html#gtk-box-reorder-child" title="gtk_box_reorder_child ()"><code class="function">gtk_box_reorder_child()</code></a> to move a GtkBox child to a different
182
Use <a class="link" href="GtkBox.html#gtk-box-set-child-packing" title="gtk_box_set_child_packing ()"><code class="function">gtk_box_set_child_packing()</code></a> to reset the <span class="type">"expand"</span>,
183
<span class="type">"fill"</span> and <span class="type">"padding"</span> child properties.
184
Use <a class="link" href="GtkBox.html#gtk-box-query-child-packing" title="gtk_box_query_child_packing ()"><code class="function">gtk_box_query_child_packing()</code></a> to query these fields.
187
<div class="refsect1">
188
<a name="GtkBox.details"></a><h2>Details</h2>
189
<div class="refsect2">
190
<a name="GtkBox-struct"></a><h3>struct GtkBox</h3>
191
<pre class="programlisting">struct GtkBox {
192
GList *GSEAL (children);
193
gint16 GSEAL (spacing);
194
guint GSEAL (homogeneous) : 1;
198
The <a class="link" href="GtkBox.html#GtkBox-struct" title="struct GtkBox"><span class="type">GtkBox</span></a> describes an instance of GtkBox and contains the
199
following fields. (These fields should be considered read-only.
200
They should never be set by an application.)
204
<div class="refsect2">
205
<a name="GtkBoxChild"></a><h3>struct GtkBoxChild</h3>
206
<pre class="programlisting">struct GtkBoxChild {
212
guint is_secondary : 1;
215
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
216
<h3 class="title">Warning</h3>
217
<p><code class="literal">GtkBoxChild</code> has been deprecated since version 2.22 and should not be used in newly-written code. Use <a class="link" href="GtkContainer.html#gtk-container-get-children" title="gtk_container_get_children ()"><code class="function">gtk_container_get_children()</code></a> instead.</p>
220
The <a class="link" href="GtkBox.html#GtkBoxChild" title="struct GtkBoxChild"><span class="type">GtkBoxChild</span></a> holds a child widget of <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> and describes how the child
221
is to be packed into the <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a>. All fields of this <a class="link" href="GtkBox.html#GtkBoxChild" title="struct GtkBoxChild"><span class="type">GtkBoxChild</span></a> should be
222
considered read-only and they should never be set directly by an application.
223
Use <a class="link" href="GtkBox.html#gtk-box-query-child-packing" title="gtk_box_query_child_packing ()"><code class="function">gtk_box_query_child_packing()</code></a> and <a class="link" href="GtkBox.html#gtk-box-set-child-packing" title="gtk_box_set_child_packing ()"><code class="function">gtk_box_set_child_packing()</code></a> to query
224
and set the <a class="link" href="GtkBox.html#GtkBoxChild.padding"><span class="type">GtkBoxChild.padding</span></a>, <a class="link" href="GtkBox.html#GtkBoxChild.expand"><span class="type">GtkBoxChild.expand</span></a>, <a class="link" href="GtkBox.html#GtkBoxChild.fill"><span class="type">GtkBoxChild.fill</span></a> and
225
<a class="link" href="GtkBox.html#GtkBoxChild.pack"><span class="type">GtkBoxChild.pack</span></a> fields.
228
The <span class="type">GtkBoxChild</span> holds a child widget of GtkBox and describes
229
how the child is to be packed into the GtkBox. Use
230
<a class="link" href="GtkBox.html#gtk-box-query-child-packing" title="gtk_box_query_child_packing ()"><code class="function">gtk_box_query_child_packing()</code></a> and <a class="link" href="GtkBox.html#gtk-box-set-child-packing" title="gtk_box_set_child_packing ()"><code class="function">gtk_box_set_child_packing()</code></a> to query
231
and reset the <em class="structfield"><code>padding</code></em>,
232
<em class="structfield"><code>expand</code></em>, <em class="structfield"><code>fill</code></em>,
233
and <em class="structfield"><code>pack</code></em> fields.
236
<span class="type">GtkBoxChild</span> contains the following fields. (These fields
237
should be considered read-only. They should never be directly set by an
240
<div class="variablelist"><table border="0" class="variablelist">
242
<col align="left" valign="top">
247
<td><p><span class="term"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *<em class="structfield"><code><a name="GtkBoxChild.widget"></a>widget</code></em>;</span></p></td>
248
<td>the child widget, packed into the GtkBox.</td>
251
<td><p><span class="term"><span class="type">guint16</span> <em class="structfield"><code><a name="GtkBoxChild.padding"></a>padding</code></em>;</span></p></td>
252
<td>the number of extra pixels to put between this child and its
253
neighbors, set when packed, zero by default.</td>
256
<td><p><span class="term"><span class="type">guint</span> <em class="structfield"><code><a name="GtkBoxChild.expand"></a>expand</code></em> : 1;</span></p></td>
257
<td>flag indicates whether extra space should be given to this child.
258
Any extra space given to the parent GtkBox is divided up among all children
259
with this attribute set to <code class="literal">TRUE</code>; set when packed, <code class="literal">TRUE</code> by default.</td>
262
<td><p><span class="term"><span class="type">guint</span> <em class="structfield"><code><a name="GtkBoxChild.fill"></a>fill</code></em> : 1;</span></p></td>
263
<td>flag indicates whether any extra space given to this child due to its
264
<em class="parameter"><code>expand</code></em> attribute being set is actually allocated to the child, rather than
265
being used as padding around the widget; set when packed, <code class="literal">TRUE</code> by default.</td>
268
<td><p><span class="term"><span class="type">guint</span> <em class="structfield"><code><a name="GtkBoxChild.pack"></a>pack</code></em> : 1;</span></p></td>
269
<td>one of <a class="link" href="gtk2-Standard-Enumerations.html#GtkPackType" title="enum GtkPackType"><span class="type">GtkPackType</span></a> indicating whether the child is packed with
270
reference to the start (top/left) or end (bottom/right) of the GtkBox.</td>
273
<td><p><span class="term"><span class="type">guint</span> <em class="structfield"><code><a name="GtkBoxChild.is-secondary"></a>is_secondary</code></em> : 1;</span></p></td>
275
<code class="literal">TRUE</code> if the child is secondary</td>
281
<div class="refsect2">
282
<a name="gtk-box-pack-start"></a><h3>gtk_box_pack_start ()</h3>
283
<pre class="programlisting"><span class="returnvalue">void</span> gtk_box_pack_start (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
284
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
285
<em class="parameter"><code><span class="type">gboolean</span> expand</code></em>,
286
<em class="parameter"><code><span class="type">gboolean</span> fill</code></em>,
287
<em class="parameter"><code><span class="type">guint</span> padding</code></em>);</pre>
289
Adds <em class="parameter"><code>child</code></em> to <em class="parameter"><code>box</code></em>, packed with reference to the start of <em class="parameter"><code>box</code></em>.
290
The <em class="parameter"><code>child</code></em> is packed after any other child packed with reference
291
to the start of <em class="parameter"><code>box</code></em>.
293
<div class="variablelist"><table border="0" class="variablelist">
295
<col align="left" valign="top">
300
<td><p><span class="term"><em class="parameter"><code>box</code></em> :</span></p></td>
301
<td>a <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a>
305
<td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td>
306
<td>the <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> to be added to <em class="parameter"><code>box</code></em>
310
<td><p><span class="term"><em class="parameter"><code>expand</code></em> :</span></p></td>
312
<code class="literal">TRUE</code> if the new child is to be given extra space allocated to
313
<em class="parameter"><code>box</code></em>. The extra space will be divided evenly between all children of
314
<em class="parameter"><code>box</code></em> that use this option</td>
317
<td><p><span class="term"><em class="parameter"><code>fill</code></em> :</span></p></td>
319
<code class="literal">TRUE</code> if space given to <em class="parameter"><code>child</code></em> by the <em class="parameter"><code>expand</code></em> option is
320
actually allocated to <em class="parameter"><code>child</code></em>, rather than just padding it. This
321
parameter has no effect if <em class="parameter"><code>expand</code></em> is set to <code class="literal">FALSE</code>. A child is
322
always allocated the full height of a <a class="link" href="GtkHBox.html" title="GtkHBox"><span class="type">GtkHBox</span></a> and the full width
323
of a <a class="link" href="GtkVBox.html" title="GtkVBox"><span class="type">GtkVBox</span></a>. This option affects the other dimension</td>
326
<td><p><span class="term"><em class="parameter"><code>padding</code></em> :</span></p></td>
327
<td>extra space in pixels to put between this child and its
328
neighbors, over and above the global amount specified by
329
<a class="link" href="GtkBox.html#GtkBox--spacing" title='The "spacing" property'><span class="type">"spacing"</span></a> property. If <em class="parameter"><code>child</code></em> is a widget at one of the
330
reference ends of <em class="parameter"><code>box</code></em>, then <em class="parameter"><code>padding</code></em> pixels are also put between
331
<em class="parameter"><code>child</code></em> and the reference edge of <em class="parameter"><code>box</code></em>
338
<div class="refsect2">
339
<a name="gtk-box-pack-end"></a><h3>gtk_box_pack_end ()</h3>
340
<pre class="programlisting"><span class="returnvalue">void</span> gtk_box_pack_end (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
341
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
342
<em class="parameter"><code><span class="type">gboolean</span> expand</code></em>,
343
<em class="parameter"><code><span class="type">gboolean</span> fill</code></em>,
344
<em class="parameter"><code><span class="type">guint</span> padding</code></em>);</pre>
346
Adds <em class="parameter"><code>child</code></em> to <em class="parameter"><code>box</code></em>, packed with reference to the end of <em class="parameter"><code>box</code></em>.
347
The <em class="parameter"><code>child</code></em> is packed after (away from end of) any other child
348
packed with reference to the end of <em class="parameter"><code>box</code></em>.
350
<div class="variablelist"><table border="0" class="variablelist">
352
<col align="left" valign="top">
357
<td><p><span class="term"><em class="parameter"><code>box</code></em> :</span></p></td>
358
<td>a <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a>
362
<td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td>
363
<td>the <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> to be added to <em class="parameter"><code>box</code></em>
367
<td><p><span class="term"><em class="parameter"><code>expand</code></em> :</span></p></td>
369
<code class="literal">TRUE</code> if the new child is to be given extra space allocated
370
to <em class="parameter"><code>box</code></em>. The extra space will be divided evenly between all children
371
of <em class="parameter"><code>box</code></em> that use this option</td>
374
<td><p><span class="term"><em class="parameter"><code>fill</code></em> :</span></p></td>
376
<code class="literal">TRUE</code> if space given to <em class="parameter"><code>child</code></em> by the <em class="parameter"><code>expand</code></em> option is
377
actually allocated to <em class="parameter"><code>child</code></em>, rather than just padding it. This
378
parameter has no effect if <em class="parameter"><code>expand</code></em> is set to <code class="literal">FALSE</code>. A child is
379
always allocated the full height of a <a class="link" href="GtkHBox.html" title="GtkHBox"><span class="type">GtkHBox</span></a> and the full width
380
of a <a class="link" href="GtkVBox.html" title="GtkVBox"><span class="type">GtkVBox</span></a>. This option affects the other dimension</td>
383
<td><p><span class="term"><em class="parameter"><code>padding</code></em> :</span></p></td>
384
<td>extra space in pixels to put between this child and its
385
neighbors, over and above the global amount specified by
386
<a class="link" href="GtkBox.html#GtkBox--spacing" title='The "spacing" property'><span class="type">"spacing"</span></a> property. If <em class="parameter"><code>child</code></em> is a widget at one of the
387
reference ends of <em class="parameter"><code>box</code></em>, then <em class="parameter"><code>padding</code></em> pixels are also put between
388
<em class="parameter"><code>child</code></em> and the reference edge of <em class="parameter"><code>box</code></em>
395
<div class="refsect2">
396
<a name="gtk-box-pack-start-defaults"></a><h3>gtk_box_pack_start_defaults ()</h3>
397
<pre class="programlisting"><span class="returnvalue">void</span> gtk_box_pack_start_defaults (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
398
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
399
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
400
<h3 class="title">Warning</h3>
401
<p><code class="literal">gtk_box_pack_start_defaults</code> has been deprecated since version 2.14 and should not be used in newly-written code. Use <a class="link" href="GtkBox.html#gtk-box-pack-start" title="gtk_box_pack_start ()"><code class="function">gtk_box_pack_start()</code></a></p>
404
Adds <em class="parameter"><code>widget</code></em> to <em class="parameter"><code>box</code></em>, packed with reference to the start of <em class="parameter"><code>box</code></em>.
405
The child is packed after any other child packed with reference
406
to the start of <em class="parameter"><code>box</code></em>.
409
Parameters for how to pack the child <em class="parameter"><code>widget</code></em>, <span class="type">"expand"</span>,
410
<span class="type">"fill"</span> and <span class="type">"padding"</span>, are given their default
411
values, <code class="literal">TRUE</code>, <code class="literal">TRUE</code>, and 0, respectively.
413
<div class="variablelist"><table border="0" class="variablelist">
415
<col align="left" valign="top">
420
<td><p><span class="term"><em class="parameter"><code>box</code></em> :</span></p></td>
421
<td>a <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a>
425
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
426
<td>the <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> to be added to <em class="parameter"><code>box</code></em>
433
<div class="refsect2">
434
<a name="gtk-box-pack-end-defaults"></a><h3>gtk_box_pack_end_defaults ()</h3>
435
<pre class="programlisting"><span class="returnvalue">void</span> gtk_box_pack_end_defaults (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
436
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
437
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
438
<h3 class="title">Warning</h3>
439
<p><code class="literal">gtk_box_pack_end_defaults</code> has been deprecated since version 2.14 and should not be used in newly-written code. Use <a class="link" href="GtkBox.html#gtk-box-pack-end" title="gtk_box_pack_end ()"><code class="function">gtk_box_pack_end()</code></a></p>
442
Adds <em class="parameter"><code>widget</code></em> to <em class="parameter"><code>box</code></em>, packed with reference to the end of <em class="parameter"><code>box</code></em>.
443
The child is packed after any other child packed with reference
444
to the start of <em class="parameter"><code>box</code></em>.
447
Parameters for how to pack the child <em class="parameter"><code>widget</code></em>, <span class="type">"expand"</span>,
448
<span class="type">"fill"</span> and <span class="type">"padding"</span>, are given their default
449
values, <code class="literal">TRUE</code>, <code class="literal">TRUE</code>, and 0, respectively.
451
<div class="variablelist"><table border="0" class="variablelist">
453
<col align="left" valign="top">
458
<td><p><span class="term"><em class="parameter"><code>box</code></em> :</span></p></td>
459
<td>a <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a>
463
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
464
<td>the <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> to be added to <em class="parameter"><code>box</code></em>
471
<div class="refsect2">
472
<a name="gtk-box-get-homogeneous"></a><h3>gtk_box_get_homogeneous ()</h3>
473
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_box_get_homogeneous (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>);</pre>
475
Returns whether the box is homogeneous (all children are the
476
same size). See <a class="link" href="GtkBox.html#gtk-box-set-homogeneous" title="gtk_box_set_homogeneous ()"><code class="function">gtk_box_set_homogeneous()</code></a>.
478
<div class="variablelist"><table border="0" class="variablelist">
480
<col align="left" valign="top">
485
<td><p><span class="term"><em class="parameter"><code>box</code></em> :</span></p></td>
486
<td>a <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a>
490
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
492
<code class="literal">TRUE</code> if the box is homogeneous.</td>
498
<div class="refsect2">
499
<a name="gtk-box-set-homogeneous"></a><h3>gtk_box_set_homogeneous ()</h3>
500
<pre class="programlisting"><span class="returnvalue">void</span> gtk_box_set_homogeneous (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
501
<em class="parameter"><code><span class="type">gboolean</span> homogeneous</code></em>);</pre>
503
Sets the <a class="link" href="GtkBox.html#GtkBox--homogeneous" title='The "homogeneous" property'><span class="type">"homogeneous"</span></a> property of <em class="parameter"><code>box</code></em>, controlling
504
whether or not all children of <em class="parameter"><code>box</code></em> are given equal space
507
<div class="variablelist"><table border="0" class="variablelist">
509
<col align="left" valign="top">
514
<td><p><span class="term"><em class="parameter"><code>box</code></em> :</span></p></td>
515
<td>a <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a>
519
<td><p><span class="term"><em class="parameter"><code>homogeneous</code></em> :</span></p></td>
520
<td>a boolean value, <code class="literal">TRUE</code> to create equal allotments,
521
<code class="literal">FALSE</code> for variable allotments</td>
527
<div class="refsect2">
528
<a name="gtk-box-get-spacing"></a><h3>gtk_box_get_spacing ()</h3>
529
<pre class="programlisting"><span class="returnvalue">gint</span> gtk_box_get_spacing (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>);</pre>
531
Gets the value set by <a class="link" href="GtkBox.html#gtk-box-set-spacing" title="gtk_box_set_spacing ()"><code class="function">gtk_box_set_spacing()</code></a>.
533
<div class="variablelist"><table border="0" class="variablelist">
535
<col align="left" valign="top">
540
<td><p><span class="term"><em class="parameter"><code>box</code></em> :</span></p></td>
541
<td>a <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a>
545
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
546
<td>spacing between children</td>
552
<div class="refsect2">
553
<a name="gtk-box-set-spacing"></a><h3>gtk_box_set_spacing ()</h3>
554
<pre class="programlisting"><span class="returnvalue">void</span> gtk_box_set_spacing (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
555
<em class="parameter"><code><span class="type">gint</span> spacing</code></em>);</pre>
557
Sets the <a class="link" href="GtkBox.html#GtkBox--spacing" title='The "spacing" property'><span class="type">"spacing"</span></a> property of <em class="parameter"><code>box</code></em>, which is the
558
number of pixels to place between children of <em class="parameter"><code>box</code></em>.
560
<div class="variablelist"><table border="0" class="variablelist">
562
<col align="left" valign="top">
567
<td><p><span class="term"><em class="parameter"><code>box</code></em> :</span></p></td>
568
<td>a <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a>
572
<td><p><span class="term"><em class="parameter"><code>spacing</code></em> :</span></p></td>
573
<td>the number of pixels to put between children</td>
579
<div class="refsect2">
580
<a name="gtk-box-reorder-child"></a><h3>gtk_box_reorder_child ()</h3>
581
<pre class="programlisting"><span class="returnvalue">void</span> gtk_box_reorder_child (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
582
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
583
<em class="parameter"><code><span class="type">gint</span> position</code></em>);</pre>
585
Moves <em class="parameter"><code>child</code></em> to a new <em class="parameter"><code>position</code></em> in the list of <em class="parameter"><code>box</code></em> children.
586
The list is the <em class="structfield"><code>children</code></em> field of
587
<a class="link" href="GtkBox.html#GtkBox-struct" title="struct GtkBox"><span class="type">GtkBox</span></a>, and contains both widgets packed <a class="link" href="gtk2-Standard-Enumerations.html#GTK-PACK-START:CAPS"><span class="type">GTK_PACK_START</span></a>
588
as well as widgets packed <a class="link" href="gtk2-Standard-Enumerations.html#GTK-PACK-END:CAPS"><span class="type">GTK_PACK_END</span></a>, in the order that these
589
widgets were added to <em class="parameter"><code>box</code></em>.
592
A widget's position in the <em class="parameter"><code>box</code></em> children list determines where
593
the widget is packed into <em class="parameter"><code>box</code></em>. A child widget at some position
594
in the list will be packed just after all other widgets of the
595
same packing type that appear earlier in the list.
597
<div class="variablelist"><table border="0" class="variablelist">
599
<col align="left" valign="top">
604
<td><p><span class="term"><em class="parameter"><code>box</code></em> :</span></p></td>
605
<td>a <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a>
609
<td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td>
610
<td>the <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> to move</td>
613
<td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td>
614
<td>the new position for <em class="parameter"><code>child</code></em> in the list of children
615
of <em class="parameter"><code>box</code></em>, starting from 0. If negative, indicates the end of
622
<div class="refsect2">
623
<a name="gtk-box-query-child-packing"></a><h3>gtk_box_query_child_packing ()</h3>
624
<pre class="programlisting"><span class="returnvalue">void</span> gtk_box_query_child_packing (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
625
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
626
<em class="parameter"><code><span class="type">gboolean</span> *expand</code></em>,
627
<em class="parameter"><code><span class="type">gboolean</span> *fill</code></em>,
628
<em class="parameter"><code><span class="type">guint</span> *padding</code></em>,
629
<em class="parameter"><code><a class="link" href="gtk2-Standard-Enumerations.html#GtkPackType" title="enum GtkPackType"><span class="type">GtkPackType</span></a> *pack_type</code></em>);</pre>
631
Obtains information about how <em class="parameter"><code>child</code></em> is packed into <em class="parameter"><code>box</code></em>.
633
<div class="variablelist"><table border="0" class="variablelist">
635
<col align="left" valign="top">
640
<td><p><span class="term"><em class="parameter"><code>box</code></em> :</span></p></td>
641
<td>a <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a>
645
<td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td>
646
<td>the <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> of the child to query</td>
649
<td><p><span class="term"><em class="parameter"><code>expand</code></em> :</span></p></td>
650
<td>pointer to return location for <span class="type">"expand"</span> child property</td>
653
<td><p><span class="term"><em class="parameter"><code>fill</code></em> :</span></p></td>
654
<td>pointer to return location for <span class="type">"fill"</span> child property</td>
657
<td><p><span class="term"><em class="parameter"><code>padding</code></em> :</span></p></td>
658
<td>pointer to return location for <span class="type">"padding"</span> child property</td>
661
<td><p><span class="term"><em class="parameter"><code>pack_type</code></em> :</span></p></td>
662
<td>pointer to return location for <span class="type">"pack-type"</span> child property</td>
668
<div class="refsect2">
669
<a name="gtk-box-set-child-packing"></a><h3>gtk_box_set_child_packing ()</h3>
670
<pre class="programlisting"><span class="returnvalue">void</span> gtk_box_set_child_packing (<em class="parameter"><code><a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> *box</code></em>,
671
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
672
<em class="parameter"><code><span class="type">gboolean</span> expand</code></em>,
673
<em class="parameter"><code><span class="type">gboolean</span> fill</code></em>,
674
<em class="parameter"><code><span class="type">guint</span> padding</code></em>,
675
<em class="parameter"><code><a class="link" href="gtk2-Standard-Enumerations.html#GtkPackType" title="enum GtkPackType"><span class="type">GtkPackType</span></a> pack_type</code></em>);</pre>
677
Sets the way <em class="parameter"><code>child</code></em> is packed into <em class="parameter"><code>box</code></em>.
679
<div class="variablelist"><table border="0" class="variablelist">
681
<col align="left" valign="top">
686
<td><p><span class="term"><em class="parameter"><code>box</code></em> :</span></p></td>
687
<td>a <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a>
691
<td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td>
692
<td>the <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> of the child to set</td>
695
<td><p><span class="term"><em class="parameter"><code>expand</code></em> :</span></p></td>
696
<td>the new value of the <span class="type">"expand"</span> child property</td>
699
<td><p><span class="term"><em class="parameter"><code>fill</code></em> :</span></p></td>
700
<td>the new value of the <span class="type">"fill"</span> child property</td>
703
<td><p><span class="term"><em class="parameter"><code>padding</code></em> :</span></p></td>
704
<td>the new value of the <span class="type">"padding"</span> child property</td>
707
<td><p><span class="term"><em class="parameter"><code>pack_type</code></em> :</span></p></td>
708
<td>the new value of the <span class="type">"pack-type"</span> child property</td>
714
<div class="refsect1">
715
<a name="GtkBox.property-details"></a><h2>Property Details</h2>
716
<div class="refsect2">
717
<a name="GtkBox--homogeneous"></a><h3>The <code class="literal">"homogeneous"</code> property</h3>
718
<pre class="programlisting"> "homogeneous" <span class="type">gboolean</span> : Read / Write</pre>
719
<p>Whether the children should all be the same size.</p>
720
<p>Default value: FALSE</p>
723
<div class="refsect2">
724
<a name="GtkBox--spacing"></a><h3>The <code class="literal">"spacing"</code> property</h3>
725
<pre class="programlisting"> "spacing" <span class="type">gint</span> : Read / Write</pre>
726
<p>The amount of space between children.</p>
727
<p>Allowed values: >= 0</p>
728
<p>Default value: 0</p>
731
<div class="refsect1">
732
<a name="GtkBox.child-property-details"></a><h2>Child Property Details</h2>
733
<div class="refsect2">
734
<a name="GtkBox--c-expand"></a><h3>The <code class="literal">"expand"</code> child property</h3>
735
<pre class="programlisting"> "expand" <span class="type">gboolean</span> : Read / Write</pre>
736
<p>Whether the child should receive extra space when the parent grows.</p>
737
<p>Default value: TRUE</p>
740
<div class="refsect2">
741
<a name="GtkBox--c-fill"></a><h3>The <code class="literal">"fill"</code> child property</h3>
742
<pre class="programlisting"> "fill" <span class="type">gboolean</span> : Read / Write</pre>
743
<p>Whether extra space given to the child should be allocated to the child or used as padding.</p>
744
<p>Default value: TRUE</p>
747
<div class="refsect2">
748
<a name="GtkBox--c-pack-type"></a><h3>The <code class="literal">"pack-type"</code> child property</h3>
749
<pre class="programlisting"> "pack-type" <a class="link" href="gtk2-Standard-Enumerations.html#GtkPackType" title="enum GtkPackType"><span class="type">GtkPackType</span></a> : Read / Write</pre>
750
<p>A GtkPackType indicating whether the child is packed with reference to the start or end of the parent.</p>
751
<p>Default value: GTK_PACK_START</p>
754
<div class="refsect2">
755
<a name="GtkBox--c-padding"></a><h3>The <code class="literal">"padding"</code> child property</h3>
756
<pre class="programlisting"> "padding" <span class="type">guint</span> : Read / Write</pre>
757
<p>Extra space to put between the child and its neighbors, in pixels.</p>
758
<p>Allowed values: <= G_MAXINT</p>
759
<p>Default value: 0</p>
762
<div class="refsect2">
763
<a name="GtkBox--c-position"></a><h3>The <code class="literal">"position"</code> child property</h3>
764
<pre class="programlisting"> "position" <span class="type">gint</span> : Read / Write</pre>
765
<p>The index of the child in the parent.</p>
766
<p>Allowed values: >= G_MAXULONG</p>
767
<p>Default value: 0</p>
770
<div class="refsect1">
771
<a name="GtkBox.see-also"></a><h2>See Also</h2>
774
<div class="variablelist"><table border="0" class="variablelist">
776
<col align="left" valign="top">
781
<td><p><span class="term"><a class="link" href="GtkHBox.html" title="GtkHBox"><span class="type">GtkHBox</span></a></span></p></td>
782
<td><p>a derived class that organizes widgets into a row.</p></td>
785
<td><p><span class="term"><a class="link" href="GtkVBox.html" title="GtkVBox"><span class="type">GtkVBox</span></a></span></p></td>
786
<td><p>a derived class that organizes widgets into a column.</p></td>
789
<td><p><span class="term"><a class="link" href="GtkFrame.html" title="GtkFrame"><span class="type">GtkFrame</span></a></span></p></td>
790
<td><p>a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> useful for drawing a border around a GtkBox.</p></td>
793
<td><p><span class="term"><a class="link" href="GtkTable.html" title="GtkTable"><span class="type">GtkTable</span></a></span></p></td>
794
<td><p>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> for organizing widgets into a grid,
795
rather than independent rows or columns.</p></td>
798
<td><p><span class="term"><a class="link" href="GtkLayout.html" title="GtkLayout"><span class="type">GtkLayout</span></a></span></p></td>
799
<td><p>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> for organizing widgets into arbitrary
810
Generated by GTK-Doc V1.18</div>
b'\\ No newline at end of file'