<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkBoxLayout">
<refmeta>
<refentrytitle role="top_of_page" id="GtkBoxLayout.top_of_page">GtkBoxLayout</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkBoxLayout</refname>
<refpurpose>Layout manager for placing all children in a single row or column</refpurpose>
</refnamediv>

<refsect1 id="GtkBoxLayout.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="GtkLayoutManager"><returnvalue>GtkLayoutManager</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-box-layout-new">gtk_box_layout_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-box-layout-set-homogeneous">gtk_box_layout_set_homogeneous</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-box-layout-get-homogeneous">gtk_box_layout_get_homogeneous</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-box-layout-set-spacing">gtk_box_layout_set_spacing</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-box-layout-get-spacing">gtk_box_layout_get_spacing</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-box-layout-set-baseline-position">gtk_box_layout_set_baseline_position</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkBaselinePosition"><returnvalue>GtkBaselinePosition</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-box-layout-get-baseline-position">gtk_box_layout_get_baseline_position</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkBoxLayout.properties" role="properties">
<title role="properties.title">Properties</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="properties_type" colwidth="150px"/>
<colspec colname="properties_name" colwidth="300px"/>
<colspec colname="properties_flags" colwidth="200px"/>
<tbody>
<row><entry role="property_type"><link linkend="GtkBaselinePosition"><type>GtkBaselinePosition</type></link></entry><entry role="property_name"><link linkend="GtkBoxLayout--baseline-position">baseline-position</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkBoxLayout--homogeneous">homogeneous</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gint"><type>gint</type></link></entry><entry role="property_name"><link linkend="GtkBoxLayout--spacing">spacing</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkBoxLayout.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkBoxLayout-struct">GtkBoxLayout</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkBoxLayout.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkLayoutManager">GtkLayoutManager</link>
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkBoxLayout
</screen>
</refsect1>
<refsect1 id="GtkBoxLayout.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkBoxLayout implements
 <link linkend="GtkOrientable">GtkOrientable</link>.</para>

</refsect1>

<refsect1 id="GtkBoxLayout.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkBoxLayout.description" role="desc">
<title role="desc.title">Description</title>
<para>A GtkBoxLayout is a layout manager that arranges the children of any
widget using it into a single row or column, depending on the value
of its <link linkend="GtkOrientable--orientation"><type>“orientation”</type></link> property. Within the other dimension
all children all allocated the same size. The GtkBoxLayout will respect
the <link linkend="GtkWidget--halign"><type>“halign”</type></link> and <link linkend="GtkWidget--valign"><type>“valign”</type></link> properties of each child
widget.</para>
<para>If you want all children to be assigned the same size, you can use
the <link linkend="GtkBoxLayout--homogeneous"><type>“homogeneous”</type></link> property.</para>
<para>If you want to specify the amount of space placed between each child,
you can use the <link linkend="GtkBoxLayout--spacing"><type>“spacing”</type></link> property.</para>

</refsect1>
<refsect1 id="GtkBoxLayout.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-box-layout-new" role="function">
<title>gtk_box_layout_new&#160;()</title>
<indexterm zone="gtk-box-layout-new"><primary>gtk_box_layout_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkLayoutManager"><returnvalue>GtkLayoutManager</returnvalue></link>&#160;*
gtk_box_layout_new (<parameter><link linkend="GtkOrientation"><type>GtkOrientation</type></link> orientation</parameter>);</programlisting>
<para>Creates a new box layout.</para>
<refsect3 id="gtk-box-layout-new.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>orientation</para></entry>
<entry role="parameter_description"><para>the orientation for the new layout</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-box-layout-new.returns" role="returns">
<title>Returns</title>
<para> a new box layout</para>
</refsect3></refsect2>
<refsect2 id="gtk-box-layout-set-homogeneous" role="function">
<title>gtk_box_layout_set_homogeneous&#160;()</title>
<indexterm zone="gtk-box-layout-set-homogeneous"><primary>gtk_box_layout_set_homogeneous</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_box_layout_set_homogeneous (<parameter><link linkend="GtkBoxLayout"><type>GtkBoxLayout</type></link> *box_layout</parameter>,
                                <parameter><link linkend="gboolean"><type>gboolean</type></link> homogeneous</parameter>);</programlisting>
<para>Sets whether the box layout will allocate the same
size to all children.</para>
<refsect3 id="gtk-box-layout-set-homogeneous.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>box_layout</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkBoxLayout"><type>GtkBoxLayout</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>homogeneous</para></entry>
<entry role="parameter_description"><para><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> to set the box layout as homogeneous</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-box-layout-get-homogeneous" role="function">
<title>gtk_box_layout_get_homogeneous&#160;()</title>
<indexterm zone="gtk-box-layout-get-homogeneous"><primary>gtk_box_layout_get_homogeneous</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_box_layout_get_homogeneous (<parameter><link linkend="GtkBoxLayout"><type>GtkBoxLayout</type></link> *box_layout</parameter>);</programlisting>
<para>Returns whether the layout is set to be homogeneous.</para>
<para>Return: <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the layout is homogeneous</para>
<refsect3 id="gtk-box-layout-get-homogeneous.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>box_layout</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkBoxLayout"><type>GtkBoxLayout</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-box-layout-set-spacing" role="function">
<title>gtk_box_layout_set_spacing&#160;()</title>
<indexterm zone="gtk-box-layout-set-spacing"><primary>gtk_box_layout_set_spacing</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_box_layout_set_spacing (<parameter><link linkend="GtkBoxLayout"><type>GtkBoxLayout</type></link> *box_layout</parameter>,
                            <parameter><link linkend="guint"><type>guint</type></link> spacing</parameter>);</programlisting>
<para>Sets how much spacing to put between children.</para>
<refsect3 id="gtk-box-layout-set-spacing.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>box_layout</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkBoxLayout"><type>GtkBoxLayout</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>spacing</para></entry>
<entry role="parameter_description"><para>the spacing to apply between children</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-box-layout-get-spacing" role="function">
<title>gtk_box_layout_get_spacing&#160;()</title>
<indexterm zone="gtk-box-layout-get-spacing"><primary>gtk_box_layout_get_spacing</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
gtk_box_layout_get_spacing (<parameter><link linkend="GtkBoxLayout"><type>GtkBoxLayout</type></link> *box_layout</parameter>);</programlisting>
<para>Returns the space that <parameter>box_layout</parameter>
 puts between children.</para>
<refsect3 id="gtk-box-layout-get-spacing.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>box_layout</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkBoxLayout"><type>GtkBoxLayout</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-box-layout-get-spacing.returns" role="returns">
<title>Returns</title>
<para> the spacing of the layout</para>
</refsect3></refsect2>
<refsect2 id="gtk-box-layout-set-baseline-position" role="function">
<title>gtk_box_layout_set_baseline_position&#160;()</title>
<indexterm zone="gtk-box-layout-set-baseline-position"><primary>gtk_box_layout_set_baseline_position</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_box_layout_set_baseline_position (<parameter><link linkend="GtkBoxLayout"><type>GtkBoxLayout</type></link> *box_layout</parameter>,
                                      <parameter><link linkend="GtkBaselinePosition"><type>GtkBaselinePosition</type></link> position</parameter>);</programlisting>
<para>Sets the baseline position of a box layout.</para>
<para>The baseline position affects only horizontal boxes with at least one
baseline aligned child. If there is more vertical space available than
requested, and the baseline is not allocated by the parent then the
given <parameter>position</parameter>
 is used to allocate the baseline within the extra
space available.</para>
<refsect3 id="gtk-box-layout-set-baseline-position.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>box_layout</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkBoxLayout"><type>GtkBoxLayout</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>position</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkBaselinePosition"><type>GtkBaselinePosition</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-box-layout-get-baseline-position" role="function">
<title>gtk_box_layout_get_baseline_position&#160;()</title>
<indexterm zone="gtk-box-layout-get-baseline-position"><primary>gtk_box_layout_get_baseline_position</primary></indexterm>
<programlisting language="C"><link linkend="GtkBaselinePosition"><returnvalue>GtkBaselinePosition</returnvalue></link>
gtk_box_layout_get_baseline_position (<parameter><link linkend="GtkBoxLayout"><type>GtkBoxLayout</type></link> *box_layout</parameter>);</programlisting>
<para>Gets the value set by <link linkend="gtk-box-layout-set-baseline-position"><function>gtk_box_layout_set_baseline_position()</function></link>.</para>
<refsect3 id="gtk-box-layout-get-baseline-position.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>box_layout</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkBoxLayout"><type>GtkBoxLayout</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-box-layout-get-baseline-position.returns" role="returns">
<title>Returns</title>
<para> the baseline position</para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkBoxLayout.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkBoxLayout-struct" role="struct">
<title>GtkBoxLayout</title>
<indexterm zone="GtkBoxLayout-struct"><primary>GtkBoxLayout</primary></indexterm>
<programlisting language="C">typedef struct _GtkBoxLayout GtkBoxLayout;</programlisting>
</refsect2>

</refsect1>
<refsect1 id="GtkBoxLayout.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkBoxLayout--baseline-position" role="property"><title>The <literal>“baseline-position”</literal> property</title>
<indexterm zone="GtkBoxLayout--baseline-position"><primary>GtkBoxLayout:baseline-position</primary></indexterm>
<programlisting>  “baseline-position”        <link linkend="GtkBaselinePosition"><type>GtkBaselinePosition</type></link></programlisting>
<para>The position of the allocated baseline within the extra space
allocated to each child of the widget using a box layout
manager.</para>
<para>This property is only relevant for horizontal layouts containing
at least one child with a baseline alignment.</para>
<para>Owner: GtkBoxLayout</para>
<para>Flags: Read / Write</para>
<para>Default value: GTK_BASELINE_POSITION_CENTER</para>
</refsect2>
<refsect2 id="GtkBoxLayout--homogeneous" role="property"><title>The <literal>“homogeneous”</literal> property</title>
<indexterm zone="GtkBoxLayout--homogeneous"><primary>GtkBoxLayout:homogeneous</primary></indexterm>
<programlisting>  “homogeneous”              <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Whether the box layout should distribute the available space
homogeneously among the children of the widget using it as a
layout manager.</para>
<para>Owner: GtkBoxLayout</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkBoxLayout--spacing" role="property"><title>The <literal>“spacing”</literal> property</title>
<indexterm zone="GtkBoxLayout--spacing"><primary>GtkBoxLayout:spacing</primary></indexterm>
<programlisting>  “spacing”                  <link linkend="gint"><type>gint</type></link></programlisting>
<para>The space between each child of the widget using the box
layout as its layout manager.</para>
<para>Owner: GtkBoxLayout</para>
<para>Flags: Read / Write</para>
<para>Allowed values: &gt;= 0</para>
<para>Default value: 0</para>
</refsect2>

</refsect1>

</refentry>
