📄 gtktoolbutton.html
字号:
</p></div><hr><div class="refsect2" lang="en"><a name="id3946725"></a><h3><a name="gtk-tool-button-set-label-widget"></a>gtk_tool_button_set_label_widget ()</h3><a class="indexterm" name="id3946741"></a><pre class="programlisting">void gtk_tool_button_set_label_widget (<a class="link" href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *button, <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> *label_widget);</pre><p>Sets <em class="parameter"><code>label_widget</code></em> as the widget that will be used as the labelfor <em class="parameter"><code>button</code></em>. If <em class="parameter"><code>label_widget</code></em> is <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> the "label" property is usedas label. If "label" is also <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, the label in the stock itemdetermined by the "stock_id" property is used as label. If"stock_id" is also <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, <em class="parameter"><code>button</code></em> does not have a label.</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> :</span></p></td><td> a <a class="link" href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>label_widget</code></em> :</span></p></td><td> the widget used as label, 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="id3946896"></a><h3><a name="gtk-tool-button-get-label-widget"></a>gtk_tool_button_get_label_widget ()</h3><a class="indexterm" name="id3946912"></a><pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* gtk_tool_button_get_label_widget (<a class="link" href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *button);</pre><p>Returns the widget used as label on <em class="parameter"><code>button</code></em>. See<a class="link" href="GtkToolButton.html#gtk-tool-button-set-label-widget"><code class="function">gtk_tool_button_set_label_widget()</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> :</span></p></td><td> a <a class="link" href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> The widget used as label on <em class="parameter"><code>button</code></em>, 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></div><div class="refsect1" lang="en"><a name="id3947023"></a><h2>Property Details</h2><div class="refsect2" lang="en"><a name="id3947033"></a><h3><a name="GtkToolButton--icon-name"></a>The <code class="literal">"icon-name"</code> property</h3><a class="indexterm" name="id3947050"></a><pre class="programlisting"> "icon-name" <ahref="/usr/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray">gchararray</a> : Read / Write</pre><p>The name of the themed icon displayed on the item.This property only has an effect if not overridden by "label", "icon_widget" or "stock_id" properties.</p><p></p><p>Default value: NULL</p><p>Since 2.8 </p></div><hr><div class="refsect2" lang="en"><a name="id3947087"></a><h3><a name="GtkToolButton--icon-widget"></a>The <code class="literal">"icon-widget"</code> property</h3><a class="indexterm" name="id3947104"></a><pre class="programlisting"> "icon-widget" <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> : Read / Write</pre><p>Icon widget to display in the item.</p></div><hr><div class="refsect2" lang="en"><a name="id3947127"></a><h3><a name="GtkToolButton--label"></a>The <code class="literal">"label"</code> property</h3><a class="indexterm" name="id3947143"></a><pre class="programlisting"> "label" <ahref="/usr/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray">gchararray</a> : Read / Write</pre><p>Text to show in the item.</p><p>Default value: NULL</p></div><hr><div class="refsect2" lang="en"><a name="id3947170"></a><h3><a name="GtkToolButton--label-widget"></a>The <code class="literal">"label-widget"</code> property</h3><a class="indexterm" name="id3947187"></a><pre class="programlisting"> "label-widget" <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a> : Read / Write</pre><p>Widget to use as the item label.</p></div><hr><div class="refsect2" lang="en"><a name="id3947210"></a><h3><a name="GtkToolButton--stock-id"></a>The <code class="literal">"stock-id"</code> property</h3><a class="indexterm" name="id3947226"></a><pre class="programlisting"> "stock-id" <ahref="/usr/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray">gchararray</a> : Read / Write</pre><p>The stock icon displayed on the item.</p><p>Default value: NULL</p></div><hr><div class="refsect2" lang="en"><a name="id3947252"></a><h3><a name="GtkToolButton--use-underline"></a>The <code class="literal">"use-underline"</code> property</h3><a class="indexterm" name="id3947270"></a><pre class="programlisting"> "use-underline" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> : Read / Write</pre><p>If set, an underline in the label property indicates that the next character should be used for the mnemonic accelerator key in the overflow menu.</p><p>Default value: FALSE</p></div></div><div class="refsect1" lang="en"><a name="id3947299"></a><h2>Style Property Details</h2><div class="refsect2" lang="en"><a name="id3947310"></a><h3><a name="GtkToolButton--icon-spacing"></a>The <code class="literal">"icon-spacing"</code> style property</h3><a class="indexterm" name="id3947327"></a><pre class="programlisting"> "icon-spacing" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> : Read / Write</pre><p>Spacing in pixels between the icon and label.</p><p>Allowed values: >= 0</p><p>Default value: 0</p></div></div><div class="refsect1" lang="en"><a name="id3947359"></a><h2>Signal Details</h2><div class="refsect2" lang="en"><a name="id3947369"></a><h3><a name="GtkToolButton-clicked"></a>The <code class="literal">"clicked"</code> signal</h3><a class="indexterm" name="id3947386"></a><pre class="programlisting">void user_function (<a class="link" href="GtkToolButton.html" title="GtkToolButton">GtkToolButton</a> *toolbutton, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a> user_data) : Run First / Action</pre><p>This signal is emitted when the tool button is clicked with the mouseor activated with the keyboard.</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>toolbutton</code></em> :</span></p></td><td> the object that emitted the signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td><td>user data set when the signal handler was connected.</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id3947462"></a><h2>See Also</h2><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><a class="link" href="GtkToolbar.html" title="GtkToolbar"><span class="type">GtkToolbar</span></a></span></p></td><td><p>The toolbar widget</p></td></tr><tr><td><p><span class="term"><a class="link" href="GtkMenuToolButton.html" title="GtkMenuToolButton"><span class="type">GtkMenuToolButton</span></a></span></p></td><td><p>A subclass of <a class="link" href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a> that displays on the toolbar a button with an additional dropdown menu</p></td></tr><tr><td><p><span class="term"><a class="link" href="GtkToggleToolButton.html" title="GtkToggleToolButton"><span class="type">GtkToggleToolButton</span></a></span></p></td><td><p>A subclass of <a class="link" href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a> that displays toggle buttons on the toolbar</p></td></tr><tr><td><p><span class="term"><a class="link" href="GtkRadioToolButton.html" title="GtkRadioToolButton"><span class="type">GtkRadioToolButton</span></a></span></p></td><td><p>A subclass of <a class="link" href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a> that displays radio buttons on the toolbar</p></td></tr><tr><td><p><span class="term"><a class="link" href="GtkSeparatorToolItem.html" title="GtkSeparatorToolItem"><span class="type">GtkSeparatorToolItem</span></a></span></p></td><td><p>A subclass of <a class="link" href="GtkToolItem.html" title="GtkToolItem"><span class="type">GtkToolItem</span></a> that separates groups of items on a toolbar</p></td></tr></tbody></table></div><p></p></div><div class="refsect1" lang="en"><a name="id3947597"></a><div class="refsect2" lang="en"><a name="id3947598"></a></div><hr><div class="refsect2" lang="en"><a name="id3947599"></a></div></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -