📄 gtkrecentaction.html
字号:
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td><td> a unique name for the action</td></tr><tr><td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td><td> the label displayed in menu items and on buttons, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>tooltip</code></em> :</span></p></td><td> a tooltip for the action, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>stock_id</code></em> :</span></p></td><td> the stock icon to display in widgets representing the action, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the newly created <a class="link" href="GtkRecentAction.html" title="GtkRecentAction"><span class="type">GtkRecentAction</span></a>.</td></tr></tbody></table></div><p class="since">Since 2.12</p></div><hr><div class="refsect2" lang="en"><a name="id3995285"></a><h3><a name="gtk-recent-action-new-for-manager"></a>gtk_recent_action_new_for_manager ()</h3><a class="indexterm" name="id3995302"></a><pre class="programlisting"><a class="link" href="GtkAction.html" title="GtkAction">GtkAction</a>* gtk_recent_action_new_for_manager (const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *name, const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *label, const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *tooltip, const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *stock_id, <a class="link" href="GtkRecentManager.html" title="GtkRecentManager">GtkRecentManager</a> *manager);</pre><p>Creates a new <a class="link" href="GtkRecentAction.html" title="GtkRecentAction"><span class="type">GtkRecentAction</span></a> object. To add the action toa <a class="link" href="GtkActionGroup.html" title="GtkActionGroup"><span class="type">GtkActionGroup</span></a> and set the accelerator for the action,call <a class="link" href="GtkActionGroup.html#gtk-action-group-add-action-with-accel"><code class="function">gtk_action_group_add_action_with_accel()</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>name</code></em> :</span></p></td><td> a unique name for the action</td></tr><tr><td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td><td> the label displayed in menu items and on buttons, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>tooltip</code></em> :</span></p></td><td> a tooltip for the action, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>stock_id</code></em> :</span></p></td><td> the stock icon to display in widgets representing the action, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>manager</code></em> :</span></p></td><td> a <a class="link" href="GtkRecentManager.html" title="GtkRecentManager"><span class="type">GtkRecentManager</span></a>, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> for using the default <a class="link" href="GtkRecentManager.html" title="GtkRecentManager"><span class="type">GtkRecentManager</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the newly created <a class="link" href="GtkRecentAction.html" title="GtkRecentAction"><span class="type">GtkRecentAction</span></a></td></tr></tbody></table></div><p class="since">Since 2.12</p></div><hr><div class="refsect2" lang="en"><a name="id3995554"></a><h3><a name="gtk-recent-action-get-show-numbers"></a>gtk_recent_action_get_show_numbers ()</h3><a class="indexterm" name="id3995570"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> gtk_recent_action_get_show_numbers (<a class="link" href="GtkRecentAction.html" title="GtkRecentAction">GtkRecentAction</a> *action);</pre><p>Returns the value set by <a class="link" href="GtkRecentChooserMenu.html#gtk-recent-chooser-menu-set-show-numbers"><code class="function">gtk_recent_chooser_menu_set_show_numbers()</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>action</code></em> :</span></p></td><td> a <a class="link" href="GtkRecentAction.html" title="GtkRecentAction"><span class="type">GtkRecentAction</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 numbers should be shown.</td></tr></tbody></table></div><p class="since">Since 2.12</p></div><hr><div class="refsect2" lang="en"><a name="id3995669"></a><h3><a name="gtk-recent-action-set-show-numbers"></a>gtk_recent_action_set_show_numbers ()</h3><a class="indexterm" name="id3995685"></a><pre class="programlisting">void gtk_recent_action_set_show_numbers (<a class="link" href="GtkRecentAction.html" title="GtkRecentAction">GtkRecentAction</a> *action, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> show_numbers);</pre><p>Sets whether a number should be added to the items shown by thewidgets representing <em class="parameter"><code>action</code></em>. The numbers are shown to providea unique character for a mnemonic to be used inside the menu item'slabel. Only the first ten items get a number to avoid clashes.</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>action</code></em> :</span></p></td><td> a <a class="link" href="GtkRecentAction.html" title="GtkRecentAction"><span class="type">GtkRecentAction</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>show_numbers</code></em> :</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 shown items should be numbered</td></tr></tbody></table></div><p class="since">Since 2.12</p></div></div><div class="refsect1" lang="en"><a name="id3995794"></a><h2>Property Details</h2><div class="refsect2" lang="en"><a name="id3995804"></a><h3><a name="GtkRecentAction--show-numbers"></a>The <code class="literal">"show-numbers"</code> property</h3><a class="indexterm" name="id3995821"></a><pre class="programlisting"> "show-numbers" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> : Read / Write</pre><p>Whether the items should be displayed with a number.</p><p>Default value: FALSE</p></div></div><div class="refsect1" lang="en"><a name="id3995850"></a><div class="refsect2" lang="en"><a name="id3995851"></a></div><hr><div class="refsect2" lang="en"><a name="id3995852"></a></div></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -