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

<refnamediv>
<refname>GtkAlignment</refname><refpurpose>a widget which controls the alignment and size of its child.</refpurpose>
</refnamediv>

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

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


struct      <link linkend="GtkAlignment-struct">GtkAlignment</link>;
<link linkend="GtkWidget">GtkWidget</link>*  <link linkend="gtk-alignment-new">gtk_alignment_new</link>               (<link linkend="gfloat">gfloat</link> xalign,
                                             <link linkend="gfloat">gfloat</link> yalign,
                                             <link linkend="gfloat">gfloat</link> xscale,
                                             <link linkend="gfloat">gfloat</link> yscale);
void        <link linkend="gtk-alignment-set">gtk_alignment_set</link>               (<link linkend="GtkAlignment">GtkAlignment</link> *alignment,
                                             <link linkend="gfloat">gfloat</link> xalign,
                                             <link linkend="gfloat">gfloat</link> yalign,
                                             <link linkend="gfloat">gfloat</link> xscale,
                                             <link linkend="gfloat">gfloat</link> yscale);


</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="GtkBin">GtkBin</link>
                           +----GtkAlignment
</synopsis>

</refsect1>

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

  &quot;<link linkend="GtkAlignment--xalign">xalign</link>&quot;               <link linkend="gfloat">gfloat</link>               : Read / Write
  &quot;<link linkend="GtkAlignment--yalign">yalign</link>&quot;               <link linkend="gfloat">gfloat</link>               : Read / Write
  &quot;<link linkend="GtkAlignment--xscale">xscale</link>&quot;               <link linkend="gfloat">gfloat</link>               : Read / Write
  &quot;<link linkend="GtkAlignment--yscale">yscale</link>&quot;               <link linkend="gfloat">gfloat</link>               : Read / Write
</synopsis>
</refsect1>



<refsect1>
<title>Description</title>
<para>
The <link linkend="GtkAlignment">GtkAlignment</link> widget controls the alignment and size of its child widget.
It has four settings: xscale, yscale, xalign, and yalign.
</para>
<para>
The scale settings are used to specify how much the child widget should
expand to fill the space allocated to the <link linkend="GtkAlignment">GtkAlignment</link>.
The values can range from 0 (meaning the child doesn't expand at all) to
1 (meaning the child expands to fill all of the available space).
</para>
<para>
The align settings are used to place the child widget within the available
area. The values range from 0 (top or left) to 1 (bottom or right).
Of course, if the scale settings are both set to 1, the alignment settings
have no effect.
</para>
</refsect1>

<refsect1>
<title>Details</title>
<refsect2>
<title><anchor id="GtkAlignment-struct">struct GtkAlignment</title>
<programlisting>struct GtkAlignment;</programlisting>
<para>
The <link linkend="GtkAlignment-struct">GtkAlignment</link> struct contains private data only, and should
be accessed using the functions below.
</para></refsect2>
<refsect2>
<title><anchor id="gtk-alignment-new">gtk_alignment_new ()</title>
<programlisting><link linkend="GtkWidget">GtkWidget</link>*  gtk_alignment_new               (<link linkend="gfloat">gfloat</link> xalign,
                                             <link linkend="gfloat">gfloat</link> yalign,
                                             <link linkend="gfloat">gfloat</link> xscale,
                                             <link linkend="gfloat">gfloat</link> yscale);</programlisting>
<para>
Creates a new <link linkend="GtkAlignment">GtkAlignment</link>.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>xalign</parameter>&nbsp;:</entry>
<entry>the horizontal alignment of the child widget, from 0 (left) to 1
(right).
</entry></row>
<row><entry align="right"><parameter>yalign</parameter>&nbsp;:</entry>
<entry>the vertical alignment of the child widget, from 0 (top) to 1
(bottom).
</entry></row>
<row><entry align="right"><parameter>xscale</parameter>&nbsp;:</entry>
<entry>the amount that the child widget expands horizontally to fill up
unused space, from 0 to 1.
A value of 0 indicates that the child widget should never expand.
A value of 1 indicates that the child widget will expand to fill all of the
space allocated for the <link linkend="GtkAlignment">GtkAlignment</link>.
</entry></row>
<row><entry align="right"><parameter>yscale</parameter>&nbsp;:</entry>
<entry>the amount that the child widget expands vertically to fill up
unused space, from 0 to 1. The values are similar to <parameter>xscale</parameter>.
</entry></row>
<row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>the new <link linkend="GtkAlignment">GtkAlignment</link>.


</entry></row>
</tbody></tgroup></informaltable></refsect2>
<refsect2>
<title><anchor id="gtk-alignment-set">gtk_alignment_set ()</title>
<programlisting>void        gtk_alignment_set               (<link linkend="GtkAlignment">GtkAlignment</link> *alignment,
                                             <link linkend="gfloat">gfloat</link> xalign,
                                             <link linkend="gfloat">gfloat</link> yalign,
                                             <link linkend="gfloat">gfloat</link> xscale,
                                             <link linkend="gfloat">gfloat</link> yscale);</programlisting>
<para>
Sets the <link linkend="GtkAlignment">GtkAlignment</link> values.
</para><informaltable pgwide="1" frame="none" role="params">
<tgroup cols="2">
<colspec colwidth="2*">
<colspec colwidth="8*">
<tbody>
<row><entry align="right"><parameter>alignment</parameter>&nbsp;:</entry>
<entry>a <link linkend="GtkAlignment">GtkAlignment</link>.
</entry></row>
<row><entry align="right"><parameter>xalign</parameter>&nbsp;:</entry>
<entry>the horizontal alignment of the child widget, from 0 (left) to 1
(right).
</entry></row>
<row><entry align="right"><parameter>yalign</parameter>&nbsp;:</entry>
<entry>the vertical alignment of the child widget, from 0 (top) to 1
(bottom).
</entry></row>
<row><entry align="right"><parameter>xscale</parameter>&nbsp;:</entry>
<entry>the amount that the child widget expands horizontally to fill up
unused space, from 0 to 1.
A value of 0 indicates that the child widget should never expand.
A value of 1 indicates that the child widget will expand to fill all of the
space allocated for the <link linkend="GtkAlignment">GtkAlignment</link>.
</entry></row>
<row><entry align="right"><parameter>yscale</parameter>&nbsp;:</entry>
<entry>the amount that the child widget expands vertically to fill up
unused space, from 0 to 1. The values are similar to <parameter>xscale</parameter>.


</entry></row>
</tbody></tgroup></informaltable></refsect2>

</refsect1>
<refsect1>
<title>Properties</title>
<variablelist>
<varlistentry><term><anchor id="GtkAlignment--xalign">&quot;<literal>xalign</literal>&quot; (<link linkend="gfloat">gfloat</link> : Read / Write)</term>
<listitem>
<para>
the horizontal alignment of the child widget, from 0 (left) to 1 (right).
</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkAlignment--yalign">&quot;<literal>yalign</literal>&quot; (<link linkend="gfloat">gfloat</link> : Read / Write)</term>
<listitem>
<para>
the vertical alignment of the child widget, from 0 (top) to 1 (bottom).
</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkAlignment--xscale">&quot;<literal>xscale</literal>&quot; (<link linkend="gfloat">gfloat</link> : Read / Write)</term>
<listitem>
<para>
the amount that the child widget expands horizontally to fill up
unused space, from 0 to 1.
A value of 0 indicates that the child widget should never expand.
A value of 1 indicates that the child widget will expand to fill all of the
space allocated for the <link linkend="GtkAlignment">GtkAlignment</link>.
</para></listitem></varlistentry>
<varlistentry><term><anchor id="GtkAlignment--yscale">&quot;<literal>yscale</literal>&quot; (<link linkend="gfloat">gfloat</link> : Read / Write)</term>
<listitem>
<para>
the amount that the child widget expands vertically to fill up
unused space, from 0 to 1. The values are similar to <parameter>xscale</parameter>.
</para></listitem></varlistentry>

</variablelist>
</refsect1>




</refentry>
