gtkmm
3.3.20
|
An action of which only one in a group can be active. More...
Public Types | |
typedef RadioButtonGroup | Group |
Public Member Functions | |
virtual | ~RadioAction () |
GtkRadioAction* | gobj () |
Provides access to the underlying C GObject. | |
const GtkRadioAction* | gobj () const |
Provides access to the underlying C GObject. | |
GtkRadioAction* | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
Group | get_group () |
Returns the list representing the radio group for this object. | |
void | set_group (Group& group) |
void | join_group (const Glib::RefPtr< RadioAction >& group_source) |
Joins a radio action object to the group of another radio action object. | |
int | get_current_value () const |
Obtains the value property of the currently active member of the group to which action belongs. | |
void | set_current_value (int current_value) |
Sets the currently active group member to the member with value property current_value. | |
Glib::SignalProxy1< void, const Glib::RefPtr < RadioAction >& > | signal_changed () |
Glib::PropertyProxy< int > | property_value () |
The value returned by gtk_radio_action_get_current_value() when this action is the current action of its group. | |
Glib::PropertyProxy_ReadOnly< int > | property_value () const |
The value returned by gtk_radio_action_get_current_value() when this action is the current action of its group. | |
Glib::PropertyProxy< int > | property_current_value () |
The value property of the currently active member of the group to which this action belongs. | |
Glib::PropertyProxy_ReadOnly< int > | property_current_value () const |
The value property of the currently active member of the group to which this action belongs. | |
Static Public Member Functions | |
static Glib::RefPtr< RadioAction > | create () |
static Glib::RefPtr< RadioAction > | create (Group& group, const Glib::ustring& name, const Glib::ustring& label=Glib::ustring(), const Glib::ustring& tooltip=Glib::ustring()) |
Creates a radio action. | |
static Glib::RefPtr< RadioAction > | create (Group& group, const Glib::ustring& name, const Gtk::StockID& stock_id, const Glib::ustring& label=Glib::ustring(), const Glib::ustring& tooltip=Glib::ustring()) |
Creates a radio action with a stock ID. | |
static Glib::RefPtr< RadioAction > | create_with_icon_name (Group& group, const Glib::ustring& name, const Glib::ustring& icon_name, const Glib::ustring& label, const Glib::ustring& tooltip) |
Creates a radio action with an icon name. | |
Protected Member Functions | |
RadioAction () | |
RadioAction (Group& group, const Glib::ustring& name, const StockID& stock_id=StockID(), const Glib::ustring& label=Glib::ustring(), const Glib::ustring& tooltip=Glib::ustring()) | |
Creates a radio action. | |
RadioAction (Group& group, const Glib::ustring& name, const Glib::ustring& icon_name, const Glib::ustring& label=Glib::ustring(), const Glib::ustring& tooltip=Glib::ustring()) | |
Creates a radio action with an icon name. | |
virtual void | on_changed (const Glib::RefPtr< RadioAction >& current) |
This is a default handler for the signal signal_changed(). | |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr< Gtk::RadioAction > | wrap (GtkRadioAction* object, bool take_copy=false) |
A Glib::wrap() method for this object. |
An action of which only one in a group can be active.
A Gtk::RadioAction is similar to Gtk::RadioMenuItem. A number of radio actions can be linked together so that only one may be active at any one time.
virtual Gtk::RadioAction::~RadioAction | ( | ) | [virtual] |
Gtk::RadioAction::RadioAction | ( | ) | [protected] |
Gtk::RadioAction::RadioAction | ( | Group& | group, |
const Glib::ustring & | name, | ||
const StockID& | stock_id = StockID() , |
||
const Glib::ustring & | label = Glib::ustring() , |
||
const Glib::ustring & | tooltip = Glib::ustring() |
||
) | [explicit, protected] |
Creates a radio action.
group | The radio group this action belongs to. |
name | A unique name for the action. |
stock_id | The stock icon to display in widgets representing the action. |
label | The label displayed in menu items and on buttons. |
tooltip | A tooltip for the action. |
Gtk::RadioAction::RadioAction | ( | Group& | group, |
const Glib::ustring & | name, | ||
const Glib::ustring & | icon_name, | ||
const Glib::ustring & | label = Glib::ustring() , |
||
const Glib::ustring & | tooltip = Glib::ustring() |
||
) | [explicit, protected] |
Creates a radio action with an icon name.
The radio action's icon will reflect the specified icon name in the user's icon theme.
group | The radio group this action belongs to. |
name | A unique name for the action. |
icon_name | An IconTheme icon name used for widgets representing the action. |
label | The label displayed in menu items and on buttons. |
tooltip | A tooltip for the action. |
static Glib::RefPtr<RadioAction> Gtk::RadioAction::create | ( | ) | [static] |
Reimplemented from Gtk::ToggleAction.
static Glib::RefPtr<RadioAction> Gtk::RadioAction::create | ( | Group& | group, |
const Glib::ustring & | name, | ||
const Glib::ustring & | label = Glib::ustring() , |
||
const Glib::ustring & | tooltip = Glib::ustring() |
||
) | [static] |
Creates a radio action.
group | The radio group this action belongs to. |
name | A unique name for the action. |
label | The label displayed in menu items and on buttons. |
tooltip | A tooltip for the action. |
static Glib::RefPtr<RadioAction> Gtk::RadioAction::create | ( | Group& | group, |
const Glib::ustring & | name, | ||
const Gtk::StockID& | stock_id, | ||
const Glib::ustring & | label = Glib::ustring() , |
||
const Glib::ustring & | tooltip = Glib::ustring() |
||
) | [static] |
Creates a radio action with a stock ID.
The stock ID is used to set a default icon, text and accelerator for the radio action.
group | The radio group this action belongs to. |
name | A unique name for the action. |
stock_id | The stock icon to display in widgets representing the action. |
label | The label displayed in menu items and on buttons. |
tooltip | A tooltip for the action. |
static Glib::RefPtr<RadioAction> Gtk::RadioAction::create_with_icon_name | ( | Group& | group, |
const Glib::ustring & | name, | ||
const Glib::ustring & | icon_name, | ||
const Glib::ustring & | label, | ||
const Glib::ustring & | tooltip | ||
) | [static] |
Creates a radio action with an icon name.
The radio action's icon will reflect the specified icon name in the user's icon theme.
group | The radio group this action belongs to. |
name | A unique name for the action. |
icon_name | An IconTheme icon name used for widgets representing the action. |
label | The label displayed in menu items and on buttons. |
tooltip | A tooltip for the action. |
int Gtk::RadioAction::get_current_value | ( | ) | const |
Obtains the value property of the currently active member of the group to which action belongs.
Returns the list representing the radio group for this object.
Note that the returned list is only valid until the next change to the group.
A common way to set up a group of radio group is the following:
[C example ellipted]
GtkRadioAction* Gtk::RadioAction::gobj | ( | ) | [inline] |
Provides access to the underlying C GObject.
Reimplemented from Gtk::ToggleAction.
const GtkRadioAction* Gtk::RadioAction::gobj | ( | ) | const [inline] |
Provides access to the underlying C GObject.
Reimplemented from Gtk::ToggleAction.
GtkRadioAction* Gtk::RadioAction::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
Reimplemented from Gtk::ToggleAction.
void Gtk::RadioAction::join_group | ( | const Glib::RefPtr< RadioAction >& | group_source | ) |
Joins a radio action object to the group of another radio action object.
Use this in language bindings instead of the get_group() and set_group() methods
A common way to set up a group of radio actions is the following:
[C example ellipted]
group_source | A radio action object whos group we are joining, or 0 to remove the radio action from its group. |
virtual void Gtk::RadioAction::on_changed | ( | const Glib::RefPtr< RadioAction >& | current | ) | [protected, virtual] |
This is a default handler for the signal signal_changed().
The value property of the currently active member of the group to which this action belongs.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< int > Gtk::RadioAction::property_current_value | ( | ) | const |
The value property of the currently active member of the group to which this action belongs.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
The value returned by gtk_radio_action_get_current_value() when this action is the current action of its group.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< int > Gtk::RadioAction::property_value | ( | ) | const |
The value returned by gtk_radio_action_get_current_value() when this action is the current action of its group.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
void Gtk::RadioAction::set_current_value | ( | int | current_value | ) |
Sets the currently active group member to the member with value property current_value.
current_value | The new value. |
void Gtk::RadioAction::set_group | ( | Group& | group | ) |
Glib::SignalProxy1< void,const Glib::RefPtr<RadioAction>& > Gtk::RadioAction::signal_changed | ( | ) |
void on_my_changed(const Glib::RefPtr<RadioAction>& current)
The signal_changed() signal is emitted on every member of a radio group when the active member is changed. The signal gets emitted after the signal_activate() signals for the previous and current active members.
current | The member of actions group which has just been activated. |
Glib::RefPtr< Gtk::RadioAction > wrap | ( | GtkRadioAction * | object, |
bool | take_copy = false |
||
) | [related] |
A Glib::wrap() method for this object.
object | The C instance. |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |