/* Copyright (C) 1998-2002 The gtkmm Development Team
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see .
*/
#include
#include
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/checkmenuitem_p.h)
namespace Gtk
{
class GTKMM_API RadioMenuItem;
/** A CheckMenuItem that belongs to a group.
* At each instant exactly one of the menu items from a group is selected.
* @ingroup Menus
* @ingroup Widgets
*/
class GTKMM_API RadioMenuItem : public CheckMenuItem
{
_CLASS_GTKOBJECT(RadioMenuItem, GtkRadioMenuItem, GTK_RADIO_MENU_ITEM, Gtk::CheckMenuItem, GtkCheckMenuItem, , , GTKMM_API)
public:
using Group = RadioButtonGroup;
/** @newin{3,22}
*/
_CTOR_DEFAULT()
/** @newin{3,22}
*/
explicit RadioMenuItem(const Glib::ustring& label, bool mnemonic = false);
RadioMenuItem(Group& groupx);
_IGNORE(gtk_radio_menu_item_new)
RadioMenuItem(Group& groupx, const Glib::ustring& label, bool mnemonic = false);
_IGNORE(gtk_radio_menu_item_new_with_label, gtk_radio_menu_item_new_with_mnemonic)
//We ignore the _new_*_from_widget() functions because they are just the same as calling join_group() ourselves.
_IGNORE(gtk_radio_menu_item_new_from_widget, gtk_radio_menu_item_new_with_mnemonic_from_widget, gtk_radio_menu_item_new_with_label_from_widget)
_WRAP_METHOD(Group get_group(), gtk_radio_menu_item_get_group)
_IGNORE(gtk_radio_menu_item_set_group)
void set_group(Group& group);
/** Removes the radio menu item from the group.
*/
void reset_group();
#m4 _CONVERSION(`RadioMenuItem&',`GtkRadioMenuItem*',`($3).gobj()')
_WRAP_METHOD(void join_group(RadioMenuItem& group_source), gtk_radio_menu_item_join_group, newin "3,22")
_WRAP_SIGNAL(void group_changed(), "group_changed")
/// Note that %property_group() corresponds to join_group(), rather than to get_group() and set_group().
_WRAP_PROPERTY("group", RadioMenuItem*, newin "3,22")
protected:
void constructor(const Group& group);
};
} /* namspace Gtk */