📄 gtktoolitem.html
字号:
</tr></tbody></table></div><p class="since">Since 2.12</p></div><hr><div class="refsect2" lang="en"><a name="id3934643"></a><h3><a name="gtk-tool-item-set-use-drag-window"></a>gtk_tool_item_set_use_drag_window ()</h3><a class="indexterm" name="id3934660"></a><pre class="programlisting">void gtk_tool_item_set_use_drag_window (<a class="link" href="GtkToolItem.html" title="GtkToolItem">GtkToolItem</a> *tool_item, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> use_drag_window);</pre><p>Sets whether <em class="parameter"><code>tool_item</code></em> has a drag window. When <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> thetoolitem can be used as a drag source through <a class="link" href="gtk-Drag-and-Drop.html#gtk-drag-source-set"><code class="function">gtk_drag_source_set()</code></a>.When <em class="parameter"><code>tool_item</code></em> has a drag window it will intercept all events,even those that would otherwise be sent to a child of <em class="parameter"><code>tool_item</code></em>.</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>tool_item</code></em> :</span></p></td><td> a <a class="link" href="GtkToolItem.html" title="GtkToolItem"><span class="type">GtkToolItem</span></a> </td></tr><tr><td><p><span class="term"><em class="parameter"><code>use_drag_window</code></em> :</span></p></td><td> Whether <em class="parameter"><code>tool_item</code></em> has a drag window.</td></tr></tbody></table></div><p class="since">Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3934794"></a><h3><a name="gtk-tool-item-get-use-drag-window"></a>gtk_tool_item_get_use_drag_window ()</h3><a class="indexterm" name="id3934810"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> gtk_tool_item_get_use_drag_window (<a class="link" href="GtkToolItem.html" title="GtkToolItem">GtkToolItem</a> *tool_item);</pre><p>Returns whether <em class="parameter"><code>tool_item</code></em> has a drag window. See<a class="link" href="GtkToolItem.html#gtk-tool-item-set-use-drag-window"><code class="function">gtk_tool_item_set_use_drag_window()</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>tool_item</code></em> :</span></p></td><td> a <a class="link" href="GtkToolItem.html" title="GtkToolItem"><span class="type">GtkToolItem</span></a> </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>tool_item</code></em> uses a drag window.</td></tr></tbody></table></div><p class="since">Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3934918"></a><h3><a name="gtk-tool-item-set-visible-horizontal"></a>gtk_tool_item_set_visible_horizontal ()</h3><a class="indexterm" name="id3934934"></a><pre class="programlisting">void gtk_tool_item_set_visible_horizontal (<a class="link" href="GtkToolItem.html" title="GtkToolItem">GtkToolItem</a> *tool_item, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> visible_horizontal);</pre><p>Sets whether <em class="parameter"><code>tool_item</code></em> is visible when the toolbar is docked horizontally.</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>tool_item</code></em> :</span></p></td><td> a <a class="link" href="GtkToolItem.html" title="GtkToolItem"><span class="type">GtkToolItem</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>visible_horizontal</code></em> :</span></p></td><td> Whether <em class="parameter"><code>tool_item</code></em> is visible when in horizontal mode</td></tr></tbody></table></div><p class="since">Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3935035"></a><h3><a name="gtk-tool-item-get-visible-horizontal"></a>gtk_tool_item_get_visible_horizontal ()</h3><a class="indexterm" name="id3935051"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> gtk_tool_item_get_visible_horizontal (<a class="link" href="GtkToolItem.html" title="GtkToolItem">GtkToolItem</a> *tool_item);</pre><p>Returns whether the <em class="parameter"><code>tool_item</code></em> is visible on toolbars that aredocked horizontally.</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>tool_item</code></em> :</span></p></td><td> a <a class="link" href="GtkToolItem.html" title="GtkToolItem"><span class="type">GtkToolItem</span></a> </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>tool_item</code></em> is visible on toolbars that aredocked horizontally.</td></tr></tbody></table></div><p class="since">Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3935151"></a><h3><a name="gtk-tool-item-set-visible-vertical"></a>gtk_tool_item_set_visible_vertical ()</h3><a class="indexterm" name="id3935168"></a><pre class="programlisting">void gtk_tool_item_set_visible_vertical (<a class="link" href="GtkToolItem.html" title="GtkToolItem">GtkToolItem</a> *tool_item, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> visible_vertical);</pre><p>Sets whether <em class="parameter"><code>tool_item</code></em> is visible when the toolbar is dockedvertically. Some tool items, such as text entries, are too wide to beuseful on a vertically docked toolbar. If <em class="parameter"><code>visible_vertical</code></em> is <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a><em class="parameter"><code>tool_item</code></em> will not appear on toolbars that are docked vertically.</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>tool_item</code></em> :</span></p></td><td> a <a class="link" href="GtkToolItem.html" title="GtkToolItem"><span class="type">GtkToolItem</span></a> </td></tr><tr><td><p><span class="term"><em class="parameter"><code>visible_vertical</code></em> :</span></p></td><td> whether <em class="parameter"><code>tool_item</code></em> is visible when the toolbaris in vertical mode</td></tr></tbody></table></div><p class="since">Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3935292"></a><h3><a name="gtk-tool-item-get-visible-vertical"></a>gtk_tool_item_get_visible_vertical ()</h3><a class="indexterm" name="id3935308"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> gtk_tool_item_get_visible_vertical (<a class="link" href="GtkToolItem.html" title="GtkToolItem">GtkToolItem</a> *tool_item);</pre><p>Returns whether <em class="parameter"><code>tool_item</code></em> is visible when the toolbar is docked vertically.See <a class="link" href="GtkToolItem.html#gtk-tool-item-set-visible-vertical"><code class="function">gtk_tool_item_set_visible_vertical()</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>tool_item</code></em> :</span></p></td><td> a <a class="link" href="GtkToolItem.html" title="GtkToolItem"><span class="type">GtkToolItem</span></a> </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> Whether <em class="parameter"><code>tool_item</code></em> is visible when the toolbar is docked vertically</td></tr></tbody></table></div><p class="since">Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3935407"></a><h3><a name="gtk-tool-item-set-is-important"></a>gtk_tool_item_set_is_important ()</h3><a class="indexterm" name="id3935423"></a><pre class="programlisting">void gtk_tool_item_set_is_important (<a class="link" href="GtkToolItem.html" title="GtkToolItem">GtkToolItem</a> *tool_item, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> is_important);</pre><p>Sets whether <em class="parameter"><code>tool_item</code></em> should be considered important. The <a class="link" href="GtkToolButton.html" title="GtkToolButton"><span class="type">GtkToolButton</span></a>class uses this property to determine whether to show or hide its labelwhen the toolbar style is <a class="link" href="gtk-Standard-Enumerations.html#GTK-TOOLBAR-BOTH-HORIZ:CAPS"><code class="literal">GTK_TOOLBAR_BOTH_HORIZ</code></a>. The result is thatonly tool buttons with the "is_important" property set have labels, aneffect known as "priority text"</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>tool_item</code></em> :</span></p></td><td> a <a class="link" href="GtkToolItem.html" title="GtkToolItem"><span class="type">GtkToolItem</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>is_important</code></em> :</span></p></td><td> whether the tool item should be considered important</td></tr></tbody></table></div><p class="since">Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3935540"></a><h3><a name="gtk-tool-item-get-is-important"></a>gtk_tool_item_get_is_important ()</h3><a class="indexterm" name="id3935556"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> gtk_tool_item_get_is_important (<a class="link" href="GtkToolItem.html" title="GtkToolItem">GtkToolItem</a> *tool_item);</pre><p>Returns whether <em class="parameter"><code>tool_item</code></em> is considered important. See<a class="link" href="GtkToolItem.html#gtk-tool-item-set-is-important"><code class="function">gtk_tool_item_set_is_important()</code></a></p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -