Ardour  9.0-pre0-386-g96ef4d20f2
Gtk::RadioAction Class Reference

#include <radioaction.h>

Inheritance diagram for Gtk::RadioAction:
[legend]

Public Types

typedef RadioButtonGroup Group
 
- Public Types inherited from Gtk::Action
typedef sigc::slot< void > SlotActivate
 For instance, void on_activate();. More...
 

Public Member Functions

virtual ~RadioAction ()
 
GtkRadioActiongobj ()
 Provides access to the underlying C GObject. More...
 
const GtkRadioActiongobj () const
 Provides access to the underlying C GObject. More...
 
GtkRadioActiongobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
 
Group get_group ()
 
void set_group (Group &group)
 
int get_current_value () const
 
void set_current_value (int current_value)
 
Glib::SignalProxy1< void, const Glib::RefPtr< RadioAction > & > signal_changed ()
 
Glib::PropertyProxy< int > property_value ()
 
Glib::PropertyProxy_ReadOnly< int > property_value () const
 
Glib::PropertyProxy< int > property_current_value ()
 
Glib::PropertyProxy_ReadOnly< int > property_current_value () const
 
- Public Member Functions inherited from Gtk::ToggleAction
virtual ~ToggleAction ()
 
GtkToggleActiongobj ()
 Provides access to the underlying C GObject. More...
 
const GtkToggleActiongobj () const
 Provides access to the underlying C GObject. More...
 
GtkToggleActiongobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
 
void toggled ()
 
void set_active (bool is_active=true)
 
bool get_active () const
 
void set_draw_as_radio (bool draw_as_radio=true)
 
bool get_draw_as_radio () const
 
Glib::SignalProxy0< void > signal_toggled ()
 
Glib::PropertyProxy< bool > property_draw_as_radio ()
 
Glib::PropertyProxy_ReadOnly< bool > property_draw_as_radio () const
 
Glib::PropertyProxy< bool > property_active ()
 
Glib::PropertyProxy_ReadOnly< bool > property_active () const
 
- Public Member Functions inherited from Gtk::Action
virtual ~Action ()
 
GtkActiongobj ()
 Provides access to the underlying C GObject. More...
 
const GtkActiongobj () const
 Provides access to the underlying C GObject. More...
 
GtkActiongobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
 
Glib::ustring get_name () const
 
bool is_sensitive () const
 
bool get_sensitive () const
 
void set_sensitive (bool sensitive=true)
 
bool is_visible () const
 
bool get_visible () const
 
void set_visible (bool visible=true)
 
void activate ()
 
Imagecreate_icon (IconSize icon_size)
 
MenuItemcreate_menu_item ()
 
ToolItemcreate_tool_item ()
 
Menucreate_menu ()
 
void connect_proxy (Widget &proxy)
 
void disconnect_proxy (Widget &proxy)
 
Glib::SListHandle< Widget * > get_proxies ()
 
Glib::SListHandle< const Widget * > get_proxies () const
 
void connect_accelerator ()
 
void disconnect_accelerator ()
 
Glib::ustring get_accel_path () const
 
Glib::SignalProxy0< void > signal_activate ()
 
void set_accel_path (const Glib::ustring &accel_path)
 
void set_accel_group (const Glib::RefPtr< AccelGroup > &accel_group)
 
void set_label (const Glib::ustring &label)
 
Glib::ustring get_label () const
 
void set_short_label (const Glib::ustring &short_label)
 
Glib::ustring get_short_label () const
 
void set_tooltip (const Glib::ustring &tooltip)
 
Glib::ustring get_tooltip () const
 
void set_stock_id (const StockID &stock_id)
 
StockID get_stock_id () const
 
void set_gicon (const Glib::RefPtr< Gio::Icon > &icon)
 
Glib::RefPtr< Gio::Icon > get_gicon ()
 
Glib::RefPtr< const Gio::Icon > get_gicon () const
 
void set_icon_name (const Glib::ustring &icon_name)
 
Glib::ustring get_icon_name () const
 
void set_visible_horizontal (bool visible_horizontal=true)
 
bool get_visible_horizontal () const
 
void set_visible_vertical (bool visible_vertical=true)
 
bool get_visible_vertical () const
 
void set_is_important (bool is_important=true)
 
bool get_is_important () const
 
void set_always_show_image (bool always_show=true)
 
bool get_always_show_image () const
 
void block_activate ()
 
void unblock_activate ()
 
Glib::PropertyProxy_ReadOnly< Glib::ustring > property_name () const
 
Glib::PropertyProxy< Glib::ustring > property_label ()
 
Glib::PropertyProxy_ReadOnly< Glib::ustring > property_label () const
 
Glib::PropertyProxy< Glib::ustring > property_short_label ()
 
Glib::PropertyProxy_ReadOnly< Glib::ustring > property_short_label () const
 
Glib::PropertyProxy< Glib::ustring > property_tooltip ()
 
Glib::PropertyProxy_ReadOnly< Glib::ustring > property_tooltip () const
 
Glib::PropertyProxy< StockIDproperty_stock_id ()
 
Glib::PropertyProxy_ReadOnly< StockIDproperty_stock_id () const
 
Glib::PropertyProxy< Glib::RefPtr< Gio::Icon > > property_gicon ()
 
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Gio::Icon > > property_gicon () const
 
Glib::PropertyProxy< Glib::ustring > property_icon_name ()
 
Glib::PropertyProxy_ReadOnly< Glib::ustring > property_icon_name () const
 
Glib::PropertyProxy< bool > property_visible_horizontal ()
 
Glib::PropertyProxy_ReadOnly< bool > property_visible_horizontal () const
 
Glib::PropertyProxy< bool > property_visible_vertical ()
 
Glib::PropertyProxy_ReadOnly< bool > property_visible_vertical () const
 
Glib::PropertyProxy< bool > property_visible_overflown ()
 
Glib::PropertyProxy_ReadOnly< bool > property_visible_overflown () const
 
Glib::PropertyProxy< bool > property_is_important ()
 
Glib::PropertyProxy_ReadOnly< bool > property_is_important () const
 
Glib::PropertyProxy< bool > property_hide_if_empty ()
 
Glib::PropertyProxy_ReadOnly< bool > property_hide_if_empty () const
 
Glib::PropertyProxy< bool > property_sensitive ()
 
Glib::PropertyProxy_ReadOnly< bool > property_sensitive () const
 
Glib::PropertyProxy< bool > property_visible ()
 
Glib::PropertyProxy_ReadOnly< bool > property_visible () const
 
Glib::PropertyProxy< Glib::RefPtr< ActionGroup > > property_action_group ()
 
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< ActionGroup > > property_action_group () const
 
Glib::PropertyProxy< bool > property_always_show_image ()
 
Glib::PropertyProxy_ReadOnly< bool > property_always_show_image () const
 

Static Public Member Functions

static GType get_type () G_GNUC_CONST
 
static Glib::RefPtr< RadioActioncreate ()
 
static Glib::RefPtr< RadioActioncreate (Group &group, const Glib::ustring &name, const Glib::ustring &label=Glib::ustring(), const Glib::ustring &tooltip=Glib::ustring())
 
static Glib::RefPtr< RadioActioncreate (Group &group, const Glib::ustring &name, const Gtk::StockID &stock_id, const Glib::ustring &label=Glib::ustring(), const Glib::ustring &tooltip=Glib::ustring())
 
static Glib::RefPtr< RadioActioncreate_with_icon_name (Group &group, const Glib::ustring &name, const Glib::ustring &icon_name, const Glib::ustring &label, const Glib::ustring &tooltip)
 
- Static Public Member Functions inherited from Gtk::ToggleAction
static GType get_type () G_GNUC_CONST
 
static Glib::RefPtr< ToggleActioncreate ()
 
static Glib::RefPtr< ToggleActioncreate (const Glib::ustring &name, const Glib::ustring &label=Glib::ustring(), const Glib::ustring &tooltip=Glib::ustring(), bool is_active=false)
 
static Glib::RefPtr< ToggleActioncreate (const Glib::ustring &name, const Gtk::StockID &stock_id, const Glib::ustring &label=Glib::ustring(), const Glib::ustring &tooltip=Glib::ustring(), bool is_active=false)
 
static Glib::RefPtr< ToggleActioncreate_with_icon_name (const Glib::ustring &name, const Glib::ustring &icon_name, const Glib::ustring &label, const Glib::ustring &tooltip, bool is_active=false)
 
- Static Public Member Functions inherited from Gtk::Action
static GType get_type () G_GNUC_CONST
 
static Glib::RefPtr< Actioncreate ()
 
static Glib::RefPtr< Actioncreate (const Glib::ustring &name, const Glib::ustring &label=Glib::ustring(), const Glib::ustring &tooltip=Glib::ustring())
 
static Glib::RefPtr< Actioncreate (const Glib::ustring &name, const Gtk::StockID &stock_id, const Glib::ustring &label=Glib::ustring(), const Glib::ustring &tooltip=Glib::ustring())
 
static Glib::RefPtr< Actioncreate_with_icon_name (const Glib::ustring &name, const Glib::ustring &icon_name, const Glib::ustring &label, const Glib::ustring &tooltip)
 

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())
 
 RadioAction (Group &group, const Glib::ustring &name, const Glib::ustring &icon_name, const Glib::ustring &label=Glib::ustring(), const Glib::ustring &tooltip=Glib::ustring())
 
virtual void on_changed (const Glib::RefPtr< RadioAction > &current)
 This is a default handler for the signal signal_changed(). More...
 
- Protected Member Functions inherited from Gtk::ToggleAction
 ToggleAction ()
 
 ToggleAction (const Glib::ustring &name, const StockID &stock_id=StockID(), const Glib::ustring &label=Glib::ustring(), const Glib::ustring &tooltip=Glib::ustring(), bool is_active=false)
 
 ToggleAction (const Glib::ustring &name, const Glib::ustring &icon_name, const Glib::ustring &label=Glib::ustring(), const Glib::ustring &tooltip=Glib::ustring(), bool is_active=false)
 
virtual void on_toggled ()
 This is a default handler for the signal signal_toggled(). More...
 
- Protected Member Functions inherited from Gtk::Action
 Action ()
 
 Action (const Glib::ustring &name, const StockID &stock_id=StockID(), const Glib::ustring &label=Glib::ustring(), const Glib::ustring &tooltip=Glib::ustring())
 
 Action (const Glib::ustring &name, const Glib::ustring &icon_name, const Glib::ustring &label=Glib::ustring(), const Glib::ustring &tooltip=Glib::ustring())
 
void block_activate_from (Widget &proxy)
 
void unblock_activate_from (Widget &proxy)
 
virtual Widgetcreate_menu_item_vfunc ()
 
virtual Widgetcreate_tool_item_vfunc ()
 
virtual void connect_proxy_vfunc (Widget *proxy)
 
virtual void disconnect_proxy_vfunc (Widget *proxy)
 
virtual void on_activate ()
 This is a default handler for the signal signal_activate(). More...
 

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< Gtk::RadioActionwrap (GtkRadioAction *object, bool take_copy=false)
 

Detailed Description

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.

Definition at line 54 of file radioaction.h.

Member Typedef Documentation

◆ Group

Definition at line 104 of file radioaction.h.

Constructor & Destructor Documentation

◆ ~RadioAction()

virtual Gtk::RadioAction::~RadioAction ( )
virtual

◆ RadioAction() [1/3]

Gtk::RadioAction::RadioAction ( )
protected

◆ RadioAction() [2/3]

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() 
)
explicitprotected

Creates a radio action.

Parameters
groupThe radio group this action belongs to.
nameA unique name for the action.
stock_idThe stock icon to display in widgets representing the action.
labelThe label displayed in menu items and on buttons.
tooltipA tooltip for the action.

◆ RadioAction() [3/3]

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() 
)
explicitprotected

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.

Parameters
groupThe radio group this action belongs to.
nameA unique name for the action.
icon_nameAn IconTheme icon name used for widgets representing the action.
labelThe label displayed in menu items and on buttons.
tooltipA tooltip for the action.

Member Function Documentation

◆ create() [1/3]

static Glib::RefPtr<RadioAction> Gtk::RadioAction::create ( )
static

◆ create() [2/3]

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.

Parameters
groupThe radio group this action belongs to.
nameA unique name for the action.
labelThe label displayed in menu items and on buttons.
tooltipA tooltip for the action.
Returns
A new RadioAction.

◆ create() [3/3]

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.

Parameters
groupThe radio group this action belongs to.
nameA unique name for the action.
stock_idThe stock icon to display in widgets representing the action.
labelThe label displayed in menu items and on buttons.
tooltipA tooltip for the action.
Returns
A new RadioAction.

◆ create_with_icon_name()

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.

Parameters
groupThe radio group this action belongs to.
nameA unique name for the action.
icon_nameAn IconTheme icon name used for widgets representing the action.
labelThe label displayed in menu items and on buttons.
tooltipA tooltip for the action.
Returns
A new RadioAction.

◆ get_current_value()

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 value of the currently active group member.

◆ get_group()

Group Gtk::RadioAction::get_group ( )

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]

Returns
The list representing the radio group for this object.

◆ get_type()

static GType Gtk::RadioAction::get_type ( )
static

Get the GType for this class, for use with the underlying GObject type system.

◆ gobj() [1/2]

GtkRadioAction* Gtk::RadioAction::gobj ( )
inline

Provides access to the underlying C GObject.

Definition at line 93 of file radioaction.h.

◆ gobj() [2/2]

const GtkRadioAction* Gtk::RadioAction::gobj ( ) const
inline

Provides access to the underlying C GObject.

Definition at line 96 of file radioaction.h.

◆ gobj_copy()

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.

◆ on_changed()

virtual void Gtk::RadioAction::on_changed ( const Glib::RefPtr< RadioAction > &  current)
protectedvirtual

This is a default handler for the signal signal_changed().

◆ property_current_value() [1/2]

Glib::PropertyProxy< int > Gtk::RadioAction::property_current_value ( )

The value property of the currently active member of the group to which this action belongs.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_current_value() [2/2]

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.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ property_value() [1/2]

Glib::PropertyProxy< int > Gtk::RadioAction::property_value ( )

The value returned by gtk_radio_action_get_current_value() when this action is the current action of its group.

Returns
A PropertyProxy that allows you to get or set the value of the property, or receive notification when the value of the property changes.

◆ property_value() [2/2]

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.

Returns
A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

◆ set_current_value()

void Gtk::RadioAction::set_current_value ( int  current_value)

Sets the currently active group member to the member with value property current_value.

Parameters
current_valueThe new value.

◆ set_group()

void Gtk::RadioAction::set_group ( Group group)

◆ signal_changed()

Glib::SignalProxy1< void,const Glib::RefPtr<RadioAction>& > Gtk::RadioAction::signal_changed ( )

The changed signal is emitted on every member of a radio group when the active member is changed. The signal is emitted after the activate signals for the previous and current active members.

Parameters
currentthe member of this action's group which has just been activated.
Slot Prototype:
void on_my_changed(const Glib::RefPtr<RadioAction>& current)

Friends And Related Function Documentation

◆ wrap()

Glib::RefPtr< Gtk::RadioAction > wrap ( GtkRadioAction object,
bool  take_copy = false 
)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns
A C++ instance that wraps this C instance.

The documentation for this class was generated from the following file: