<refentry id="GtkButtonBox">
<refmeta>
<refentrytitle>GtkButtonBox</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GtkButtonBox</refname><refpurpose>Base class for <link linkend="GtkHButtonBox">GtkHButtonBox</link> and <link linkend="GtkVButtonBox">GtkVButtonBox</link></refpurpose>
</refnamediv>

<refsynopsisdiv><title>Synopsis</title>
<synopsis>

#include &lt;gtk/gtk.h&gt;


struct      <link linkend="GtkButtonBox-struct">GtkButtonBox</link>;
#define     <link linkend="GTK-BUTTONBOX-DEFAULT-CAPS">GTK_BUTTONBOX_DEFAULT</link>
#define     <link linkend="gtk-button-box-get-spacing">gtk_button_box_get_spacing</link>      (b)
<link linkend="GtkButtonBoxStyle">GtkButtonBoxStyle</link> <link linkend="gtk-button-box-get-layout">gtk_button_box_get_layout</link> (<link linkend="GtkButtonBox">GtkButtonBox</link> *widget);
void        <link linkend="gtk-button-box-get-child-size">gtk_button_box_get_child_size</link>   (<link linkend="GtkButtonBox">GtkButtonBox</link> *widget,
                                             <link linkend="gint">gint</link> *min_width,
                                             <link linkend="gint">gint</link> *min_height);
void        <link linkend="gtk-button-box-get-child-ipadding">gtk_button_box_get_child_ipadding</link>
                                            (<link linkend="GtkButtonBox">GtkButtonBox</link> *widget,
                                             <link linkend="gint">gint</link> *ipad_x,
                                             <link linkend="gint">gint</link> *ipad_y);
#define     <link linkend="gtk-button-box-set-spacing">gtk_button_box_set_spacing</link>      (b,s)
void        <link linkend="gtk-button-box-set-layout">gtk_button_box_set_layout</link>       (<link linkend="GtkButtonBox">GtkButtonBox</link> *widget,
                                             <link linkend="GtkButtonBoxStyle">GtkButtonBoxStyle</link> layout_style);
void        <link linkend="gtk-button-box-set-child-size">gtk_button_box_set_child_size</link>   (<link linkend="GtkButtonBox">GtkButtonBox</link> *widget,
                                             <link linkend="gint">gint</link> min_width,
                                             <link linkend="gint">gint</link> min_height);
void        <link linkend="gtk-button-box-set-child-ipadding">gtk_button_box_set_child_ipadding</link>
                                            (<link linkend="GtkButtonBox">GtkButtonBox</link> *widget,
                                             <link linkend="gint">gint</link> ipad_x,
                                             <link linkend="gint">gint</link> ipad_y);
void        <link linkend="gtk-button-box-set-child-secondary">gtk_button_box_set_child_secondary</link>
                                            (<link linkend="GtkButtonBox">GtkButtonBox</link> *widget,
                                             <link linkend="GtkWidget">GtkWidget</link> *child,
                                             <link linkend="gboolean">gboolean</link> is_secondary);


</synopsis>
</refsynopsisdiv>

<refsect1>
<title>Object Hierarchy</title>
<synopsis>

  <link linkend="GObject">GObject</link>
   +----<link linkend="GtkObject">GtkObject</link>
         +----<link linkend="GtkWidget">GtkWidget</link>
               +----<link linkend="GtkContainer">GtkContainer</link>
                     +----<link linkend="GtkBox">GtkBox</link>
                           +----GtkButtonBox
</synopsis>

</refsect1>

<refsect1>
<title>Properties</title>
<synopsis>

  &quot;<link linkend="GtkButtonBox--layout-style">layout-style</link>&quot;         <link linkend="GtkButtonBoxStyle">GtkButtonBoxStyle</link>    : Read / Write
</synopsis>
</refsect1>



<refsect1>
<title>Description</title>
<para>
The primary purpose of this class is to keep track of the various properties
of <link linkend="GtkHButtonBox">GtkHButtonBox</link> and <link linkend="GtkVButtonBox">GtkVButtonBox</link> widgets.
</para>
<para>
<link linkend="gtk-button-box-get-child-size">gtk_button_box_get_child_size</link>() retrieves the minimum width and height 
for widgets in a given button box. <link linkend="gtk-button-box-set-child-size">gtk_button_box_set_child_size</link>() 
allows those properties to be changed.
</para>
<para>
The internal padding of buttons can be retrieved and changed per button box using
<link linkend="gtk-button-box-get-child-ipadding">gtk_button_box_get_child_ipadding</link>() and <link linkend="gtk-button-box-set-child-ipadding">gtk_button_box_set_child_ipadding</link>()
respectively.
</para>
<para>
<link linkend="gtk-button-box-get-spacing">gtk_button_box_get_spacing</link>() and <link linkend="gtk-button-box-set-spacing">gtk_button_box_set_spacing</link>() retrieve and
change default number of pixels between buttons, respectively.
</para>
<para>
<link linkend="gtk-button-box-get-layout">gtk_button_box_get_layout</link>() and <link linkend="gtk-button-box-set-layout">gtk_button_box_set_layout</link>() retrieve and alter the method
used to spread the buttons in a button box across the container, respectively.
</para>

<para>

</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GtkButtonBox-struct">struct GtkButtonBox</title>
<programlisting>struct GtkButtonBox;</programlisting>
<para>
This is a read-only struct; no members should be modified directly.
</para></refsect2>
<refsect2>
<title><anchor id="GTK-BUTTONBOX-DEFAULT-CAPS">GTK_BUTTONBOX_DEFAULT</title>
<programlisting>#define GTK_BUTTONBOX_DEFAULT -1
</programlisting>
<para>
Used internally only.
</para></refsect2>
<refsect2>
<title><anchor id="gtk-button-box-get-spacing">gtk_button_box_get_spacing()</title>
<programlisting>#define gtk_button_box_get_spacing(b)   gtk_box_get_spacing (GTK_BOX (b))
</programlisting>
<warning>
<para>
<literal>gtk_button_box_get_spacing</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Retrieves how much space a button box is placing between each child button.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>b</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the current spacing applied to the buttons in <parameter>widget</parameter>.
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-button-box-get-layout">gtk_button_box_get_layout ()</title>
<programlisting><link linkend="GtkButtonBoxStyle">GtkButtonBoxStyle</link> gtk_button_box_get_layout (<link linkend="GtkButtonBox">GtkButtonBox</link> *widget);</programlisting>
<para>
Retrieves the method being used to arrange the buttons in a button box.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>widget</parameter>&nbsp;:</entry>
<entry>a <link linkend="GtkButtonBox">GtkButtonBox</link>.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the method used to layout buttons in <parameter>widget</parameter>.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-button-box-get-child-size">gtk_button_box_get_child_size ()</title>
<programlisting>void        gtk_button_box_get_child_size   (<link linkend="GtkButtonBox">GtkButtonBox</link> *widget,
                                             <link linkend="gint">gint</link> *min_width,
                                             <link linkend="gint">gint</link> *min_height);</programlisting>
<warning>
<para>
<literal>gtk_button_box_get_child_size</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Retrieves the current width and height of all child widgets in a button box.
<parameter>min_width</parameter> and <parameter>min_height</parameter> are filled with those values, respectively.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>widget</parameter>&nbsp;:</entry>
<entry>a <link linkend="GtkButtonBox">GtkButtonBox</link>.
</entry></row>
<row><entry align="right"><parameter>min_width</parameter>&nbsp;:</entry>
<entry>the width of the buttons contained by <parameter>widget</parameter>.
</entry></row>
<row><entry align="right"><parameter>min_height</parameter>&nbsp;:</entry>
<entry>the height of the buttons contained by <parameter>widget</parameter>.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-button-box-get-child-ipadding">gtk_button_box_get_child_ipadding ()</title>
<programlisting>void        gtk_button_box_get_child_ipadding
                                            (<link linkend="GtkButtonBox">GtkButtonBox</link> *widget,
                                             <link linkend="gint">gint</link> *ipad_x,
                                             <link linkend="gint">gint</link> *ipad_y);</programlisting>
<warning>
<para>
<literal>gtk_button_box_get_child_ipadding</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Gets the default number of pixels that pad the buttons in a given button box.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>widget</parameter>&nbsp;:</entry>
<entry>a <link linkend="GtkButtonBox">GtkButtonBox</link>.
</entry></row>
<row><entry align="right"><parameter>ipad_x</parameter>&nbsp;:</entry>
<entry>the horizontal padding used by buttons in <parameter>widget</parameter>.
</entry></row>
<row><entry align="right"><parameter>ipad_y</parameter>&nbsp;:</entry>
<entry>the vertical padding used by buttons in <parameter>widget</parameter>.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-button-box-set-spacing">gtk_button_box_set_spacing()</title>
<programlisting>#define gtk_button_box_set_spacing(b,s) gtk_box_set_spacing (GTK_BOX (b), s)
</programlisting>
<warning>
<para>
<literal>gtk_button_box_set_spacing</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Sets the amount of spacing between buttons in a given button box.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>b</parameter>&nbsp;:</entry>
<entry>
</entry></row>
<row><entry align="right"><parameter>s</parameter>&nbsp;:</entry>
<entry>
</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-button-box-set-layout">gtk_button_box_set_layout ()</title>
<programlisting>void        gtk_button_box_set_layout       (<link linkend="GtkButtonBox">GtkButtonBox</link> *widget,
                                             <link linkend="GtkButtonBoxStyle">GtkButtonBoxStyle</link> layout_style);</programlisting>
<para>
Changes the way buttons are arranged in their container.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>widget</parameter>&nbsp;:</entry>
<entry>a <link linkend="GtkButtonBox">GtkButtonBox</link>.
</entry></row>
<row><entry align="right"><parameter>layout_style</parameter>&nbsp;:</entry>
<entry>the new layout style.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-button-box-set-child-size">gtk_button_box_set_child_size ()</title>
<programlisting>void        gtk_button_box_set_child_size   (<link linkend="GtkButtonBox">GtkButtonBox</link> *widget,
                                             <link linkend="gint">gint</link> min_width,
                                             <link linkend="gint">gint</link> min_height);</programlisting>
<warning>
<para>
<literal>gtk_button_box_set_child_size</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Sets a new default size for the children of a given button box.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>widget</parameter>&nbsp;:</entry>
<entry>a <link linkend="GtkButtonBox">GtkButtonBox</link>.
</entry></row>
<row><entry align="right"><parameter>min_width</parameter>&nbsp;:</entry>
<entry>a default width for buttons in <parameter>widget</parameter>.
</entry></row>
<row><entry align="right"><parameter>min_height</parameter>&nbsp;:</entry>
<entry>a default height for buttons in <parameter>widget</parameter>.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-button-box-set-child-ipadding">gtk_button_box_set_child_ipadding ()</title>
<programlisting>void        gtk_button_box_set_child_ipadding
                                            (<link linkend="GtkButtonBox">GtkButtonBox</link> *widget,
                                             <link linkend="gint">gint</link> ipad_x,
                                             <link linkend="gint">gint</link> ipad_y);</programlisting>
<warning>
<para>
<literal>gtk_button_box_set_child_ipadding</literal> is deprecated and should not be used in newly-written code.
</para>
</warning>
<para>
Changes the amount of internal padding used by all buttons in a given button
box.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>widget</parameter>&nbsp;:</entry>
<entry>a <link linkend="GtkButtonBox">GtkButtonBox</link>.
</entry></row>
<row><entry align="right"><parameter>ipad_x</parameter>&nbsp;:</entry>
<entry>the horizontal padding that should be used by each button in <parameter>widget</parameter>.
</entry></row>
<row><entry align="right"><parameter>ipad_y</parameter>&nbsp;:</entry>
<entry>the vertical padding that should be used by each button in <parameter>widget</parameter>.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-button-box-set-child-secondary">gtk_button_box_set_child_secondary ()</title>
<programlisting>void        gtk_button_box_set_child_secondary
                                            (<link linkend="GtkButtonBox">GtkButtonBox</link> *widget,
                                             <link linkend="GtkWidget">GtkWidget</link> *child,
                                             <link linkend="gboolean">gboolean</link> is_secondary);</programlisting>
<para>
Sets whether <parameter>child</parameter> should appear in a secondary group of children.
A typical use of a secondary child is the help button in a dialog.
</para>
<para>
This group appears after the other children if the style
is <literal>GTK_BUTTONBOX_START</literal>, <literal>GTK_BUTTONBOX_SPREAD</literal> or
<literal>GTK_BUTTONBOX_EDGE</literal>, and before the the other children if the style
is <literal>GTK_BUTTONBOX_END</literal>. For horizontal button boxes, the definition
of before/after depends on direction of the widget (see
<link linkend="gtk-widget-set-direction">gtk_widget_set_direction</link>()). If the style is <literal>GTK_BUTTONBOX_START</literal>
or <literal>GTK_BUTTONBOX_END</literal>, then the secondary children are aligned at
the other end of the button box from the main children. For the
other styles, they appear immediately next to the main children.</para>
<para>

</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>widget</parameter>&nbsp;:</entry>
<entry> a <link linkend="GtkButtonBox">GtkButtonBox</link>
</entry></row>
<row><entry align="right"><parameter>child</parameter>&nbsp;:</entry>
<entry> a child of <parameter>widget</parameter>
</entry></row>
<row><entry align="right"><parameter>is_secondary</parameter>&nbsp;:</entry>
<entry> if <literal>TRUE</literal>, the <parameter>child</parameter> appears in a secondary group of the
               button box.
</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>
<refsect1>
<title>Properties</title>
<variablelist>
<varlistentry><term><anchor id="GtkButtonBox--layout-style">&quot;<literal>layout-style</literal>&quot; (<link linkend="GtkButtonBoxStyle">GtkButtonBoxStyle</link> : Read / Write)</term>
<listitem>
<para>

</para></listitem></varlistentry>

</variablelist>
</refsect1>



<refsect1>
<title>See Also</title>
<para>
<variablelist>
<varlistentry>
<term><link linkend="GtkVButtonBox">GtkVButtonBox</link></term>
<listitem><para>Vertical sub-class of <link linkend="GtkButtonBox">GtkButtonBox</link>.</para></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="GtkHButtonBox">GtkHButtonBox</link></term>
<listitem><para>Horizontal sub-class of <link linkend="GtkButtonBox">GtkButtonBox</link>.</para></listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>

</refentry>
