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

📄 gtktoolitem.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<td><p><span class="term"><em class="parameter"><code>tool_item</code></em>&#160;:</span></p></td><td> a <span class="type">""</span></td></tr><tr><td><p><span class="term"><em class="parameter"><code>menu_item_id</code></em>&#160;:</span></p></td><td> a string used to identify <em class="parameter"><code>menu_item</code></em></td></tr><tr><td><p><span class="term"><em class="parameter"><code>menu_item</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a> to be used in the overflow menu</td></tr></tbody></table></div><p class="since">Since  2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3936711"></a><h3><a name="gtk-tool-item-rebuild-menu"></a>gtk_tool_item_rebuild_menu ()</h3><a class="indexterm" name="id3936728"></a><pre class="programlisting">void                gtk_tool_item_rebuild_menu          (<a class="link" href="GtkToolItem.html" title="GtkToolItem">GtkToolItem</a> *tool_item);</pre><p>Calling this function signals to the toolbar that theoverflow menu item for <em class="parameter"><code>tool_item</code></em> has changed. If theoverflow menu is visible when this function it called,the menu will be rebuilt.</p><p>The function must be called when the tool itemchanges what it will do in response to the "create_menu_proxy"signal.</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>&#160;:</span></p></td><td> a <a class="link" href="GtkToolItem.html" title="GtkToolItem"><span class="type">GtkToolItem</span></a></td></tr></tbody></table></div><p class="since">Since  2.6</p></div></div><div class="refsect1" lang="en"><a name="id3936806"></a><h2>Property Details</h2><div class="refsect2" lang="en"><a name="id3936817"></a><h3><a name="GtkToolItem--is-important"></a>The <code class="literal">"is-important"</code> property</h3><a class="indexterm" name="id3936834"></a><pre class="programlisting">  "is-important"             <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>              : Read / Write</pre><p>Whether the toolbar item is considered important. When TRUE, toolbar buttons show text in GTK_TOOLBAR_BOTH_HORIZ mode.</p><p>Default value: FALSE</p></div><hr><div class="refsect2" lang="en"><a name="id3936862"></a><h3><a name="GtkToolItem--visible-horizontal"></a>The <code class="literal">"visible-horizontal"</code> property</h3><a class="indexterm" name="id3936879"></a><pre class="programlisting">  "visible-horizontal"       <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>              : Read / Write</pre><p>Whether the toolbar item is visible when the toolbar is in a horizontal orientation.</p><p>Default value: TRUE</p></div><hr><div class="refsect2" lang="en"><a name="id3936907"></a><h3><a name="GtkToolItem--visible-vertical"></a>The <code class="literal">"visible-vertical"</code> property</h3><a class="indexterm" name="id3936924"></a><pre class="programlisting">  "visible-vertical"         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>              : Read / Write</pre><p>Whether the toolbar item is visible when the toolbar is in a vertical orientation.</p><p>Default value: TRUE</p></div></div><div class="refsect1" lang="en"><a name="id3936953"></a><h2>Signal Details</h2><div class="refsect2" lang="en"><a name="id3936963"></a><h3><a name="GtkToolItem-create-menu-proxy"></a>The <code class="literal">"create-menu-proxy"</code> signal</h3><a class="indexterm" name="id3936980"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>            user_function                      (<a class="link" href="GtkToolItem.html" title="GtkToolItem">GtkToolItem</a> *tool_item,                                                        <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a>     user_data)      : Run Last</pre><p>This signal is emitted when the toolbar needs information from <em class="parameter"><code>tool_item</code></em>about whether the item should appear in the toolbar overflow menu. Inresponse the tool item should either</p><div class="itemizedlist"><ul type="disc"><li>call <a class="link" href="GtkToolItem.html#gtk-tool-item-set-proxy-menu-item"><code class="function">gtk_tool_item_set_proxy_menu_item()</code></a> with a <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>pointer and return <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to indicate that the item should not appearin the overflow menu</li><li> call <a class="link" href="GtkToolItem.html#gtk-tool-item-set-proxy-menu-item"><code class="function">gtk_tool_item_set_proxy_menu_item()</code></a> with a new menuitem and return <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, or </li><li> return <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> to indicate that the signal was nothandled by the item. This means thatthe item will not appear in the overflow menu unless a later handlerinstalls a menu item.</li></ul></div><p></p><p>The toolbar may cache the result of this signal. When the tool item changeshow it will respond to this signal it must call <a class="link" href="GtkToolItem.html#gtk-tool-item-rebuild-menu"><code class="function">gtk_tool_item_rebuild_menu()</code></a>to invalidate the cache and ensure that the toolbar rebuilds its overflowmenu.</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>&#160;:</span></p></td><td> the object the signal was emitted on</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td><td>user data set when the signal handler was connected.</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 signal was handled, <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3937192"></a><h3><a name="GtkToolItem-set-tooltip"></a>The <code class="literal">"set-tooltip"</code> signal</h3><a class="indexterm" name="id3937207"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>            user_function                      (<a class="link" href="GtkToolItem.html" title="GtkToolItem">GtkToolItem</a> *tool_item,                                                        <a class="link" href="GtkTooltips.html" title="GtkTooltips">GtkTooltips</a> *tooltips,                                                        <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a>       *tip_text,                                                        <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a>       *tip_private,                                                        <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a>     user_data)        : Run Last</pre><p>This signal is emitted when the toolitem's tooltip changes.Application developers can use <a class="link" href="GtkToolItem.html#gtk-tool-item-set-tooltip"><code class="function">gtk_tool_item_set_tooltip()</code></a> toset the item's tooltip.</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>&#160;:</span></p></td><td> the object the signal was emitted on</td></tr><tr><td><p><span class="term"><em class="parameter"><code>tooltips</code></em>&#160;:</span></p></td><td> the <a class="link" href="GtkTooltips.html" title="GtkTooltips"><span class="type">GtkTooltips</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>tip_text</code></em>&#160;:</span></p></td><td> the tooltip text</td></tr><tr><td><p><span class="term"><em class="parameter"><code>tip_private</code></em>&#160;:</span></p></td><td> the tooltip private text</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td><td>user data set when the signal handler was connected.</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 signal was handled, <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3937399"></a><h3><a name="GtkToolItem-toolbar-reconfigured"></a>The <code class="literal">"toolbar-reconfigured"</code> signal</h3><a class="indexterm" name="id3937416"></a><pre class="programlisting">void                user_function                      (<a class="link" href="GtkToolItem.html" title="GtkToolItem">GtkToolItem</a> *tool_item,                                                        <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a>     user_data)      : Run Last</pre><p>This signal is emitted when some property of the toolbar that theitem is a child of changes. For custom subclasses of <a class="link" href="GtkToolItem.html" title="GtkToolItem"><span class="type">GtkToolItem</span></a>,the default handler of this signal use the functions</p><div class="itemizedlist"><ul type="disc"><li><a class="link" href="GtkToolbar.html#gtk-toolbar-get-orientation"><code class="function">gtk_toolbar_get_orientation()</code></a></li><li><a class="link" href="GtkToolbar.html#gtk-toolbar-get-style"><code class="function">gtk_toolbar_get_style()</code></a></li><li><a class="link" href="GtkToolbar.html#gtk-toolbar-get-icon-size"><code class="function">gtk_toolbar_get_icon_size()</code></a></li><li><a class="link" href="GtkToolbar.html#gtk-toolbar-get-relief-style"><code class="function">gtk_toolbar_get_relief_style()</code></a></li></ul></div><p>to find out what the toolbar should look like and changethemselves accordingly.</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>&#160;:</span></p></td><td> the object the signal was emitted on</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</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="id3937553"></a><h2>See Also</h2><p><dt><span class="term"><a class="link" href="GtkToolbar.html" title="GtkToolbar"><span class="type">GtkToolbar</span></a></span></dt><dd><p>The toolb

⌨️ 快捷键说明

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