Ardour  9.0-pre0-582-g084a23a80d
Gtk::ToggleAction Class Reference

#include <toggleaction.h>

Inheritance diagram for Gtk::ToggleAction:
[legend]

Public Member Functions

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< 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

 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::ToggleActionwrap (GtkToggleAction *object, bool take_copy=false)
 

Additional Inherited Members

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

Detailed Description

An action which can be toggled between two states.

A Gtk::ToggleAction corresponds roughly to a Gtk::CheckMenuItem. It has an "active" state specifying whether the action has been checked or not.

Definition at line 53 of file toggleaction.h.

Constructor & Destructor Documentation

◆ ~ToggleAction()

virtual Gtk::ToggleAction::~ToggleAction ( )
virtual

◆ ToggleAction() [1/3]

Gtk::ToggleAction::ToggleAction ( )
protected

Creates an empty toggle action.

◆ ToggleAction() [2/3]

Gtk::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 
)
explicitprotected

Creates a toggle action.

Parameters
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.
is_activeThe default checked state of the action.

◆ ToggleAction() [3/3]

Gtk::ToggleAction::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 
)
explicitprotected

Creates a toggle action with an icon name. The toggle action's icon will reflect the specified icon name in the user's icon theme.

Parameters
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.
is_activeThe default checked state of the action.

Member Function Documentation

◆ create() [1/3]

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

◆ create() [2/3]

static Glib::RefPtr<ToggleAction> Gtk::ToggleAction::create ( const Glib::ustring &  name,
const Glib::ustring &  label = Glib::ustring(),
const Glib::ustring &  tooltip = Glib::ustring(),
bool  is_active = false 
)
static

Creates a toggle action.

Parameters
nameA unique name for the action.
labelThe label displayed in menu items and on buttons.
tooltipA tooltip for the action.
is_activeThe default checked state of the action.
Returns
A new ToggleAction.

◆ create() [3/3]

static Glib::RefPtr<ToggleAction> Gtk::ToggleAction::create ( 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

Creates a toggle action with a stock ID. The tock ID is used to set a default icon, text and accelerator for the toggle action.

Parameters
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.
is_activeThe default checked state of the action.
Returns
A new ToggleAction.

◆ create_with_icon_name()

static Glib::RefPtr<ToggleAction> Gtk::ToggleAction::create_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

Creates a toggle action with an icon name. The toggle action's icon will reflect the specified icon name in the user's icon theme.

Parameters
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.
is_activeThe default checked state of the action.
Returns
A new ToggleAction.

◆ get_active()

bool Gtk::ToggleAction::get_active ( ) const

Returns the checked state of the toggle action.

Returns
The checked state of the toggle action.

◆ get_draw_as_radio()

bool Gtk::ToggleAction::get_draw_as_radio ( ) const

Returns whether the action should have proxies like a radio action.

Returns
Whether the action should have proxies like a radio action.

◆ get_type()

static GType Gtk::ToggleAction::get_type ( )
static

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

◆ gobj() [1/2]

GtkToggleAction* Gtk::ToggleAction::gobj ( )
inline

Provides access to the underlying C GObject.

Definition at line 92 of file toggleaction.h.

◆ gobj() [2/2]

const GtkToggleAction* Gtk::ToggleAction::gobj ( ) const
inline

Provides access to the underlying C GObject.

Definition at line 95 of file toggleaction.h.

◆ gobj_copy()

GtkToggleAction* Gtk::ToggleAction::gobj_copy ( )

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

◆ on_toggled()

virtual void Gtk::ToggleAction::on_toggled ( )
protectedvirtual

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

◆ property_active() [1/2]

Glib::PropertyProxy< bool > Gtk::ToggleAction::property_active ( )

If the toggle action should be active in or not.

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_active() [2/2]

Glib::PropertyProxy_ReadOnly< bool > Gtk::ToggleAction::property_active ( ) const

If the toggle action should be active in or not.

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_draw_as_radio() [1/2]

Glib::PropertyProxy< bool > Gtk::ToggleAction::property_draw_as_radio ( )

Whether the proxies for this action look like radio action proxies.

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_draw_as_radio() [2/2]

Glib::PropertyProxy_ReadOnly< bool > Gtk::ToggleAction::property_draw_as_radio ( ) const

Whether the proxies for this action look like radio action proxies.

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

void Gtk::ToggleAction::set_active ( bool  is_active = true)

Sets the checked state on the toggle action.

Parameters
is_activeWhether the action should be checked or not.

◆ set_draw_as_radio()

void Gtk::ToggleAction::set_draw_as_radio ( bool  draw_as_radio = true)

Sets whether the action should have proxies like a radio action.

Parameters
draw_as_radioWhether the action should have proxies like a radio action.

◆ signal_toggled()

Glib::SignalProxy0< void > Gtk::ToggleAction::signal_toggled ( )
Slot Prototype:
void on_my_toggled()

◆ toggled()

void Gtk::ToggleAction::toggled ( )

Emits the "toggled" signal on the toggle action.

Friends And Related Function Documentation

◆ wrap()

Glib::RefPtr< Gtk::ToggleAction > wrap ( GtkToggleAction 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: