1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
8 <link rel="up" href="LayoutContainers.html" title="Layout Containers">
9 <link rel="prev" href="GtkHBox.html" title="GtkHBox">
10 <link rel="next" href="GtkButtonBox.html" title="GtkButtonBox">
11 <meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17 <td><a accesskey="p" href="GtkHBox.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="LayoutContainers.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+ 3 Reference Manual</th>
21 <td><a accesskey="n" href="GtkButtonBox.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#GtkVBox.synopsis" class="shortcut">Top</a>
26 <a href="#GtkVBox.description" class="shortcut">Description</a>
28 <a href="#GtkVBox.object-hierarchy" class="shortcut">Object Hierarchy</a>
30 <a href="#GtkVBox.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
33 <div class="refentry">
34 <a name="GtkVBox"></a><div class="titlepage"></div>
35 <div class="refnamediv"><table width="100%"><tr>
37 <h2><span class="refentrytitle"><a name="GtkVBox.top_of_page"></a>GtkVBox</span></h2>
38 <p>GtkVBox — A vertical container box</p>
40 <td valign="top" align="right"></td>
42 <div class="refsynopsisdiv">
43 <a name="GtkVBox.synopsis"></a><h2>Synopsis</h2>
44 <pre class="synopsis">
45 #include <gtk/gtk.h>
47 struct <a class="link" href="GtkVBox.html#GtkVBox-struct" title="struct GtkVBox">GtkVBox</a>;
48 <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> * <a class="link" href="GtkVBox.html#gtk-vbox-new" title="gtk_vbox_new ()">gtk_vbox_new</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> homogeneous</code></em>,
49 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> spacing</code></em>);
52 <div class="refsect1">
53 <a name="GtkVBox.object-hierarchy"></a><h2>Object Hierarchy</h2>
54 <pre class="synopsis">
55 <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
56 +----<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
57 +----<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
58 +----<a class="link" href="GtkContainer.html" title="GtkContainer">GtkContainer</a>
59 +----<a class="link" href="GtkBox.html" title="GtkBox">GtkBox</a>
63 <div class="refsect1">
64 <a name="GtkVBox.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
67 AtkImplementorIface, <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a> and <a class="link" href="gtk3-Orientable.html#GtkOrientable">GtkOrientable</a>.</p>
69 <div class="refsect1">
70 <a name="GtkVBox.description"></a><h2>Description</h2>
72 A <a class="link" href="GtkVBox.html" title="GtkVBox"><span class="type">GtkVBox</span></a> is a container that organizes child widgets into a single column.
75 Use the <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> packing interface to determine the arrangement,
76 spacing, height, and alignment of <a class="link" href="GtkVBox.html" title="GtkVBox"><span class="type">GtkVBox</span></a> children.
79 All children are allocated the same width.
82 GtkVBox has been deprecated. You can use <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> instead, which is a
83 very quick and easy change. If you have derived your own classes from
84 GtkVBox, you can simply change the inheritance to derive directly
85 from <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a>, and set the <a class="link" href="gtk3-Orientable.html#GtkOrientable--orientation" title='The "orientation" property'><span class="type">"orientation"</span></a> property to
86 <a class="link" href="gtk3-Standard-Enumerations.html#GTK-ORIENTATION-VERTICAL:CAPS"><code class="literal">GTK_ORIENTATION_VERTICAL</code></a> in your instance init function, with a
89 <div class="informalexample">
90 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
93 <td class="listing_lines" align="right"><pre>1
95 <td class="listing_code"><pre class="programlisting"><span class="function"><a href="gtk3-Orientable.html#gtk-orientable-set-orientation">gtk_orientable_set_orientation</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_ORIENTABLE</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">object</span><span class="symbol">),</span>
96 <span class="normal"> <a href="gtk3-Standard-Enumerations.html#GTK-ORIENTATION-VERTICAL:CAPS">GTK_ORIENTATION_VERTICAL</a></span><span class="symbol">);</span></pre></td>
103 If you want your code to be future-proof, the recommendation is to
104 switch to <a class="link" href="GtkGrid.html" title="GtkGrid"><span class="type">GtkGrid</span></a>, since <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> is going to be deprecated in favor
105 of the more flexible grid widget eventually. For more information
106 about migrating to <a class="link" href="GtkGrid.html" title="GtkGrid"><span class="type">GtkGrid</span></a>, see <a class="xref" href="gtk-migrating-GtkGrid.html" title="Migrating from other containers to GtkGrid"><i>Migrating from other containers to GtkGrid</i></a>.
109 <div class="refsect1">
110 <a name="GtkVBox.details"></a><h2>Details</h2>
111 <div class="refsect2">
112 <a name="GtkVBox-struct"></a><h3>struct GtkVBox</h3>
113 <pre class="programlisting">struct GtkVBox;</pre>
116 <div class="refsect2">
117 <a name="gtk-vbox-new"></a><h3>gtk_vbox_new ()</h3>
118 <pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> * gtk_vbox_new (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> homogeneous</code></em>,
119 <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> spacing</code></em>);</pre>
120 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
121 <h3 class="title">Warning</h3>
122 <p><code class="literal">gtk_vbox_new</code> has been deprecated since version 3.2 and should not be used in newly-written code. You can use <a class="link" href="GtkBox.html#gtk-box-new" title="gtk_box_new ()"><code class="function">gtk_box_new()</code></a> with <a class="link" href="gtk3-Standard-Enumerations.html#GTK-ORIENTATION-VERTICAL:CAPS"><code class="literal">GTK_ORIENTATION_VERTICAL</code></a> instead,
123 which is a quick and easy change. But the recommendation is to switch to
124 <a class="link" href="GtkGrid.html" title="GtkGrid"><span class="type">GtkGrid</span></a>, since <a class="link" href="GtkBox.html" title="GtkBox"><span class="type">GtkBox</span></a> is going to go away eventually.
125 See <a class="xref" href="gtk-migrating-GtkGrid.html" title="Migrating from other containers to GtkGrid"><i>Migrating from other containers to GtkGrid</i></a>.</p>
128 Creates a new <a class="link" href="GtkVBox.html" title="GtkVBox"><span class="type">GtkVBox</span></a>.
130 <div class="variablelist"><table border="0">
131 <col align="left" valign="top">
134 <td><p><span class="term"><em class="parameter"><code>homogeneous</code></em> :</span></p></td>
136 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if all children are to be given equal space allotments.</td>
139 <td><p><span class="term"><em class="parameter"><code>spacing</code></em> :</span></p></td>
140 <td>the number of pixels to place by default between children.</td>
143 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
144 <td>a new <a class="link" href="GtkVBox.html" title="GtkVBox"><span class="type">GtkVBox</span></a>.</td>
150 <div class="refsect1">
151 <a name="GtkVBox.see-also"></a><h2>See Also</h2>
152 <a class="link" href="GtkHBox.html" title="GtkHBox"><span class="type">GtkHBox</span></a>
157 Generated by GTK-Doc V1.18</div>