1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>GtkContainer</title>
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="GtkButtonBox.html" title="GtkButtonBox">
10
<link rel="next" href="GtkItem.html" title="GtkItem">
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="GtkButtonBox.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="GtkItem.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="#GtkContainer.synopsis" class="shortcut">Top</a>
26
<a href="#GtkContainer.description" class="shortcut">Description</a>
28
<a href="#GtkContainer.object-hierarchy" class="shortcut">Object Hierarchy</a>
30
<a href="#GtkContainer.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
32
<a href="#GtkContainer.properties" class="shortcut">Properties</a>
34
<a href="#GtkContainer.signals" class="shortcut">Signals</a>
37
<div class="refentry">
38
<a name="GtkContainer"></a><div class="titlepage"></div>
39
<div class="refnamediv"><table width="100%"><tr>
41
<h2><span class="refentrytitle"><a name="GtkContainer.top_of_page"></a>GtkContainer</span></h2>
42
<p>GtkContainer — Base class for widgets which contain other widgets</p>
44
<td valign="top" align="right"></td>
46
<div class="refsynopsisdiv">
47
<a name="GtkContainer.synopsis"></a><h2>Synopsis</h2>
48
<pre class="synopsis">
49
#include <gtk/gtk.h>
51
struct <a class="link" href="GtkContainer.html#GtkContainer-struct" title="struct GtkContainer">GtkContainer</a>;
52
#define <a class="link" href="GtkContainer.html#GTK-IS-RESIZE-CONTAINER:CAPS" title="GTK_IS_RESIZE_CONTAINER()">GTK_IS_RESIZE_CONTAINER</a> (widget)
53
#define <a class="link" href="GtkContainer.html#GTK-CONTAINER-WARN-INVALID-CHILD-PROPERTY-ID:CAPS" title="GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID()">GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID</a>(object,
56
#define <a class="link" href="GtkContainer.html#gtk-container-border-width" title="gtk_container_border_width">gtk_container_border_width</a>
57
<span class="returnvalue">void</span> <a class="link" href="GtkContainer.html#gtk-container-add" title="gtk_container_add ()">gtk_container_add</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
58
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);
59
<span class="returnvalue">void</span> <a class="link" href="GtkContainer.html#gtk-container-remove" title="gtk_container_remove ()">gtk_container_remove</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
60
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);
61
<span class="returnvalue">void</span> <a class="link" href="GtkContainer.html#gtk-container-add-with-properties" title="gtk_container_add_with_properties ()">gtk_container_add_with_properties</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
62
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
63
<em class="parameter"><code>const <span class="type">gchar</span> *first_prop_name</code></em>,
64
<em class="parameter"><code>...</code></em>);
65
<a class="link" href="gtk2-Standard-Enumerations.html#GtkResizeMode" title="enum GtkResizeMode"><span class="returnvalue">GtkResizeMode</span></a> <a class="link" href="GtkContainer.html#gtk-container-get-resize-mode" title="gtk_container_get_resize_mode ()">gtk_container_get_resize_mode</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>);
66
<span class="returnvalue">void</span> <a class="link" href="GtkContainer.html#gtk-container-set-resize-mode" title="gtk_container_set_resize_mode ()">gtk_container_set_resize_mode</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
67
<em class="parameter"><code><a class="link" href="gtk2-Standard-Enumerations.html#GtkResizeMode" title="enum GtkResizeMode"><span class="type">GtkResizeMode</span></a> resize_mode</code></em>);
68
<span class="returnvalue">void</span> <a class="link" href="GtkContainer.html#gtk-container-check-resize" title="gtk_container_check_resize ()">gtk_container_check_resize</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>);
69
<span class="returnvalue">void</span> <a class="link" href="GtkContainer.html#gtk-container-foreach" title="gtk_container_foreach ()">gtk_container_foreach</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
70
<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkCallback" title="GtkCallback ()"><span class="type">GtkCallback</span></a> callback</code></em>,
71
<em class="parameter"><code><span class="type">gpointer</span> callback_data</code></em>);
72
<span class="returnvalue">void</span> <a class="link" href="GtkContainer.html#gtk-container-foreach-full" title="gtk_container_foreach_full ()">gtk_container_foreach_full</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
73
<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkCallback" title="GtkCallback ()"><span class="type">GtkCallback</span></a> callback</code></em>,
74
<em class="parameter"><code><a class="link" href="gtk2-Types.html#GtkCallbackMarshal" title="GtkCallbackMarshal ()"><span class="type">GtkCallbackMarshal</span></a> marshal</code></em>,
75
<em class="parameter"><code><span class="type">gpointer</span> callback_data</code></em>,
76
<em class="parameter"><code><span class="type">GDestroyNotify</span> notify</code></em>);
77
#define <a class="link" href="GtkContainer.html#gtk-container-children" title="gtk_container_children">gtk_container_children</a>
78
<span class="returnvalue">GList</span> * <a class="link" href="GtkContainer.html#gtk-container-get-children" title="gtk_container_get_children ()">gtk_container_get_children</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>);
79
<span class="returnvalue">void</span> <a class="link" href="GtkContainer.html#gtk-container-set-reallocate-redraws" title="gtk_container_set_reallocate_redraws ()">gtk_container_set_reallocate_redraws</a>
80
(<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
81
<em class="parameter"><code><span class="type">gboolean</span> needs_redraws</code></em>);
82
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> * <a class="link" href="GtkContainer.html#gtk-container-get-focus-child" title="gtk_container_get_focus_child ()">gtk_container_get_focus_child</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>);
83
<span class="returnvalue">void</span> <a class="link" href="GtkContainer.html#gtk-container-set-focus-child" title="gtk_container_set_focus_child ()">gtk_container_set_focus_child</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
84
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>);
85
<a class="link" href="GtkAdjustment.html" title="GtkAdjustment"><span class="returnvalue">GtkAdjustment</span></a> * <a class="link" href="GtkContainer.html#gtk-container-get-focus-vadjustment" title="gtk_container_get_focus_vadjustment ()">gtk_container_get_focus_vadjustment</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>);
86
<span class="returnvalue">void</span> <a class="link" href="GtkContainer.html#gtk-container-set-focus-vadjustment" title="gtk_container_set_focus_vadjustment ()">gtk_container_set_focus_vadjustment</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
87
<em class="parameter"><code><a class="link" href="GtkAdjustment.html" title="GtkAdjustment"><span class="type">GtkAdjustment</span></a> *adjustment</code></em>);
88
<a class="link" href="GtkAdjustment.html" title="GtkAdjustment"><span class="returnvalue">GtkAdjustment</span></a> * <a class="link" href="GtkContainer.html#gtk-container-get-focus-hadjustment" title="gtk_container_get_focus_hadjustment ()">gtk_container_get_focus_hadjustment</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>);
89
<span class="returnvalue">void</span> <a class="link" href="GtkContainer.html#gtk-container-set-focus-hadjustment" title="gtk_container_set_focus_hadjustment ()">gtk_container_set_focus_hadjustment</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
90
<em class="parameter"><code><a class="link" href="GtkAdjustment.html" title="GtkAdjustment"><span class="type">GtkAdjustment</span></a> *adjustment</code></em>);
91
<span class="returnvalue">void</span> <a class="link" href="GtkContainer.html#gtk-container-resize-children" title="gtk_container_resize_children ()">gtk_container_resize_children</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>);
92
<span class="returnvalue">GType</span> <a class="link" href="GtkContainer.html#gtk-container-child-type" title="gtk_container_child_type ()">gtk_container_child_type</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>);
93
<span class="returnvalue">void</span> <a class="link" href="GtkContainer.html#gtk-container-child-get" title="gtk_container_child_get ()">gtk_container_child_get</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
94
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
95
<em class="parameter"><code>const <span class="type">gchar</span> *first_prop_name</code></em>,
96
<em class="parameter"><code>...</code></em>);
97
<span class="returnvalue">void</span> <a class="link" href="GtkContainer.html#gtk-container-child-set" title="gtk_container_child_set ()">gtk_container_child_set</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
98
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
99
<em class="parameter"><code>const <span class="type">gchar</span> *first_prop_name</code></em>,
100
<em class="parameter"><code>...</code></em>);
101
<span class="returnvalue">void</span> <a class="link" href="GtkContainer.html#gtk-container-child-get-property" title="gtk_container_child_get_property ()">gtk_container_child_get_property</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
102
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
103
<em class="parameter"><code>const <span class="type">gchar</span> *property_name</code></em>,
104
<em class="parameter"><code><span class="type">GValue</span> *value</code></em>);
105
<span class="returnvalue">void</span> <a class="link" href="GtkContainer.html#gtk-container-child-set-property" title="gtk_container_child_set_property ()">gtk_container_child_set_property</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
106
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
107
<em class="parameter"><code>const <span class="type">gchar</span> *property_name</code></em>,
108
<em class="parameter"><code>const <span class="type">GValue</span> *value</code></em>);
109
<span class="returnvalue">void</span> <a class="link" href="GtkContainer.html#gtk-container-child-get-valist" title="gtk_container_child_get_valist ()">gtk_container_child_get_valist</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
110
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
111
<em class="parameter"><code>const <span class="type">gchar</span> *first_property_name</code></em>,
112
<em class="parameter"><code><span class="type">va_list</span> var_args</code></em>);
113
<span class="returnvalue">void</span> <a class="link" href="GtkContainer.html#gtk-container-child-set-valist" title="gtk_container_child_set_valist ()">gtk_container_child_set_valist</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
114
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
115
<em class="parameter"><code>const <span class="type">gchar</span> *first_property_name</code></em>,
116
<em class="parameter"><code><span class="type">va_list</span> var_args</code></em>);
117
<span class="returnvalue">void</span> <a class="link" href="GtkContainer.html#gtk-container-forall" title="gtk_container_forall ()">gtk_container_forall</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
118
<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkCallback" title="GtkCallback ()"><span class="type">GtkCallback</span></a> callback</code></em>,
119
<em class="parameter"><code><span class="type">gpointer</span> callback_data</code></em>);
120
<span class="returnvalue">guint</span> <a class="link" href="GtkContainer.html#gtk-container-get-border-width" title="gtk_container_get_border_width ()">gtk_container_get_border_width</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>);
121
<span class="returnvalue">void</span> <a class="link" href="GtkContainer.html#gtk-container-set-border-width" title="gtk_container_set_border_width ()">gtk_container_set_border_width</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
122
<em class="parameter"><code><span class="type">guint</span> border_width</code></em>);
123
<span class="returnvalue">void</span> <a class="link" href="GtkContainer.html#gtk-container-propagate-expose" title="gtk_container_propagate_expose ()">gtk_container_propagate_expose</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
124
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
125
<em class="parameter"><code><a href="../gdk2/gdk2-Event-Structures.html#GdkEventExpose"><span class="type">GdkEventExpose</span></a> *event</code></em>);
126
<span class="returnvalue">gboolean</span> <a class="link" href="GtkContainer.html#gtk-container-get-focus-chain" title="gtk_container_get_focus_chain ()">gtk_container_get_focus_chain</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
127
<em class="parameter"><code><span class="type">GList</span> **focusable_widgets</code></em>);
128
<span class="returnvalue">void</span> <a class="link" href="GtkContainer.html#gtk-container-set-focus-chain" title="gtk_container_set_focus_chain ()">gtk_container_set_focus_chain</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
129
<em class="parameter"><code><span class="type">GList</span> *focusable_widgets</code></em>);
130
<span class="returnvalue">void</span> <a class="link" href="GtkContainer.html#gtk-container-unset-focus-chain" title="gtk_container_unset_focus_chain ()">gtk_container_unset_focus_chain</a> (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>);
131
<span class="returnvalue">GParamSpec</span> * <a class="link" href="GtkContainer.html#gtk-container-class-find-child-property" title="gtk_container_class_find_child_property ()">gtk_container_class_find_child_property</a>
132
(<em class="parameter"><code><span class="type">GObjectClass</span> *cclass</code></em>,
133
<em class="parameter"><code>const <span class="type">gchar</span> *property_name</code></em>);
134
<span class="returnvalue">void</span> <a class="link" href="GtkContainer.html#gtk-container-class-install-child-property" title="gtk_container_class_install_child_property ()">gtk_container_class_install_child_property</a>
135
(<em class="parameter"><code><span class="type">GtkContainerClass</span> *cclass</code></em>,
136
<em class="parameter"><code><span class="type">guint</span> property_id</code></em>,
137
<em class="parameter"><code><span class="type">GParamSpec</span> *pspec</code></em>);
138
<span class="returnvalue">GParamSpec</span> ** <a class="link" href="GtkContainer.html#gtk-container-class-list-child-properties" title="gtk_container_class_list_child_properties ()">gtk_container_class_list_child_properties</a>
139
(<em class="parameter"><code><span class="type">GObjectClass</span> *cclass</code></em>,
140
<em class="parameter"><code><span class="type">guint</span> *n_properties</code></em>);
143
<div class="refsect1">
144
<a name="GtkContainer.object-hierarchy"></a><h2>Object Hierarchy</h2>
145
<pre class="synopsis">
147
+----GInitiallyUnowned
148
+----<a class="link" href="GtkObject.html" title="GtkObject">GtkObject</a>
149
+----<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
151
+----<a class="link" href="GtkBin.html" title="GtkBin">GtkBin</a>
152
+----<a class="link" href="GtkBox.html" title="GtkBox">GtkBox</a>
153
+----<a class="link" href="GtkCList.html" title="GtkCList">GtkCList</a>
154
+----<a class="link" href="GtkFixed.html" title="GtkFixed">GtkFixed</a>
155
+----<a class="link" href="GtkPaned.html" title="GtkPaned">GtkPaned</a>
156
+----<a class="link" href="GtkIconView.html" title="GtkIconView">GtkIconView</a>
157
+----<a class="link" href="GtkLayout.html" title="GtkLayout">GtkLayout</a>
158
+----<a class="link" href="GtkList.html" title="GtkList">GtkList</a>
159
+----<a class="link" href="GtkMenuShell.html" title="GtkMenuShell">GtkMenuShell</a>
160
+----<a class="link" href="GtkNotebook.html" title="GtkNotebook">GtkNotebook</a>
161
+----<a class="link" href="GtkSocket.html" title="GtkSocket">GtkSocket</a>
162
+----<a class="link" href="GtkTable.html" title="GtkTable">GtkTable</a>
163
+----<a class="link" href="GtkTextView.html" title="GtkTextView">GtkTextView</a>
164
+----<a class="link" href="GtkToolbar.html" title="GtkToolbar">GtkToolbar</a>
165
+----<a class="link" href="GtkToolItemGroup.html" title="GtkToolItemGroup">GtkToolItemGroup</a>
166
+----<a class="link" href="GtkToolPalette.html" title="GtkToolPalette">GtkToolPalette</a>
167
+----<a class="link" href="GtkTree.html" title="GtkTree">GtkTree</a>
168
+----<a class="link" href="GtkTreeView.html" title="GtkTreeView">GtkTreeView</a>
171
<div class="refsect1">
172
<a name="GtkContainer.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
174
GtkContainer implements
175
AtkImplementorIface and <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a>.</p>
177
<div class="refsect1">
178
<a name="GtkContainer.properties"></a><h2>Properties</h2>
179
<pre class="synopsis">
180
"<a class="link" href="GtkContainer.html#GtkContainer--border-width" title='The "border-width" property'>border-width</a>" <span class="type">guint</span> : Read / Write
181
"<a class="link" href="GtkContainer.html#GtkContainer--child" title='The "child" property'>child</a>" <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>* : Write
182
"<a class="link" href="GtkContainer.html#GtkContainer--resize-mode" title='The "resize-mode" property'>resize-mode</a>" <a class="link" href="gtk2-Standard-Enumerations.html#GtkResizeMode" title="enum GtkResizeMode"><span class="type">GtkResizeMode</span></a> : Read / Write
185
<div class="refsect1">
186
<a name="GtkContainer.signals"></a><h2>Signals</h2>
187
<pre class="synopsis">
188
"<a class="link" href="GtkContainer.html#GtkContainer-add" title='The "add" signal'>add</a>" : <code class="literal">Run First</code>
189
"<a class="link" href="GtkContainer.html#GtkContainer-check-resize" title='The "check-resize" signal'>check-resize</a>" : <code class="literal">Run Last</code>
190
"<a class="link" href="GtkContainer.html#GtkContainer-remove" title='The "remove" signal'>remove</a>" : <code class="literal">Run First</code>
191
"<a class="link" href="GtkContainer.html#GtkContainer-set-focus-child" title='The "set-focus-child" signal'>set-focus-child</a>" : <code class="literal">Run First</code>
194
<div class="refsect1">
195
<a name="GtkContainer.description"></a><h2>Description</h2>
197
A GTK+ user interface is constructed by nesting widgets inside widgets.
198
Container widgets are the inner nodes in the resulting tree of widgets:
199
they contain other widgets. So, for example, you might have a <a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a>
200
containing a <a class="link" href="GtkFrame.html" title="GtkFrame"><span class="type">GtkFrame</span></a> containing a GtkLabel. If you wanted an image instead
201
of a textual label inside the frame, you might replace the <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> widget
202
with a <a class="link" href="GtkImage.html" title="GtkImage"><span class="type">GtkImage</span></a> widget.
205
There are two major kinds of container widgets in GTK+. Both are subclasses
206
of the abstract <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> base class.
209
The first type of container widget has a single child widget and derives
210
from <a class="link" href="GtkBin.html" title="GtkBin"><span class="type">GtkBin</span></a>. These containers are <em class="firstterm">decorators</em>, which
211
add some kind of functionality to the child. For example, a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a> makes
212
its child into a clickable button; a <a class="link" href="GtkFrame.html" title="GtkFrame"><span class="type">GtkFrame</span></a> draws a frame around its child
213
and a <a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a> places its child widget inside a top-level window.
216
The second type of container can have more than one child; its purpose is to
217
manage <em class="firstterm">layout</em>. This means that these containers assign
218
sizes and positions to their children. For example, a <a class="link" href="GtkHBox.html" title="GtkHBox"><span class="type">GtkHBox</span></a> arranges its
219
children in a horizontal row, and a <a class="link" href="GtkTable.html" title="GtkTable"><span class="type">GtkTable</span></a> arranges the widgets it contains
220
in a two-dimensional grid.
223
To fulfill its task, a layout container must negotiate the size requirements
224
with its parent and its children. This negotiation is carried out in two
225
phases, <em class="firstterm">size requisition</em> and <em class="firstterm">size
228
<div class="refsect2">
229
<a name="size-requisition"></a><h3>Size Requisition</h3>
231
The size requisition of a widget is it's desired width and height.
232
This is represented by a <a class="link" href="GtkWidget.html#GtkRequisition"><span class="type">GtkRequisition</span></a>.
235
How a widget determines its desired size depends on the widget.
236
A <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a>, for example, requests enough space to display all its text.
237
Container widgets generally base their size request on the requisitions
241
The size requisition phase of the widget layout process operates top-down.
242
It starts at a top-level widget, typically a <a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a>. The top-level widget
243
asks its child for its size requisition by calling <a class="link" href="GtkWidget.html#gtk-widget-size-request" title="gtk_widget_size_request ()"><code class="function">gtk_widget_size_request()</code></a>.
244
To determine its requisition, the child asks its own children for their
245
requisitions and so on. Finally, the top-level widget will get a requisition
250
<div class="refsect2">
251
<a name="size-allocation"></a><h3>Size Allocation</h3>
253
When the top-level widget has determined how much space its child would like
254
to have, the second phase of the size negotiation, size allocation, begins.
255
Depending on its configuration (see <a class="link" href="GtkWindow.html#gtk-window-set-resizable" title="gtk_window_set_resizable ()"><code class="function">gtk_window_set_resizable()</code></a>), the top-level
256
widget may be able to expand in order to satisfy the size request or it may
257
have to ignore the size request and keep its fixed size. It then tells its
258
child widget how much space it gets by calling <a class="link" href="GtkWidget.html#gtk-widget-size-allocate" title="gtk_widget_size_allocate ()"><code class="function">gtk_widget_size_allocate()</code></a>.
259
The child widget divides the space among its children and tells each child
260
how much space it got, and so on. Under normal circumstances, a <a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a>
261
will always give its child the amount of space the child requested.
264
A child's size allocation is represented by a <a class="link" href="GtkWidget.html#GtkAllocation" title="GtkAllocation"><span class="type">GtkAllocation</span></a>. This struct
265
contains not only a width and height, but also a position (i.e. X and Y
266
coordinates), so that containers can tell their children not only how much
267
space they have gotten, but also where they are positioned inside the space
268
available to the container.
271
Widgets are required to honor the size allocation they receive; a size
272
request is only a request, and widgets must be able to cope with any size.
276
<div class="refsect2">
277
<a name="child-properties"></a><h3>Child properties</h3>
279
<span class="structname">GtkContainer</span> introduces <em class="firstterm">child
280
properties</em> - these are object properties that are not specific
281
to either the container or the contained widget, but rather to their relation.
282
Typical examples of child properties are the position or pack-type of a widget
283
which is contained in a <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a>.</p>
285
Use <a class="link" href="GtkContainer.html#gtk-container-class-install-child-property" title="gtk_container_class_install_child_property ()"><code class="function">gtk_container_class_install_child_property()</code></a> to install child properties
286
for a container class and <a class="link" href="GtkContainer.html#gtk-container-class-find-child-property" title="gtk_container_class_find_child_property ()"><code class="function">gtk_container_class_find_child_property()</code></a> or
287
<a class="link" href="GtkContainer.html#gtk-container-class-list-child-properties" title="gtk_container_class_list_child_properties ()"><code class="function">gtk_container_class_list_child_properties()</code></a> to get information about existing
291
To set the value of a child property, use <a class="link" href="GtkContainer.html#gtk-container-child-set-property" title="gtk_container_child_set_property ()"><code class="function">gtk_container_child_set_property()</code></a>,
292
<a class="link" href="GtkContainer.html#gtk-container-child-set" title="gtk_container_child_set ()"><code class="function">gtk_container_child_set()</code></a> or <a class="link" href="GtkContainer.html#gtk-container-child-set-valist" title="gtk_container_child_set_valist ()"><code class="function">gtk_container_child_set_valist()</code></a>.
293
To obtain the value of a child property, use
294
<a class="link" href="GtkContainer.html#gtk-container-child-get-property" title="gtk_container_child_get_property ()"><code class="function">gtk_container_child_get_property()</code></a>, <a class="link" href="GtkContainer.html#gtk-container-child-get" title="gtk_container_child_get ()"><code class="function">gtk_container_child_get()</code></a> or
295
<a class="link" href="GtkContainer.html#gtk-container-child-get-valist" title="gtk_container_child_get_valist ()"><code class="function">gtk_container_child_get_valist()</code></a>. To emit notification about child property
296
changes, use <a class="link" href="GtkWidget.html#gtk-widget-child-notify" title="gtk_widget_child_notify ()"><code class="function">gtk_widget_child_notify()</code></a>.
300
<div class="refsect2">
301
<a name="GtkContainer-BUILDER-UI"></a><h3>GtkContainer as GtkBuildable</h3>
303
The GtkContainer implementation of the GtkBuildable interface
304
supports a <packing> element for children, which can
305
contain multiple <property> elements that specify
306
child properties for the child.
308
<div class="example">
309
<a name="idp102135408"></a><p class="title"><b>Example 55. Child properties in UI definitions</b></p>
310
<div class="example-contents">
311
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
314
<td class="listing_lines" align="right"><pre>1
322
<td class="listing_code"><pre class="programlisting"><span class="symbol"><</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkVBox"</span><span class="symbol">></span>
323
<span class="normal"> </span><span class="symbol"><</span><span class="normal">child</span><span class="symbol">></span>
324
<span class="normal"> </span><span class="symbol"><</span><span class="usertype">object</span><span class="normal"> class</span><span class="symbol">=</span><span class="string">"GtkLabel"</span><span class="symbol">/></span>
325
<span class="normal"> </span><span class="symbol"><</span><span class="normal">packing</span><span class="symbol">></span>
326
<span class="normal"> </span><span class="symbol"><</span><span class="usertype">property</span><span class="normal"> name</span><span class="symbol">=</span><span class="string">"pack-type"</span><span class="symbol">></span><span class="normal">start</span><span class="symbol"></</span><span class="normal">property</span><span class="symbol">></span>
327
<span class="normal"> </span><span class="symbol"></</span><span class="normal">packing</span><span class="symbol">></span>
328
<span class="normal"> </span><span class="symbol"></</span><span class="normal">child</span><span class="symbol">></span>
329
<span class="symbol"></</span><span class="normal">object</span><span class="symbol">></span></pre></td>
336
<br class="example-break"><p>
337
Since 2.16, child properties can also be marked as translatable using
338
the same "translatable", "comments" and "context" attributes that are used
339
for regular properties.
343
<div class="refsect1">
344
<a name="GtkContainer.details"></a><h2>Details</h2>
345
<div class="refsect2">
346
<a name="GtkContainer-struct"></a><h3>struct GtkContainer</h3>
347
<pre class="programlisting">struct GtkContainer;</pre>
352
<div class="refsect2">
353
<a name="GTK-IS-RESIZE-CONTAINER:CAPS"></a><h3>GTK_IS_RESIZE_CONTAINER()</h3>
354
<pre class="programlisting">#define GTK_IS_RESIZE_CONTAINER(widget) (GTK_IS_CONTAINER (widget) && ((GtkContainer*) (widget))->resize_mode != GTK_RESIZE_PARENT)
360
<div class="refsect2">
361
<a name="GTK-CONTAINER-WARN-INVALID-CHILD-PROPERTY-ID:CAPS"></a><h3>GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID()</h3>
362
<pre class="programlisting">#define GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID(object, property_id, pspec)</pre>
364
This macro should be used to emit a standard warning about unexpected
365
properties in <code class="function">set_child_property()</code> and <code class="function">get_child_property()</code> implementations.
367
<div class="variablelist"><table border="0" class="variablelist">
369
<col align="left" valign="top">
374
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
375
<td>the <span class="type">GObject</span> on which <code class="function">set_child_property()</code> or <code class="function">get_child_property()</code>
379
<td><p><span class="term"><em class="parameter"><code>property_id</code></em> :</span></p></td>
380
<td>the numeric id of the property</td>
383
<td><p><span class="term"><em class="parameter"><code>pspec</code></em> :</span></p></td>
384
<td>the <span class="type">GParamSpec</span> of the property</td>
390
<div class="refsect2">
391
<a name="gtk-container-border-width"></a><h3>gtk_container_border_width</h3>
392
<pre class="programlisting">#define gtk_container_border_width gtk_container_set_border_width
394
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
395
<h3 class="title">Warning</h3>
396
<p><code class="literal">gtk_container_border_width</code> is deprecated and should not be used in newly-written code. Use <a class="link" href="GtkContainer.html#gtk-container-set-border-width" title="gtk_container_set_border_width ()"><code class="function">gtk_container_set_border_width()</code></a> instead.</p>
399
Does the same as <a class="link" href="GtkContainer.html#gtk-container-set-border-width" title="gtk_container_set_border_width ()"><code class="function">gtk_container_set_border_width()</code></a>.
403
<div class="refsect2">
404
<a name="gtk-container-add"></a><h3>gtk_container_add ()</h3>
405
<pre class="programlisting"><span class="returnvalue">void</span> gtk_container_add (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
406
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
408
Adds <em class="parameter"><code>widget</code></em> to <em class="parameter"><code>container</code></em>. Typically used for simple containers
409
such as <a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a>, <a class="link" href="GtkFrame.html" title="GtkFrame"><span class="type">GtkFrame</span></a>, or <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a>; for more complicated
410
layout containers such as <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> or <a class="link" href="GtkTable.html" title="GtkTable"><span class="type">GtkTable</span></a>, this function will
411
pick default packing parameters that may not be correct. So
412
consider functions such as <a class="link" href="GtkBox.html#gtk-box-pack-start" title="gtk_box_pack_start ()"><code class="function">gtk_box_pack_start()</code></a> and
413
<a class="link" href="GtkTable.html#gtk-table-attach" title="gtk_table_attach ()"><code class="function">gtk_table_attach()</code></a> as an alternative to <a class="link" href="GtkContainer.html#gtk-container-add" title="gtk_container_add ()"><code class="function">gtk_container_add()</code></a> in
414
those cases. A widget may be added to only one container at a time;
415
you can't place the same widget inside two different containers.
417
<div class="variablelist"><table border="0" class="variablelist">
419
<col align="left" valign="top">
424
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
425
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
429
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
430
<td>a widget to be placed inside <em class="parameter"><code>container</code></em>
437
<div class="refsect2">
438
<a name="gtk-container-remove"></a><h3>gtk_container_remove ()</h3>
439
<pre class="programlisting"><span class="returnvalue">void</span> gtk_container_remove (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
440
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
442
Removes <em class="parameter"><code>widget</code></em> from <em class="parameter"><code>container</code></em>. <em class="parameter"><code>widget</code></em> must be inside <em class="parameter"><code>container</code></em>.
443
Note that <em class="parameter"><code>container</code></em> will own a reference to <em class="parameter"><code>widget</code></em>, and that this
444
may be the last reference held; so removing a widget from its
445
container can destroy that widget. If you want to use <em class="parameter"><code>widget</code></em>
446
again, you need to add a reference to it while it's not inside
447
a container, using <code class="function">g_object_ref()</code>. If you don't want to use <em class="parameter"><code>widget</code></em>
448
again it's usually more efficient to simply destroy it directly
449
using <a class="link" href="GtkWidget.html#gtk-widget-destroy" title="gtk_widget_destroy ()"><code class="function">gtk_widget_destroy()</code></a> since this will remove it from the
450
container and help break any circular reference count cycles.
452
<div class="variablelist"><table border="0" class="variablelist">
454
<col align="left" valign="top">
459
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
460
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
464
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
465
<td>a current child of <em class="parameter"><code>container</code></em>
472
<div class="refsect2">
473
<a name="gtk-container-add-with-properties"></a><h3>gtk_container_add_with_properties ()</h3>
474
<pre class="programlisting"><span class="returnvalue">void</span> gtk_container_add_with_properties (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
475
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget</code></em>,
476
<em class="parameter"><code>const <span class="type">gchar</span> *first_prop_name</code></em>,
477
<em class="parameter"><code>...</code></em>);</pre>
479
Adds <em class="parameter"><code>widget</code></em> to <em class="parameter"><code>container</code></em>, setting child properties at the same time.
480
See <a class="link" href="GtkContainer.html#gtk-container-add" title="gtk_container_add ()"><code class="function">gtk_container_add()</code></a> and <a class="link" href="GtkContainer.html#gtk-container-child-set" title="gtk_container_child_set ()"><code class="function">gtk_container_child_set()</code></a> for more details.
482
<div class="variablelist"><table border="0" class="variablelist">
484
<col align="left" valign="top">
489
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
490
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
494
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
495
<td>a widget to be placed inside <em class="parameter"><code>container</code></em>
499
<td><p><span class="term"><em class="parameter"><code>first_prop_name</code></em> :</span></p></td>
500
<td>the name of the first child property to set</td>
506
<div class="refsect2">
507
<a name="gtk-container-get-resize-mode"></a><h3>gtk_container_get_resize_mode ()</h3>
508
<pre class="programlisting"><a class="link" href="gtk2-Standard-Enumerations.html#GtkResizeMode" title="enum GtkResizeMode"><span class="returnvalue">GtkResizeMode</span></a> gtk_container_get_resize_mode (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>);</pre>
510
Returns the resize mode for the container. See
511
<a class="link" href="GtkContainer.html#gtk-container-set-resize-mode" title="gtk_container_set_resize_mode ()"><code class="function">gtk_container_set_resize_mode()</code></a>.
513
<div class="variablelist"><table border="0" class="variablelist">
515
<col align="left" valign="top">
520
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
521
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
525
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
526
<td>the current resize mode</td>
532
<div class="refsect2">
533
<a name="gtk-container-set-resize-mode"></a><h3>gtk_container_set_resize_mode ()</h3>
534
<pre class="programlisting"><span class="returnvalue">void</span> gtk_container_set_resize_mode (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
535
<em class="parameter"><code><a class="link" href="gtk2-Standard-Enumerations.html#GtkResizeMode" title="enum GtkResizeMode"><span class="type">GtkResizeMode</span></a> resize_mode</code></em>);</pre>
537
Sets the resize mode for the container.
540
The resize mode of a container determines whether a resize request
541
will be passed to the container's parent, queued for later execution
542
or executed immediately.
544
<div class="variablelist"><table border="0" class="variablelist">
546
<col align="left" valign="top">
551
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
552
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
556
<td><p><span class="term"><em class="parameter"><code>resize_mode</code></em> :</span></p></td>
557
<td>the new resize mode</td>
563
<div class="refsect2">
564
<a name="gtk-container-check-resize"></a><h3>gtk_container_check_resize ()</h3>
565
<pre class="programlisting"><span class="returnvalue">void</span> gtk_container_check_resize (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>);</pre>
570
<div class="refsect2">
571
<a name="gtk-container-foreach"></a><h3>gtk_container_foreach ()</h3>
572
<pre class="programlisting"><span class="returnvalue">void</span> gtk_container_foreach (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
573
<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkCallback" title="GtkCallback ()"><span class="type">GtkCallback</span></a> callback</code></em>,
574
<em class="parameter"><code><span class="type">gpointer</span> callback_data</code></em>);</pre>
576
Invokes <em class="parameter"><code>callback</code></em> on each non-internal child of <em class="parameter"><code>container</code></em>. See
577
<a class="link" href="GtkContainer.html#gtk-container-forall" title="gtk_container_forall ()"><code class="function">gtk_container_forall()</code></a> for details on what constitutes an
578
"internal" child. Most applications should use
579
<a class="link" href="GtkContainer.html#gtk-container-foreach" title="gtk_container_foreach ()"><code class="function">gtk_container_foreach()</code></a>, rather than <a class="link" href="GtkContainer.html#gtk-container-forall" title="gtk_container_forall ()"><code class="function">gtk_container_forall()</code></a>.
581
<div class="variablelist"><table border="0" class="variablelist">
583
<col align="left" valign="top">
588
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
589
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
593
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
594
<td>a callback. <span class="annotation">[<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span>
598
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
599
<td>callback user data</td>
605
<div class="refsect2">
606
<a name="gtk-container-foreach-full"></a><h3>gtk_container_foreach_full ()</h3>
607
<pre class="programlisting"><span class="returnvalue">void</span> gtk_container_foreach_full (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
608
<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkCallback" title="GtkCallback ()"><span class="type">GtkCallback</span></a> callback</code></em>,
609
<em class="parameter"><code><a class="link" href="gtk2-Types.html#GtkCallbackMarshal" title="GtkCallbackMarshal ()"><span class="type">GtkCallbackMarshal</span></a> marshal</code></em>,
610
<em class="parameter"><code><span class="type">gpointer</span> callback_data</code></em>,
611
<em class="parameter"><code><span class="type">GDestroyNotify</span> notify</code></em>);</pre>
612
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
613
<h3 class="title">Warning</h3>
614
<p><code class="literal">gtk_container_foreach_full</code> is deprecated and should not be used in newly-written code. Use <a class="link" href="GtkContainer.html#gtk-container-foreach" title="gtk_container_foreach ()"><code class="function">gtk_container_foreach()</code></a> instead.</p>
620
<div class="refsect2">
621
<a name="gtk-container-children"></a><h3>gtk_container_children</h3>
622
<pre class="programlisting">#define gtk_container_children gtk_container_get_children
624
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
625
<h3 class="title">Warning</h3>
626
<p><code class="literal">gtk_container_children</code> is deprecated 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>
629
Does the same as <a class="link" href="GtkContainer.html#gtk-container-get-children" title="gtk_container_get_children ()"><code class="function">gtk_container_get_children()</code></a>.
633
<div class="refsect2">
634
<a name="gtk-container-get-children"></a><h3>gtk_container_get_children ()</h3>
635
<pre class="programlisting"><span class="returnvalue">GList</span> * gtk_container_get_children (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>);</pre>
637
Returns the container's non-internal children. See
638
<a class="link" href="GtkContainer.html#gtk-container-forall" title="gtk_container_forall ()"><code class="function">gtk_container_forall()</code></a> for details on what constitutes an "internal" child.
640
<div class="variablelist"><table border="0" class="variablelist">
642
<col align="left" valign="top">
647
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
648
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
652
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
653
<td>a newly-allocated list of the container's non-internal children. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GtkWidget][<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span>
660
<div class="refsect2">
661
<a name="gtk-container-set-reallocate-redraws"></a><h3>gtk_container_set_reallocate_redraws ()</h3>
662
<pre class="programlisting"><span class="returnvalue">void</span> gtk_container_set_reallocate_redraws
663
(<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
664
<em class="parameter"><code><span class="type">gboolean</span> needs_redraws</code></em>);</pre>
666
Sets the <em class="parameter"><code>reallocate_redraws</code></em> flag of the container to the given value.
669
Containers requesting reallocation redraws get automatically
670
redrawn if any of their children changed allocation.
672
<div class="variablelist"><table border="0" class="variablelist">
674
<col align="left" valign="top">
679
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
680
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
684
<td><p><span class="term"><em class="parameter"><code>needs_redraws</code></em> :</span></p></td>
685
<td>the new value for the container's <em class="parameter"><code>reallocate_redraws</code></em> flag</td>
691
<div class="refsect2">
692
<a name="gtk-container-get-focus-child"></a><h3>gtk_container_get_focus_child ()</h3>
693
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> * gtk_container_get_focus_child (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>);</pre>
695
Returns the current focus child widget inside <em class="parameter"><code>container</code></em>. This is not the
696
currently focused widget. That can be obtained by calling
697
<a class="link" href="GtkWindow.html#gtk-window-get-focus" title="gtk_window_get_focus ()"><code class="function">gtk_window_get_focus()</code></a>.
699
<div class="variablelist"><table border="0" class="variablelist">
701
<col align="left" valign="top">
706
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
707
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
711
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
712
<td>The child widget which will receive the
713
focus inside <em class="parameter"><code>container</code></em> when the <em class="parameter"><code>conatiner</code></em> is focussed,
714
or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if none is set. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
719
<p class="since">Since 2.14</p>
722
<div class="refsect2">
723
<a name="gtk-container-set-focus-child"></a><h3>gtk_container_set_focus_child ()</h3>
724
<pre class="programlisting"><span class="returnvalue">void</span> gtk_container_set_focus_child (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
725
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>);</pre>
727
Sets, or unsets if <em class="parameter"><code>child</code></em> is <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, the focused child of <em class="parameter"><code>container</code></em>.
730
This function emits the GtkContainer::set_focus_child signal of
731
<em class="parameter"><code>container</code></em>. Implementations of <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> can override the
732
default behaviour by overriding the class closure of this signal.
735
This is function is mostly meant to be used by widgets. Applications can use
736
<a class="link" href="GtkWidget.html#gtk-widget-grab-focus" title="gtk_widget_grab_focus ()"><code class="function">gtk_widget_grab_focus()</code></a> to manualy set the focus to a specific widget.
738
<div class="variablelist"><table border="0" class="variablelist">
740
<col align="left" valign="top">
745
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
746
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
750
<td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td>
751
<td>a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
758
<div class="refsect2">
759
<a name="gtk-container-get-focus-vadjustment"></a><h3>gtk_container_get_focus_vadjustment ()</h3>
760
<pre class="programlisting"><a class="link" href="GtkAdjustment.html" title="GtkAdjustment"><span class="returnvalue">GtkAdjustment</span></a> * gtk_container_get_focus_vadjustment (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>);</pre>
762
Retrieves the vertical focus adjustment for the container. See
763
<a class="link" href="GtkContainer.html#gtk-container-set-focus-vadjustment" title="gtk_container_set_focus_vadjustment ()"><code class="function">gtk_container_set_focus_vadjustment()</code></a>.
765
<div class="variablelist"><table border="0" class="variablelist">
767
<col align="left" valign="top">
772
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
773
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
777
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
778
<td>the vertical focus adjustment, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if
779
none has been set. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
786
<div class="refsect2">
787
<a name="gtk-container-set-focus-vadjustment"></a><h3>gtk_container_set_focus_vadjustment ()</h3>
788
<pre class="programlisting"><span class="returnvalue">void</span> gtk_container_set_focus_vadjustment (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
789
<em class="parameter"><code><a class="link" href="GtkAdjustment.html" title="GtkAdjustment"><span class="type">GtkAdjustment</span></a> *adjustment</code></em>);</pre>
791
Hooks up an adjustment to focus handling in a container, so when a
792
child of the container is focused, the adjustment is scrolled to
793
show that widget. This function sets the vertical alignment. See
794
<a class="link" href="GtkScrolledWindow.html#gtk-scrolled-window-get-vadjustment" title="gtk_scrolled_window_get_vadjustment ()"><code class="function">gtk_scrolled_window_get_vadjustment()</code></a> for a typical way of obtaining
795
the adjustment and <a class="link" href="GtkContainer.html#gtk-container-set-focus-hadjustment" title="gtk_container_set_focus_hadjustment ()"><code class="function">gtk_container_set_focus_hadjustment()</code></a> for setting
796
the horizontal adjustment.
799
The adjustments have to be in pixel units and in the same coordinate
800
system as the allocation for immediate children of the container.
802
<div class="variablelist"><table border="0" class="variablelist">
804
<col align="left" valign="top">
809
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
810
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
814
<td><p><span class="term"><em class="parameter"><code>adjustment</code></em> :</span></p></td>
815
<td>an adjustment which should be adjusted when the focus
816
is moved among the descendents of <em class="parameter"><code>container</code></em>
823
<div class="refsect2">
824
<a name="gtk-container-get-focus-hadjustment"></a><h3>gtk_container_get_focus_hadjustment ()</h3>
825
<pre class="programlisting"><a class="link" href="GtkAdjustment.html" title="GtkAdjustment"><span class="returnvalue">GtkAdjustment</span></a> * gtk_container_get_focus_hadjustment (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>);</pre>
827
Retrieves the horizontal focus adjustment for the container. See
828
<a class="link" href="GtkContainer.html#gtk-container-set-focus-hadjustment" title="gtk_container_set_focus_hadjustment ()"><code class="function">gtk_container_set_focus_hadjustment()</code></a>.
830
<div class="variablelist"><table border="0" class="variablelist">
832
<col align="left" valign="top">
837
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
838
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
842
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
843
<td>the horizontal focus adjustment, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if
844
none has been set. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
851
<div class="refsect2">
852
<a name="gtk-container-set-focus-hadjustment"></a><h3>gtk_container_set_focus_hadjustment ()</h3>
853
<pre class="programlisting"><span class="returnvalue">void</span> gtk_container_set_focus_hadjustment (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
854
<em class="parameter"><code><a class="link" href="GtkAdjustment.html" title="GtkAdjustment"><span class="type">GtkAdjustment</span></a> *adjustment</code></em>);</pre>
856
Hooks up an adjustment to focus handling in a container, so when a child
857
of the container is focused, the adjustment is scrolled to show that
858
widget. This function sets the horizontal alignment.
859
See <a class="link" href="GtkScrolledWindow.html#gtk-scrolled-window-get-hadjustment" title="gtk_scrolled_window_get_hadjustment ()"><code class="function">gtk_scrolled_window_get_hadjustment()</code></a> for a typical way of obtaining
860
the adjustment and <a class="link" href="GtkContainer.html#gtk-container-set-focus-vadjustment" title="gtk_container_set_focus_vadjustment ()"><code class="function">gtk_container_set_focus_vadjustment()</code></a> for setting
861
the vertical adjustment.
864
The adjustments have to be in pixel units and in the same coordinate
865
system as the allocation for immediate children of the container.
867
<div class="variablelist"><table border="0" class="variablelist">
869
<col align="left" valign="top">
874
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
875
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
879
<td><p><span class="term"><em class="parameter"><code>adjustment</code></em> :</span></p></td>
880
<td>an adjustment which should be adjusted when the focus is
881
moved among the descendents of <em class="parameter"><code>container</code></em>
888
<div class="refsect2">
889
<a name="gtk-container-resize-children"></a><h3>gtk_container_resize_children ()</h3>
890
<pre class="programlisting"><span class="returnvalue">void</span> gtk_container_resize_children (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>);</pre>
895
<div class="refsect2">
896
<a name="gtk-container-child-type"></a><h3>gtk_container_child_type ()</h3>
897
<pre class="programlisting"><span class="returnvalue">GType</span> gtk_container_child_type (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>);</pre>
899
Returns the type of the children supported by the container.
902
Note that this may return <code class="literal">G_TYPE_NONE</code> to indicate that no more
903
children can be added, e.g. for a <a class="link" href="GtkPaned.html" title="GtkPaned"><span class="type">GtkPaned</span></a> which already has two
906
<div class="variablelist"><table border="0" class="variablelist">
908
<col align="left" valign="top">
913
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
914
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
918
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
919
<td>a <span class="type">GType</span>.</td>
925
<div class="refsect2">
926
<a name="gtk-container-child-get"></a><h3>gtk_container_child_get ()</h3>
927
<pre class="programlisting"><span class="returnvalue">void</span> gtk_container_child_get (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
928
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
929
<em class="parameter"><code>const <span class="type">gchar</span> *first_prop_name</code></em>,
930
<em class="parameter"><code>...</code></em>);</pre>
932
Gets the values of one or more child properties for <em class="parameter"><code>child</code></em> and <em class="parameter"><code>container</code></em>.
934
<div class="variablelist"><table border="0" class="variablelist">
936
<col align="left" valign="top">
941
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
942
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
946
<td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td>
947
<td>a widget which is a child of <em class="parameter"><code>container</code></em>
951
<td><p><span class="term"><em class="parameter"><code>first_prop_name</code></em> :</span></p></td>
952
<td>the name of the first property to get</td>
958
<div class="refsect2">
959
<a name="gtk-container-child-set"></a><h3>gtk_container_child_set ()</h3>
960
<pre class="programlisting"><span class="returnvalue">void</span> gtk_container_child_set (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
961
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
962
<em class="parameter"><code>const <span class="type">gchar</span> *first_prop_name</code></em>,
963
<em class="parameter"><code>...</code></em>);</pre>
965
Sets one or more child properties for <em class="parameter"><code>child</code></em> and <em class="parameter"><code>container</code></em>.
967
<div class="variablelist"><table border="0" class="variablelist">
969
<col align="left" valign="top">
974
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
975
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
979
<td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td>
980
<td>a widget which is a child of <em class="parameter"><code>container</code></em>
984
<td><p><span class="term"><em class="parameter"><code>first_prop_name</code></em> :</span></p></td>
985
<td>the name of the first property to set</td>
991
<div class="refsect2">
992
<a name="gtk-container-child-get-property"></a><h3>gtk_container_child_get_property ()</h3>
993
<pre class="programlisting"><span class="returnvalue">void</span> gtk_container_child_get_property (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
994
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
995
<em class="parameter"><code>const <span class="type">gchar</span> *property_name</code></em>,
996
<em class="parameter"><code><span class="type">GValue</span> *value</code></em>);</pre>
998
Gets the value of a child property for <em class="parameter"><code>child</code></em> and <em class="parameter"><code>container</code></em>.
1000
<div class="variablelist"><table border="0" class="variablelist">
1002
<col align="left" valign="top">
1007
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
1008
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
1012
<td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td>
1013
<td>a widget which is a child of <em class="parameter"><code>container</code></em>
1017
<td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td>
1018
<td>the name of the property to get</td>
1021
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
1022
<td>a location to return the value</td>
1028
<div class="refsect2">
1029
<a name="gtk-container-child-set-property"></a><h3>gtk_container_child_set_property ()</h3>
1030
<pre class="programlisting"><span class="returnvalue">void</span> gtk_container_child_set_property (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
1031
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
1032
<em class="parameter"><code>const <span class="type">gchar</span> *property_name</code></em>,
1033
<em class="parameter"><code>const <span class="type">GValue</span> *value</code></em>);</pre>
1035
Sets a child property for <em class="parameter"><code>child</code></em> and <em class="parameter"><code>container</code></em>.
1037
<div class="variablelist"><table border="0" class="variablelist">
1039
<col align="left" valign="top">
1044
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
1045
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
1049
<td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td>
1050
<td>a widget which is a child of <em class="parameter"><code>container</code></em>
1054
<td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td>
1055
<td>the name of the property to set</td>
1058
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
1059
<td>the value to set the property to</td>
1065
<div class="refsect2">
1066
<a name="gtk-container-child-get-valist"></a><h3>gtk_container_child_get_valist ()</h3>
1067
<pre class="programlisting"><span class="returnvalue">void</span> gtk_container_child_get_valist (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
1068
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
1069
<em class="parameter"><code>const <span class="type">gchar</span> *first_property_name</code></em>,
1070
<em class="parameter"><code><span class="type">va_list</span> var_args</code></em>);</pre>
1072
Gets the values of one or more child properties for <em class="parameter"><code>child</code></em> and <em class="parameter"><code>container</code></em>.
1074
<div class="variablelist"><table border="0" class="variablelist">
1076
<col align="left" valign="top">
1081
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
1082
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
1086
<td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td>
1087
<td>a widget which is a child of <em class="parameter"><code>container</code></em>
1091
<td><p><span class="term"><em class="parameter"><code>first_property_name</code></em> :</span></p></td>
1092
<td>the name of the first property to get</td>
1095
<td><p><span class="term"><em class="parameter"><code>var_args</code></em> :</span></p></td>
1096
<td>return location for the first property, followed
1097
optionally by more name/return location pairs, followed by <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>
1104
<div class="refsect2">
1105
<a name="gtk-container-child-set-valist"></a><h3>gtk_container_child_set_valist ()</h3>
1106
<pre class="programlisting"><span class="returnvalue">void</span> gtk_container_child_set_valist (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
1107
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
1108
<em class="parameter"><code>const <span class="type">gchar</span> *first_property_name</code></em>,
1109
<em class="parameter"><code><span class="type">va_list</span> var_args</code></em>);</pre>
1111
Sets one or more child properties for <em class="parameter"><code>child</code></em> and <em class="parameter"><code>container</code></em>.
1113
<div class="variablelist"><table border="0" class="variablelist">
1115
<col align="left" valign="top">
1120
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
1121
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
1125
<td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td>
1126
<td>a widget which is a child of <em class="parameter"><code>container</code></em>
1130
<td><p><span class="term"><em class="parameter"><code>first_property_name</code></em> :</span></p></td>
1131
<td>the name of the first property to set</td>
1134
<td><p><span class="term"><em class="parameter"><code>var_args</code></em> :</span></p></td>
1135
<td>a <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated list of property names and values, starting
1136
with <em class="parameter"><code>first_prop_name</code></em>
1143
<div class="refsect2">
1144
<a name="gtk-container-forall"></a><h3>gtk_container_forall ()</h3>
1145
<pre class="programlisting"><span class="returnvalue">void</span> gtk_container_forall (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
1146
<em class="parameter"><code><a class="link" href="GtkWidget.html#GtkCallback" title="GtkCallback ()"><span class="type">GtkCallback</span></a> callback</code></em>,
1147
<em class="parameter"><code><span class="type">gpointer</span> callback_data</code></em>);</pre>
1149
Invokes <em class="parameter"><code>callback</code></em> on each child of <em class="parameter"><code>container</code></em>, including children
1150
that are considered "internal" (implementation details of the
1151
container). "Internal" children generally weren't added by the user
1152
of the container, but were added by the container implementation
1153
itself. Most applications should use <a class="link" href="GtkContainer.html#gtk-container-foreach" title="gtk_container_foreach ()"><code class="function">gtk_container_foreach()</code></a>,
1154
rather than <a class="link" href="GtkContainer.html#gtk-container-forall" title="gtk_container_forall ()"><code class="function">gtk_container_forall()</code></a>.
1156
<div class="variablelist"><table border="0" class="variablelist">
1158
<col align="left" valign="top">
1163
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
1164
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
1168
<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
1172
<td><p><span class="term"><em class="parameter"><code>callback_data</code></em> :</span></p></td>
1173
<td>callback user data</td>
1179
<div class="refsect2">
1180
<a name="gtk-container-get-border-width"></a><h3>gtk_container_get_border_width ()</h3>
1181
<pre class="programlisting"><span class="returnvalue">guint</span> gtk_container_get_border_width (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>);</pre>
1183
Retrieves the border width of the container. See
1184
<a class="link" href="GtkContainer.html#gtk-container-set-border-width" title="gtk_container_set_border_width ()"><code class="function">gtk_container_set_border_width()</code></a>.
1186
<div class="variablelist"><table border="0" class="variablelist">
1188
<col align="left" valign="top">
1193
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
1194
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
1198
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1199
<td>the current border width</td>
1205
<div class="refsect2">
1206
<a name="gtk-container-set-border-width"></a><h3>gtk_container_set_border_width ()</h3>
1207
<pre class="programlisting"><span class="returnvalue">void</span> gtk_container_set_border_width (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
1208
<em class="parameter"><code><span class="type">guint</span> border_width</code></em>);</pre>
1210
Sets the border width of the container.
1213
The border width of a container is the amount of space to leave
1214
around the outside of the container. The only exception to this is
1215
<a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a>; because toplevel windows can't leave space outside,
1216
they leave the space inside. The border is added on all sides of
1217
the container. To add space to only one side, one approach is to
1218
create a <a class="link" href="GtkAlignment.html" title="GtkAlignment"><span class="type">GtkAlignment</span></a> widget, call <a class="link" href="GtkWidget.html#gtk-widget-set-size-request" title="gtk_widget_set_size_request ()"><code class="function">gtk_widget_set_size_request()</code></a>
1219
to give it a size, and place it on the side of the container as
1222
<div class="variablelist"><table border="0" class="variablelist">
1224
<col align="left" valign="top">
1229
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
1230
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
1234
<td><p><span class="term"><em class="parameter"><code>border_width</code></em> :</span></p></td>
1235
<td>amount of blank space to leave <span class="emphasis"><em>outside</em></span>
1236
the container. Valid values are in the range 0-65535 pixels.</td>
1242
<div class="refsect2">
1243
<a name="gtk-container-propagate-expose"></a><h3>gtk_container_propagate_expose ()</h3>
1244
<pre class="programlisting"><span class="returnvalue">void</span> gtk_container_propagate_expose (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
1245
<em class="parameter"><code><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *child</code></em>,
1246
<em class="parameter"><code><a href="../gdk2/gdk2-Event-Structures.html#GdkEventExpose"><span class="type">GdkEventExpose</span></a> *event</code></em>);</pre>
1248
When a container receives an expose event, it must send synthetic
1249
expose events to all children that don't have their own <a href="../gdk2/gdk2-Windows.html#GdkWindow"><span class="type">GdkWindows</span></a>.
1250
This function provides a convenient way of doing this. A container,
1251
when it receives an expose event, calls <a class="link" href="GtkContainer.html#gtk-container-propagate-expose" title="gtk_container_propagate_expose ()"><code class="function">gtk_container_propagate_expose()</code></a>
1252
once for each child, passing in the event the container received.
1255
<a class="link" href="GtkContainer.html#gtk-container-propagate-expose" title="gtk_container_propagate_expose ()"><code class="function">gtk_container_propagate_expose()</code></a> takes care of deciding whether
1256
an expose event needs to be sent to the child, intersecting
1257
the event's area with the child area, and sending the event.
1260
In most cases, a container can simply either simply inherit the
1261
<span class="type">"expose"</span> implementation from <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>, or, do some drawing
1262
and then chain to the ::expose implementation from <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>.
1265
Note that the ::expose-event signal has been replaced by a ::draw
1266
signal in GTK+ 3, and consequently, <a class="link" href="GtkContainer.html#gtk-container-propagate-expose" title="gtk_container_propagate_expose ()"><code class="function">gtk_container_propagate_expose()</code></a>
1267
has been replaced by <a href="http://developer.gnome.org/gtk2/GtkContainer.html#gtk-container-propagate-draw"><code class="function">gtk_container_propagate_draw()</code></a>.
1268
The GTK+ 3 migration guide
1269
for hints on how to port from ::expose-event to ::draw.
1271
<div class="variablelist"><table border="0" class="variablelist">
1273
<col align="left" valign="top">
1278
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
1279
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
1283
<td><p><span class="term"><em class="parameter"><code>child</code></em> :</span></p></td>
1284
<td>a child of <em class="parameter"><code>container</code></em>
1288
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
1289
<td>a expose event sent to container</td>
1295
<div class="refsect2">
1296
<a name="gtk-container-get-focus-chain"></a><h3>gtk_container_get_focus_chain ()</h3>
1297
<pre class="programlisting"><span class="returnvalue">gboolean</span> gtk_container_get_focus_chain (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
1298
<em class="parameter"><code><span class="type">GList</span> **focusable_widgets</code></em>);</pre>
1300
Retrieves the focus chain of the container, if one has been
1301
set explicitly. If no focus chain has been explicitly
1302
set, GTK+ computes the focus chain based on the positions
1303
of the children. In that case, GTK+ stores <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> in
1304
<em class="parameter"><code>focusable_widgets</code></em> and returns <code class="literal">FALSE</code>.
1306
<div class="variablelist"><table border="0" class="variablelist">
1308
<col align="left" valign="top">
1313
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
1314
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
1318
<td><p><span class="term"><em class="parameter"><code>focusable_widgets</code></em> :</span></p></td>
1320
to store the focus chain of the
1321
container, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. You should free this list
1322
using <code class="function">g_list_free()</code> when you are done with it, however
1323
no additional reference count is added to the
1324
individual widgets in the focus chain. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GtkWidget][<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span>
1328
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1330
<code class="literal">TRUE</code> if the focus chain of the container
1331
has been set explicitly.</td>
1337
<div class="refsect2">
1338
<a name="gtk-container-set-focus-chain"></a><h3>gtk_container_set_focus_chain ()</h3>
1339
<pre class="programlisting"><span class="returnvalue">void</span> gtk_container_set_focus_chain (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>,
1340
<em class="parameter"><code><span class="type">GList</span> *focusable_widgets</code></em>);</pre>
1342
Sets a focus chain, overriding the one computed automatically by GTK+.
1345
In principle each widget in the chain should be a descendant of the
1346
container, but this is not enforced by this method, since it's allowed
1347
to set the focus chain before you pack the widgets, or have a widget
1348
in the chain that isn't always packed. The necessary checks are done
1349
when the focus chain is actually traversed.
1351
<div class="variablelist"><table border="0" class="variablelist">
1353
<col align="left" valign="top">
1358
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
1359
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
1363
<td><p><span class="term"><em class="parameter"><code>focusable_widgets</code></em> :</span></p></td>
1364
<td>the new focus chain. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GtkWidget]</span>
1371
<div class="refsect2">
1372
<a name="gtk-container-unset-focus-chain"></a><h3>gtk_container_unset_focus_chain ()</h3>
1373
<pre class="programlisting"><span class="returnvalue">void</span> gtk_container_unset_focus_chain (<em class="parameter"><code><a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container</code></em>);</pre>
1375
Removes a focus chain explicitly set with <a class="link" href="GtkContainer.html#gtk-container-set-focus-chain" title="gtk_container_set_focus_chain ()"><code class="function">gtk_container_set_focus_chain()</code></a>.
1377
<div class="variablelist"><table border="0" class="variablelist">
1379
<col align="left" valign="top">
1383
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
1384
<td>a <a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a>
1390
<div class="refsect2">
1391
<a name="gtk-container-class-find-child-property"></a><h3>gtk_container_class_find_child_property ()</h3>
1392
<pre class="programlisting"><span class="returnvalue">GParamSpec</span> * gtk_container_class_find_child_property
1393
(<em class="parameter"><code><span class="type">GObjectClass</span> *cclass</code></em>,
1394
<em class="parameter"><code>const <span class="type">gchar</span> *property_name</code></em>);</pre>
1396
Finds a child property of a container class by name.
1398
<div class="variablelist"><table border="0" class="variablelist">
1400
<col align="left" valign="top">
1405
<td><p><span class="term"><em class="parameter"><code>cclass</code></em> :</span></p></td>
1406
<td>a <span class="type">GtkContainerClass</span>. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GtkContainerClass]</span>
1410
<td><p><span class="term"><em class="parameter"><code>property_name</code></em> :</span></p></td>
1411
<td>the name of the child property to find</td>
1414
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1415
<td>the <span class="type">GParamSpec</span> of the child property or
1416
<a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>class</code></em> has no child property with that name. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
1423
<div class="refsect2">
1424
<a name="gtk-container-class-install-child-property"></a><h3>gtk_container_class_install_child_property ()</h3>
1425
<pre class="programlisting"><span class="returnvalue">void</span> gtk_container_class_install_child_property
1426
(<em class="parameter"><code><span class="type">GtkContainerClass</span> *cclass</code></em>,
1427
<em class="parameter"><code><span class="type">guint</span> property_id</code></em>,
1428
<em class="parameter"><code><span class="type">GParamSpec</span> *pspec</code></em>);</pre>
1430
Installs a child property on a container class.
1432
<div class="variablelist"><table border="0" class="variablelist">
1434
<col align="left" valign="top">
1439
<td><p><span class="term"><em class="parameter"><code>cclass</code></em> :</span></p></td>
1440
<td>a <span class="type">GtkContainerClass</span>
1444
<td><p><span class="term"><em class="parameter"><code>property_id</code></em> :</span></p></td>
1445
<td>the id for the property</td>
1448
<td><p><span class="term"><em class="parameter"><code>pspec</code></em> :</span></p></td>
1449
<td>the <span class="type">GParamSpec</span> for the property</td>
1455
<div class="refsect2">
1456
<a name="gtk-container-class-list-child-properties"></a><h3>gtk_container_class_list_child_properties ()</h3>
1457
<pre class="programlisting"><span class="returnvalue">GParamSpec</span> ** gtk_container_class_list_child_properties
1458
(<em class="parameter"><code><span class="type">GObjectClass</span> *cclass</code></em>,
1459
<em class="parameter"><code><span class="type">guint</span> *n_properties</code></em>);</pre>
1461
Returns all child properties of a container class.
1463
<div class="variablelist"><table border="0" class="variablelist">
1465
<col align="left" valign="top">
1470
<td><p><span class="term"><em class="parameter"><code>cclass</code></em> :</span></p></td>
1471
<td>a <span class="type">GtkContainerClass</span>. <span class="annotation">[<acronym title="Override the parsed C type with given type"><span class="acronym">type</span></acronym> GtkContainerClass]</span>
1475
<td><p><span class="term"><em class="parameter"><code>n_properties</code></em> :</span></p></td>
1476
<td>location to return the number of child properties found</td>
1479
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1481
allocated <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of <span class="type">GParamSpec</span>*.
1482
The array must be freed with <code class="function">g_free()</code>. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_properties][<acronym title="Free data container after the code is done."><span class="acronym">transfer container</span></acronym>]</span>
1489
<div class="refsect1">
1490
<a name="GtkContainer.property-details"></a><h2>Property Details</h2>
1491
<div class="refsect2">
1492
<a name="GtkContainer--border-width"></a><h3>The <code class="literal">"border-width"</code> property</h3>
1493
<pre class="programlisting"> "border-width" <span class="type">guint</span> : Read / Write</pre>
1494
<p>The width of the empty border outside the containers children.</p>
1495
<p>Allowed values: <= 65535</p>
1496
<p>Default value: 0</p>
1499
<div class="refsect2">
1500
<a name="GtkContainer--child"></a><h3>The <code class="literal">"child"</code> property</h3>
1501
<pre class="programlisting"> "child" <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>* : Write</pre>
1502
<p>Can be used to add a new child to the container.</p>
1505
<div class="refsect2">
1506
<a name="GtkContainer--resize-mode"></a><h3>The <code class="literal">"resize-mode"</code> property</h3>
1507
<pre class="programlisting"> "resize-mode" <a class="link" href="gtk2-Standard-Enumerations.html#GtkResizeMode" title="enum GtkResizeMode"><span class="type">GtkResizeMode</span></a> : Read / Write</pre>
1508
<p>Specify how resize events are handled.</p>
1509
<p>Default value: GTK_RESIZE_PARENT</p>
1512
<div class="refsect1">
1513
<a name="GtkContainer.signal-details"></a><h2>Signal Details</h2>
1514
<div class="refsect2">
1515
<a name="GtkContainer-add"></a><h3>The <code class="literal">"add"</code> signal</h3>
1516
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container,
1517
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget,
1518
<span class="type">gpointer</span> user_data) : <code class="literal">Run First</code></pre>
1521
<div class="variablelist"><table border="0" class="variablelist">
1523
<col align="left" valign="top">
1528
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
1529
<td>the object which received the signal.</td>
1532
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
1533
<td>user data set when the signal handler was connected.</td>
1539
<div class="refsect2">
1540
<a name="GtkContainer-check-resize"></a><h3>The <code class="literal">"check-resize"</code> signal</h3>
1541
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container,
1542
<span class="type">gpointer</span> user_data) : <code class="literal">Run Last</code></pre>
1545
<div class="variablelist"><table border="0" class="variablelist">
1547
<col align="left" valign="top">
1552
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
1553
<td>the object which received the signal.</td>
1556
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
1557
<td>user data set when the signal handler was connected.</td>
1563
<div class="refsect2">
1564
<a name="GtkContainer-remove"></a><h3>The <code class="literal">"remove"</code> signal</h3>
1565
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container,
1566
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget,
1567
<span class="type">gpointer</span> user_data) : <code class="literal">Run First</code></pre>
1570
<div class="variablelist"><table border="0" class="variablelist">
1572
<col align="left" valign="top">
1577
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
1578
<td>the object which received the signal.</td>
1581
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
1582
<td>user data set when the signal handler was connected.</td>
1588
<div class="refsect2">
1589
<a name="GtkContainer-set-focus-child"></a><h3>The <code class="literal">"set-focus-child"</code> signal</h3>
1590
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="GtkContainer.html" title="GtkContainer"><span class="type">GtkContainer</span></a> *container,
1591
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> *widget,
1592
<span class="type">gpointer</span> user_data) : <code class="literal">Run First</code></pre>
1595
<div class="variablelist"><table border="0" class="variablelist">
1597
<col align="left" valign="top">
1602
<td><p><span class="term"><em class="parameter"><code>container</code></em> :</span></p></td>
1603
<td>the object which received the signal.</td>
1606
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
1607
<td>user data set when the signal handler was connected.</td>
1614
<div class="footer">
1616
Generated by GTK-Doc V1.18</div>
b'\\ No newline at end of file'