📄 gtkalignment.html
字号:
<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gfloat">gfloat</a> xalign, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gfloat">gfloat</a> yalign, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gfloat">gfloat</a> xscale, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gfloat">gfloat</a> yscale);</pre><p>Sets the <a class="link" href="GtkAlignment.html" title="GtkAlignment"><span class="type">GtkAlignment</span></a> values.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>alignment</code></em> :</span></p></td><td>a <a class="link" href="GtkAlignment.html" title="GtkAlignment"><span class="type">GtkAlignment</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>xalign</code></em> :</span></p></td><td>the horizontal alignment of the child widget, from 0 (left) to 1(right).</td></tr><tr><td><p><span class="term"><em class="parameter"><code>yalign</code></em> :</span></p></td><td>the vertical alignment of the child widget, from 0 (top) to 1(bottom).</td></tr><tr><td><p><span class="term"><em class="parameter"><code>xscale</code></em> :</span></p></td><td>the amount that the child widget expands horizontally to fill upunused 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 thespace allocated for the <a class="link" href="GtkAlignment.html" title="GtkAlignment"><span class="type">GtkAlignment</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>yscale</code></em> :</span></p></td><td>the amount that the child widget expands vertically to fill upunused space, from 0 to 1. The values are similar to <em class="parameter"><code>xscale</code></em>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4057863"></a><h3><a name="gtk-alignment-get-padding"></a>gtk_alignment_get_padding ()</h3><a class="indexterm" name="id4057879"></a><pre class="programlisting">void gtk_alignment_get_padding (<a class="link" href="GtkAlignment.html" title="GtkAlignment">GtkAlignment</a> *alignment, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> *padding_top, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> *padding_bottom, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> *padding_left, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> *padding_right);</pre><p>Gets the padding on the different sides of the widget.See <a class="link" href="GtkAlignment.html#gtk-alignment-set-padding"><code class="function">gtk_alignment_set_padding()</code></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>alignment</code></em> :</span></p></td><td> a <a class="link" href="GtkAlignment.html" title="GtkAlignment"><span class="type">GtkAlignment</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>padding_top</code></em> :</span></p></td><td> location to store the padding for the top of the widget, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>padding_bottom</code></em> :</span></p></td><td> location to store the padding for the bottom of the widget, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>padding_left</code></em> :</span></p></td><td> location to store the padding for the left of the widget, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>padding_right</code></em> :</span></p></td><td> location to store the padding for the right of the widget, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr></tbody></table></div><p class="since">Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id4058086"></a><h3><a name="gtk-alignment-set-padding"></a>gtk_alignment_set_padding ()</h3><a class="indexterm" name="id4058103"></a><pre class="programlisting">void gtk_alignment_set_padding (<a class="link" href="GtkAlignment.html" title="GtkAlignment">GtkAlignment</a> *alignment, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> padding_top, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> padding_bottom, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> padding_left, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> padding_right);</pre><p>Sets the padding on the different sides of the widget.The padding adds blank space to the sides of the widget. For instance,this can be used to indent the child widget towards the right by addingpadding on the left.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>alignment</code></em> :</span></p></td><td> a <a class="link" href="GtkAlignment.html" title="GtkAlignment"><span class="type">GtkAlignment</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>padding_top</code></em> :</span></p></td><td> the padding at the top of the widget</td></tr><tr><td><p><span class="term"><em class="parameter"><code>padding_bottom</code></em> :</span></p></td><td> the padding at the bottom of the widget</td></tr><tr><td><p><span class="term"><em class="parameter"><code>padding_left</code></em> :</span></p></td><td> the padding at the left of the widget</td></tr><tr><td><p><span class="term"><em class="parameter"><code>padding_right</code></em> :</span></p></td><td> the padding at the right of the widget.</td></tr></tbody></table></div><p class="since">Since 2.4</p></div></div><div class="refsect1" lang="en"><a name="id4058261"></a><h2>Property Details</h2><div class="refsect2" lang="en"><a name="id4058272"></a><h3><a name="GtkAlignment--bottom-padding"></a>The <code class="literal">"bottom-padding"</code> property</h3><a class="indexterm" name="id4058289"></a><pre class="programlisting"> "bottom-padding" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> : Read / Write</pre><p>The padding to insert at the bottom of the widget.</p><p></p><p>Allowed values: <= G_MAXINT</p><p>Default value: 0</p><p>Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id4058328"></a><h3><a name="GtkAlignment--left-padding"></a>The <code class="literal">"left-padding"</code> property</h3><a class="indexterm" name="id4058345"></a><pre class="programlisting"> "left-padding" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> : Read / Write</pre><p>The padding to insert at the left of the widget.</p><p></p><p>Allowed values: <= G_MAXINT</p><p>Default value: 0</p><p>Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id4058384"></a><h3><a name="GtkAlignment--right-padding"></a>The <code class="literal">"right-padding"</code> property</h3><a class="indexterm" name="id4058401"></a><pre class="programlisting"> "right-padding" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> : Read / Write</pre><p>The padding to insert at the right of the widget.</p><p></p><p>Allowed values: <= G_MAXINT</p><p>Default value: 0</p><p>Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id4058440"></a><h3><a name="GtkAlignment--top-padding"></a>The <code class="literal">"top-padding"</code> property</h3><a class="indexterm" name="id4058457"></a><pre class="programlisting"> "top-padding" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> : Read / Write</pre><p>The padding to insert at the top of the widget.</p><p></p><p>Allowed values: <= G_MAXINT</p><p>Default value: 0</p><p>Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id4058496"></a><h3><a name="GtkAlignment--xalign"></a>The <code class="literal">"xalign"</code> property</h3><a class="indexterm" name="id4058513"></a><pre class="programlisting"> "xalign" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gfloat">gfloat</a> : Read / Write</pre><p>Horizontal position of child in available space. 0.0 is left aligned, 1.0 is right aligned.</p><p>Allowed values: [0,1]</p><p>Default value: 0.5</p></div><hr><div class="refsect2" lang="en"><a name="id4058545"></a><h3><a name="GtkAlignment--xscale"></a>The <code class="literal">"xscale"</code> property</h3><a class="indexterm" name="id4058561"></a><pre class="programlisting"> "xscale" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gfloat">gfloat</a> : Read / Write</pre><p>If available horizontal space is bigger than needed for the child, how much of it to use for the child. 0.0 means none, 1.0 means all.</p><p>Allowed values: [0,1]</p><p>Default value: 1</p></div><hr><div class="refsect2" lang="en"><a name="id4058594"></a><h3><a name="GtkAlignment--yalign"></a>The <code class="literal">"yalign"</code> property</h3><a class="indexterm" name="id4058611"></a><pre class="programlisting"> "yalign" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gfloat">gfloat</a> : Read / Write</pre><p>Vertical position of child in available space. 0.0 is top aligned, 1.0 is bottom aligned.</p><p>Allowed values: [0,1]</p><p>Default value: 0.5</p></div><hr><div class="refsect2" lang="en"><a name="id4058643"></a><h3><a name="GtkAlignment--yscale"></a>The <code class="literal">"yscale"</code> property</h3><a class="indexterm" name="id4058659"></a><pre class="programlisting"> "yscale" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gfloat">gfloat</a> : Read / Write</pre><p>If available vertical space is bigger than needed for the child, how much of it to use for the child. 0.0 means none, 1.0 means all.</p><p>Allowed values: [0,1]</p><p>Default value: 1</p></div></div><div class="refsect1" lang="en"><a name="id4058693"></a><div class="refsect2" lang="en"><a name="id4058694"></a></div><hr><div class="refsect2" lang="en"><a name="id4058695"></a></div></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -