📄 gtkaspectframe.html
字号:
<a name="id4060824"></a><h3><a name="GtkAspectFrame-struct"></a>GtkAspectFrame</h3><a class="indexterm" name="id4060838"></a><pre class="programlisting">typedef struct _GtkAspectFrame GtkAspectFrame;</pre><p></p></div><hr><div class="refsect2" lang="en"><a name="id4060853"></a><h3><a name="gtk-aspect-frame-new"></a>gtk_aspect_frame_new ()</h3><a class="indexterm" name="id4060866"></a><pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* gtk_aspect_frame_new (const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *label, <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> ratio, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> obey_child);</pre><p>Create a new <a class="link" href="GtkAspectFrame.html" title="GtkAspectFrame"><span class="type">GtkAspectFrame</span></a>.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td><td>Label text.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>xalign</code></em> :</span></p></td><td>Horizontal alignment of the child within the allocation ofthe <a class="link" href="GtkAspectFrame.html" title="GtkAspectFrame"><span class="type">GtkAspectFrame</span></a>. This ranges from 0.0 (left aligned)to 1.0 (right aligned)</td></tr><tr><td><p><span class="term"><em class="parameter"><code>yalign</code></em> :</span></p></td><td>Vertical alignment of the child within the allocation ofthe <a class="link" href="GtkAspectFrame.html" title="GtkAspectFrame"><span class="type">GtkAspectFrame</span></a>. This ranges from 0.0 (left aligned)to 1.0 (right aligned)</td></tr><tr><td><p><span class="term"><em class="parameter"><code>ratio</code></em> :</span></p></td><td>The desired aspect ratio.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>obey_child</code></em> :</span></p></td><td>If <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, <em class="parameter"><code>ratio</code></em> is ignored, and the aspect ratio is taken from the requistion of the child.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the new <a class="link" href="GtkAspectFrame.html" title="GtkAspectFrame"><span class="type">GtkAspectFrame</span></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4061064"></a><h3><a name="gtk-aspect-frame-set"></a>gtk_aspect_frame_set ()</h3><a class="indexterm" name="id4061077"></a><pre class="programlisting">void gtk_aspect_frame_set (<a class="link" href="GtkAspectFrame.html" title="GtkAspectFrame">GtkAspectFrame</a> *aspect_frame, <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> ratio, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> obey_child);</pre><p>Set parameters for an existing <a class="link" href="GtkAspectFrame.html" title="GtkAspectFrame"><span class="type">GtkAspectFrame</span></a>.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>aspect_frame</code></em> :</span></p></td><td>a <a class="link" href="GtkAspectFrame.html" title="GtkAspectFrame"><span class="type">GtkAspectFrame</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>xalign</code></em> :</span></p></td><td>Horizontal alignment of the child within the allocation ofthe <a class="link" href="GtkAspectFrame.html" title="GtkAspectFrame"><span class="type">GtkAspectFrame</span></a>. This ranges from 0.0 (left aligned)to 1.0 (right aligned)</td></tr><tr><td><p><span class="term"><em class="parameter"><code>yalign</code></em> :</span></p></td><td>Vertical alignment of the child within the allocation ofthe <a class="link" href="GtkAspectFrame.html" title="GtkAspectFrame"><span class="type">GtkAspectFrame</span></a>. This ranges from 0.0 (left aligned)to 1.0 (right aligned)</td></tr><tr><td><p><span class="term"><em class="parameter"><code>ratio</code></em> :</span></p></td><td>The desired aspect ratio.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>obey_child</code></em> :</span></p></td><td>If <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, <em class="parameter"><code>ratio</code></em> is ignored, and the aspect ratio is taken from the requistion of the child.</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id4061266"></a><h2>Property Details</h2><div class="refsect2" lang="en"><a name="id4061277"></a><h3><a name="GtkAspectFrame--obey-child"></a>The <code class="literal">"obey-child"</code> property</h3><a class="indexterm" name="id4061294"></a><pre class="programlisting"> "obey-child" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> : Read / Write</pre><p>Force aspect ratio to match that of the frame's child.</p><p>Default value: TRUE</p></div><hr><div class="refsect2" lang="en"><a name="id4061321"></a><h3><a name="GtkAspectFrame--ratio"></a>The <code class="literal">"ratio"</code> property</h3><a class="indexterm" name="id4061337"></a><pre class="programlisting"> "ratio" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gfloat">gfloat</a> : Read / Write</pre><p>Aspect ratio if obey_child is FALSE.</p><p>Allowed values: [0.0001,10000]</p><p>Default value: 0.5</p></div><hr><div class="refsect2" lang="en"><a name="id4061368"></a><h3><a name="GtkAspectFrame--xalign"></a>The <code class="literal">"xalign"</code> property</h3><a class="indexterm" name="id4061385"></a><pre class="programlisting"> "xalign" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gfloat">gfloat</a> : Read / Write</pre><p>X alignment of the child.</p><p>Allowed values: [0,1]</p><p>Default value: 0.5</p></div><hr><div class="refsect2" lang="en"><a name="id4061416"></a><h3><a name="GtkAspectFrame--yalign"></a>The <code class="literal">"yalign"</code> property</h3><a class="indexterm" name="id4061432"></a><pre class="programlisting"> "yalign" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gfloat">gfloat</a> : Read / Write</pre><p>Y alignment of the child.</p><p>Allowed values: [0,1]</p><p>Default value: 0.5</p></div></div><div class="refsect1" lang="en"><a name="id4061465"></a><div class="refsect2" lang="en"><a name="id4061466"></a></div><hr><div class="refsect2" lang="en"><a name="id4061467"></a></div></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -