⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gtkbutton.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<a name="id3493672"></a><h3><a name="gtk-button-get-focus-on-click"></a>gtk_button_get_focus_on_click ()</h3><a class="indexterm" name="id3493688"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>            gtk_button_get_focus_on_click       (<a class="link" href="GtkButton.html" title="GtkButton">GtkButton</a> *button);</pre><p>Returns whether the button grabs focus when it is clicked with the mouse.See <a class="link" href="GtkButton.html#gtk-button-set-focus-on-click"><code class="function">gtk_button_set_focus_on_click()</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>button</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the button grabs focus when it is clicked with              the mouse.</td></tr></tbody></table></div><p class="since">Since  2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3493786"></a><h3><a name="gtk-button-set-alignment"></a>gtk_button_set_alignment ()</h3><a class="indexterm" name="id3493802"></a><pre class="programlisting">void                gtk_button_set_alignment            (<a class="link" href="GtkButton.html" title="GtkButton">GtkButton</a> *button,                                                         <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);</pre><p>Sets the alignment of the child. This property has no effect unless the child is a <a class="link" href="GtkMisc.html" title="GtkMisc"><span class="type">GtkMisc</span></a> or a <span class="type">GtkAligment</span>.</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>button</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>xalign</code></em>&#160;:</span></p></td><td> the horizontal position of the child, 0.0 is left aligned,   1.0 is right aligned</td></tr><tr><td><p><span class="term"><em class="parameter"><code>yalign</code></em>&#160;:</span></p></td><td> the vertical position of the child, 0.0 is top aligned,   1.0 is bottom aligned</td></tr></tbody></table></div><p class="since">Since  2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3493930"></a><h3><a name="gtk-button-get-alignment"></a>gtk_button_get_alignment ()</h3><a class="indexterm" name="id3493945"></a><pre class="programlisting">void                gtk_button_get_alignment            (<a class="link" href="GtkButton.html" title="GtkButton">GtkButton</a> *button,                                                         <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);</pre><p>Gets the alignment of the child in the button.</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>button</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>xalign</code></em>&#160;:</span></p></td><td> return location for horizontal alignment</td></tr><tr><td><p><span class="term"><em class="parameter"><code>yalign</code></em>&#160;:</span></p></td><td> return location for vertical alignment</td></tr></tbody></table></div><p class="since">Since  2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3494054"></a><h3><a name="gtk-button-set-image"></a>gtk_button_set_image ()</h3><a class="indexterm" name="id3494070"></a><pre class="programlisting">void                gtk_button_set_image                (<a class="link" href="GtkButton.html" title="GtkButton">GtkButton</a> *button,                                                         <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *image);</pre><p>Set the image of <em class="parameter"><code>button</code></em> to the given widget. Note thatit depends on the <a class="link" href="GtkSettings.html#GtkSettings--gtk-button-images"><span class="type">"gtk-button-images"</span></a> setting whether theimage will be displayed or not, you don't have to call<a class="link" href="GtkWidget.html#gtk-widget-show"><code class="function">gtk_widget_show()</code></a> on <em class="parameter"><code>image</code></em> yourself.</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>button</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>image</code></em>&#160;:</span></p></td><td> a widget to set as the image for the button</td></tr></tbody></table></div><p class="since">Since  2.6</p></div><hr><div class="refsect2" lang="en"><a name="id3494190"></a><h3><a name="gtk-button-get-image"></a>gtk_button_get_image ()</h3><a class="indexterm" name="id3494206"></a><pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*          gtk_button_get_image                (<a class="link" href="GtkButton.html" title="GtkButton">GtkButton</a> *button);</pre><p>Gets the widget that is currenty set as the image of <em class="parameter"><code>button</code></em>.This may have been explicitly set by <a class="link" href="GtkButton.html#gtk-button-set-image"><code class="function">gtk_button_set_image()</code></a>or constructed by <a class="link" href="GtkButton.html#gtk-button-new-from-stock"><code class="function">gtk_button_new_from_stock()</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>button</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a> or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> in case there is no image</td></tr></tbody></table></div><p class="since">Since  2.6</p></div><hr><div class="refsect2" lang="en"><a name="id3494328"></a><h3><a name="gtk-button-set-image-position"></a>gtk_button_set_image_position ()</h3><a class="indexterm" name="id3494343"></a><pre class="programlisting">void                gtk_button_set_image_position       (<a class="link" href="GtkButton.html" title="GtkButton">GtkButton</a> *button,                                                         <a class="link" href="gtk-Standard-Enumerations.html#GtkPositionType">GtkPositionType</a> position);</pre><p>Sets the position of the image relative to the text inside the button.</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>button</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>position</code></em>&#160;:</span></p></td><td> the position</td></tr></tbody></table></div><p class="since">Since  2.10</p></div><hr><div class="refsect2" lang="en"><a name="id3494431"></a><h3><a name="gtk-button-get-image-position"></a>gtk_button_get_image_position ()</h3><a class="indexterm" name="id3494446"></a><pre class="programlisting"><a class="link" href="gtk-Standard-Enumerations.html#GtkPositionType">GtkPositionType</a>     gtk_button_get_image_position       (<a class="link" href="GtkButton.html" title="GtkButton">GtkButton</a> *button);</pre><p>Gets the position of the image relative to the text inside the button.</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>button</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkButton.html" title="GtkButton"><span class="type">GtkButton</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> the position</td></tr></tbody></table></div><p class="since">Since  2.10</p></div></div><div class="refsect1" lang="en"><a name="id3494524"></a><h2>Property Details</h2><div class="refsect2" lang="en"><a name="id3494534"></a><h3><a name="GtkButton--focus-on-click"></a>The <code class="literal">"focus-on-click"</code> property</h3><a class="indexterm" name="id3494551"></a><pre class="programlisting">  "focus-on-click"           <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>              : Read / Write</pre><p>Whether the button grabs focus when it is clicked with the mouse.</p><p>Default value: TRUE</p></div><hr><div class="refsect2" lang="en"><a name="id3494578"></a><h3><a name="GtkButton--image"></a>The <code class="literal">"image"</code> property</h3><a class="indexterm" name="id3494594"></a><pre class="programlisting">  "image"                    <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>             : Read / Write</pre><p>Child widget to appear next to the button text.</p></div><hr><div class="refsect2" lang="en"><a name="id3494618"></a><h3><a name="GtkButton--image-position"></a>The <code class="literal">"image-position"</code> property</h3><a class="indexterm" name="id3494634"></a><pre class="programlisting">  "image-position"           <a class="link" href="gtk-Standard-Enumerations.html#GtkPositionType">GtkPositionType</a>       : Read / Write</pre>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -