📄 gtkradiomenuitem.html
字号:
>GSList</a> *group, const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *label);</pre><p>Creates a new <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a> containing a label. The labelwill be created using <a class="link" href="GtkLabel.html#gtk-label-new-with-mnemonic"><code class="function">gtk_label_new_with_mnemonic()</code></a>, so underscoresin <em class="parameter"><code>label</code></em> indicate the mnemonic for the menu item.</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>group</code></em> :</span></p></td><td> group the radio menu item is inside</td></tr><tr><td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td><td> the text of the button, with an underscore in front of the mnemonic character</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> a new <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3905558"></a><h3><a name="gtk-radio-menu-item-new-from-widget"></a>gtk_radio_menu_item_new_from_widget ()</h3><a class="indexterm" name="id3905575"></a><pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* gtk_radio_menu_item_new_from_widget (<a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem">GtkRadioMenuItem</a> *group);</pre><p>Creates a new <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a> adding it to the same group as <em class="parameter"><code>group</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>group</code></em> :</span></p></td><td> An existing <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> The new <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a></td></tr></tbody></table></div><p class="since">Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3905673"></a><h3><a name="gtk-radio-menu-item-new-with-label-from-widget"></a>gtk_radio_menu_item_new_with_label_from_widget ()</h3><a class="indexterm" name="id3905689"></a><pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* gtk_radio_menu_item_new_with_label_from_widget (<a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem">GtkRadioMenuItem</a> *group, const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *label);</pre><p>Creates a new GtkRadioMenuItem whose child is a simple GtkLabel.The new <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a> is added to the same group as <em class="parameter"><code>group</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>group</code></em> :</span></p></td><td> an existing <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a> </td></tr><tr><td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td><td> the text for the label</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> The new <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a></td></tr></tbody></table></div><p class="since">Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3905812"></a><h3><a name="gtk-radio-menu-item-new-with-mnemonic-from-widget"></a>gtk_radio_menu_item_new_with_mnemonic_from_widget ()</h3><a class="indexterm" name="id3905829"></a><pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* gtk_radio_menu_item_new_with_mnemonic_from_widget (<a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem">GtkRadioMenuItem</a> *group, const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *label);</pre><p>Creates a new GtkRadioMenuItem containing a label. The label will becreated using <a class="link" href="GtkLabel.html#gtk-label-new-with-mnemonic"><code class="function">gtk_label_new_with_mnemonic()</code></a>, so underscores in labelindicate the mnemonic for the menu item.</p><p>The new <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a> is added to the same group as <em class="parameter"><code>group</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>group</code></em> :</span></p></td><td> An existing <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td><td> the text of the button, with an underscore in front of the mnemonic character</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> The new <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a></td></tr></tbody></table></div><p class="since">Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3905969"></a><h3><a name="gtk-radio-menu-item-group"></a>gtk_radio_menu_item_group</h3><a class="indexterm" name="id3905984"></a><pre class="programlisting">#define gtk_radio_menu_item_group gtk_radio_menu_item_get_group</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gtk_radio_menu_item_group</code> is deprecated and should not be used in newly-written code.</p></div><p>Deprecated compatibility macro. Use <a class="link" href="GtkRadioMenuItem.html#gtk-radio-menu-item-get-group"><code class="function">gtk_radio_menu_item_get_group()</code></a> instead.</p></div><hr><div class="refsect2" lang="en"><a name="id3906025"></a><h3><a name="gtk-radio-menu-item-set-group"></a>gtk_radio_menu_item_set_group ()</h3><a class="indexterm" name="id3906039"></a><pre class="programlisting">void gtk_radio_menu_item_set_group (<a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem">GtkRadioMenuItem</a> *radio_menu_item, <ahref="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList">GSList</a> *group);</pre><p>Sets the group of a radio menu item, or changes it.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>radio_menu_item</code></em> :</span></p></td><td>a <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>group</code></em> :</span></p></td><td>the new group.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3906117"></a><h3><a name="gtk-radio-menu-item-get-group"></a>gtk_radio_menu_item_get_group ()</h3><a class="indexterm" name="id3906131"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList">GSList</a>* gtk_radio_menu_item_get_group (<a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem">GtkRadioMenuItem</a> *radio_menu_item);</pre><p>Returns the group to which the radio menu item belongs, as a <ahref="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of<a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a>. The list belongs to GTK+ and should not be freed.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>radio_menu_item</code></em> :</span></p></td><td>a <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem"><span class="type">GtkRadioMenuItem</span></a>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the group of <em class="parameter"><code>radio_menu_item</code></em>.</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id3906222"></a><h2>Property Details</h2><div class="refsect2" lang="en"><a name="id3906232"></a><h3><a name="GtkRadioMenuItem--group"></a>The <code class="literal">"group"</code> property</h3><a class="indexterm" name="id3906249"></a><pre class="programlisting"> "group" <a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem">GtkRadioMenuItem</a> : Write</pre><p>The radio menu item whose group this widget belongs to.</p><p></p><p>Since 2.8</p></div></div><div class="refsect1" lang="en"><a name="id3906283"></a><h2>Signal Details</h2><div class="refsect2" lang="en"><a name="id3906293"></a><h3><a name="GtkRadioMenuItem-group-changed"></a>The <code class="literal">"group-changed"</code> signal</h3><a class="indexterm" name="id3906310"></a><pre class="programlisting">void user_function (<a class="link" href="GtkRadioMenuItem.html" title="GtkRadioMenuItem">GtkRadioMenuItem</a> *radiomenuitem, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a> user_data) : Run First</pre><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>radiomenuitem</code></em> :</span></p></td><td>the object which received 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="id3906382"></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="GtkMenuItem.html" title="GtkMenuItem"><span class="type">GtkMenuItem</span></a></span></p></td><td><p>because a radio menu item is a menu item.</p></td></tr><tr><td><p><span class="term"><a class="link" href="GtkCheckMenuItem.html" title="GtkCheckMenuItem"><span class="type">GtkCheckMenuItem</span></a></span></p></td><td><p>to know how to handle the check.</p></td></tr></tbody></table></div><p></p></div><div class="refsect1" lang="en"><a name="id3906429"></a><div class="refsect2" lang="en"><a name="id3906430"></a></div><hr><div class="refsect2" lang="en"><a name="id3906431"></a></div></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -