Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List


Xfc::Gtk::RadioMenuItem Class Reference

A GtkRadioMenuItem C++ wrapper class. More...

#include <xfc/gtk/radiomenuitem.hh>

Inheritance diagram for Xfc::Gtk::RadioMenuItem:

Xfc::Gtk::CheckMenuItem Xfc::Gtk::MenuItem Xfc::Gtk::Item Xfc::Gtk::Bin Xfc::Gtk::Container Xfc::Gtk::Widget Xfc::Gtk::Object Xfc::Atk::Implementor Xfc::G::Object Xfc::G::TypeInterface Xfc::G::TypeInstance Xfc::G::TypeInstance Xfc::Trackable Xfc::Trackable List of all members.

Signal Prototypes

Public Types

Public Member Functions

Accessors
Methods
Signal Proxies

Detailed Description

A GtkRadioMenuItem C++ wrapper class.

A radio menu item is a check menu item that belongs to a group. At each instant exactly one of the radio menu items from a group is selected. You create a group radio menu items the same way you would create a group of buttons (see Gtk::RadioButton).

Radio menu items are constructed with one of the following constructors:

 RadioMenuItem(const RadioMenuItem *group, const char *label, bool use_underline = false);
 RadioMenuItem(const RadioMenuItem *group, const String& label, bool use_underline = false);

The group argument is a pointer to an existing RadioMenuItem that already has a group assigned to it. The first radio menu item in a group is constructed by passing null as the group argument. Then subsequent menu items are constructed by passing an existing menu item as the group argument, usually the last one constructed.

 Gtk::RadioMenuItem *menu_item = 0;
 menu_item = new Gtk::RadioMenuItem(menu_item, "Item1");
 menu->append(*menu_Rangeitem, item1_slot);
 menu_item->show();

 menu_item = new Gtk::RadioMenuItem(menu_item, "Item2");
 menu->append(*menu_item, item2_slot);
 menu_item->show();

 menu_item = new Gtk::RadioMenuItem(menu_item, "Item3");
 menu->append(*menu_item, item3_slot);
 menu_item->show();

To remove a RadioMenuItem from one group and make it part of a new one, use set_group().

See also: the MenuItem and Menu HOWTOs and example.


Constructor & Destructor Documentation

Xfc::Gtk::RadioMenuItem::RadioMenuItem ( GtkRadioMenuItem *  radio_menu_item,
bool  owns_reference = false 
) [explicit, protected]

Construct a new RadioMenuItem from an existing GtkRadioMenuItem.

Parameters:
radio_menu_item A pointer to a GtkRadioMenuItem.
owns_reference Set false if the initial reference count is floating, set true if it's not.
The radio_menu_item can be a newly created GtkRadioMenuItem or an existing GtkRadioMenuItem (see G::Object::Object).

Xfc::Gtk::RadioMenuItem::RadioMenuItem ( const RadioMenuItem group  )  [explicit]

Construct a new radio menu item.

Parameters:
group An exisitng radio menu item.

Xfc::Gtk::RadioMenuItem::RadioMenuItem ( const RadioMenuItem group,
const String label,
bool  use_underline = false 
)

Constructs a new radio menu item that is a member of group.

Parameters:
group An exisitng radio menu item, or null to start a new group.
label The text for the label
use_underline Set true if label contains a mnemonic character.

Xfc::Gtk::RadioMenuItem::RadioMenuItem ( GtkRadioMenuItem *  radio_menu_item,
bool  owns_reference = false 
) [explicit, protected]

Construct a new RadioMenuItem from an existing GtkRadioMenuItem.

Parameters:
radio_menu_item A pointer to a GtkRadioMenuItem.
owns_reference Set false if the initial reference count is floating, set true if it's not.
The radio_menu_item can be a newly created GtkRadioMenuItem or an existing GtkRadioMenuItem (see G::Object::Object).

Xfc::Gtk::RadioMenuItem::RadioMenuItem ( const RadioMenuItem group  )  [explicit]

Construct a new radio menu item.

Parameters:
group An exisitng radio menu item.

Xfc::Gtk::RadioMenuItem::RadioMenuItem ( const RadioMenuItem group,
const String label,
bool  use_underline = false 
)

Constructs a new radio menu item that is a member of group.

Parameters:
group An exisitng radio menu item, or null to start a new group.
label The text for the label
use_underline Set true if label contains a mnemonic character.


Member Function Documentation

void Xfc::Gtk::RadioMenuItem::set_group ( Group group  ) 

Sets the group of a radio menu item, or changes it.

Parameters:
group The new group.

const GroupChangedSignalProxy Xfc::Gtk::RadioMenuItem::signal_group_changed (  ) 

Connect to the group_changed_signal; emitted when the group of radio menu items that a radio menu item belongs to changes.

This can be when a radio menu item switches from being alone to being part of a group of 2 or more menu items, or vice-versa, and when a button is moved from one group of 2 or more menu items to a different one, but not when the composition of the group that a menu item belongs to changes.


Member Data Documentation

const GroupChangedSignalType Xfc::Gtk::RadioMenuItem::group_changed_signal [static, protected]

Group changed signal (see signal_group_changed()).

Calls a slot with the signature:

< void function();
<


The documentation for this class was generated from the following file: Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC 4.3