gtkmm 3.24.9

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Symbols | List of all members
Gtk::Action Class Reference

A deprecated action which can be triggered by a menu or toolbar item. More...

`#include <gtkmm/action.h>`

Inheritance diagram for Gtk::Action:
[legend]

## Public Types
typedef sigc::slot< void > | SlotActivate
| For instance, void on_activate();.
Public Types inherited from Glib::Object
typedef void(*)(gpointer data | DestroyNotify)
Public Types inherited from sigc::trackable
typedef internal::func_destroy_notify | func_destroy_notify

## Public Member Functions
| Action (Action &&src) noexcept
Action & | operator= (Action &&src) noexcept
| ~Action () noexcept override
GtkAction * | gobj ()
| Provides access to the underlying C GObject.
const GtkAction * | gobj () const
| Provides access to the underlying C GObject.
GtkAction * | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
Glib::ustring | get_name () const
| Returns the name of the action.
bool | is_sensitive () const
| Returns whether the action is effectively sensitive.
bool | get_sensitive () const
| Returns whether the action itself is sensitive.
void | set_sensitive (bool sensitive=true)
| Sets the :sensitive property of the action to sensitive.
bool | is_visible () const
| Returns whether the action is effectively visible.
bool | get_visible () const
| Returns whether the action itself is visible.
void | set_visible (bool visible=true)
| Sets the :visible property of the action to visible.
void | activate ()
| Emits the “activate” signal on the specified action, if it isn't insensitive.
Image * | create_icon (IconSize icon_size)
| This function is intended for use by action implementations to create icons displayed in the proxy widgets.
MenuItem * | create_menu_item ()
| Creates a menu item widget that proxies for the given action.
ToolItem * | create_tool_item ()
| Creates a toolbar item widget that proxies for the given action.
Menu * | create_menu ()
| If action provides a Gtk::Menu widget as a submenu for the menu item or the toolbar item it creates, this function returns an instance of that menu.
std::vector< Widget * > | get_proxies ()
| Returns the proxy widgets for an action.
std::vector< const Widget * > | get_proxies () const
| Returns the proxy widgets for an action.
void | connect_accelerator ()
| Installs the accelerator for action if action has an accel path and group.
void | disconnect_accelerator ()
| Undoes the effect of one call to connect_accelerator().
Glib::ustring | get_accel_path () const
| Returns the accel path for this action.
Glib::SignalProxy< void > | signal_activate ()
void | set_accel_path (const Glib::ustring &accel_path)
| Sets the accel path for this action.
void | set_accel_group (const Glib::RefPtr< AccelGroup > &accel_group)
| Sets the Gtk::AccelGroup in which the accelerator for this action will be installed.
void | set_label (const Glib::ustring &label)
| Sets the label of action.
Glib::ustring | get_label () const
| Gets the label text of action.
void | set_short_label (const Glib::ustring &short_label)
| Sets a shorter label text on action.
Glib::ustring | get_short_label () const
| Gets the short label text of action.
void | set_tooltip (const Glib::ustring &tooltip)
| Sets the tooltip text on action.
Glib::ustring | get_tooltip () const
| Gets the tooltip text of action.
void | set_stock_id (const StockID &stock_id)
| Sets the stock id on action.
StockID | get_stock_id () const
| Gets the stock id of action.
void | set_gicon (const Glib::RefPtr< Gio::Icon > &icon)
| Sets the icon of action.
Glib::RefPtr< Gio::Icon > | get_gicon ()
| Gets the gicon of action.
Glib::RefPtr< const Gio::Icon > | get_gicon () const
| Gets the gicon of action.
void | set_icon_name (const Glib::ustring &icon_name)
| Sets the icon name on action.
Glib::ustring | get_icon_name () const
| Gets the icon name of action.
void | set_visible_horizontal (bool visible_horizontal=true)
| Sets whether action is visible when horizontal.
bool | get_visible_horizontal () const
| Checks whether action is visible when horizontal.
void | set_visible_vertical (bool visible_vertical=true)
| Sets whether action is visible when vertical.
bool | get_visible_vertical () const
| Checks whether action is visible when horizontal.
void | set_is_important (bool is_important=true)
| Sets whether the action is important, this attribute is used primarily by toolbar items to decide whether to show a label or not.
bool | get_is_important () const
| Checks whether action is important or not.
void | set_always_show_image (bool always_show=true)
| Sets whether action's menu item proxies will ignore the Gtk::Settings::property_gtk_menu_images() setting and always show their image, if available.
bool | get_always_show_image () const
| Returns whether action's menu item proxies will always show their image, if available.
void | block_activate ()
| Disable activation signals from the action.
void | unblock_activate ()
| Reenable activation signals from the action.
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_name () const
| A unique name for the action.
Glib::PropertyProxy< Glib::ustring > | property_label ()
| The label used for menu items and buttons that activate this action.
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_label () const
| The label used for menu items and buttons that activate this action.
Glib::PropertyProxy< Glib::ustring > | property_short_label ()
| A shorter label that may be used on toolbar buttons.
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_short_label () const
| A shorter label that may be used on toolbar buttons.
Glib::PropertyProxy< Glib::ustring > | property_tooltip ()
| A tooltip for this action.
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_tooltip () const
| A tooltip for this action.
Glib::PropertyProxy< StockID > | property_stock_id ()
| The stock icon displayed in widgets representing this action.
Glib::PropertyProxy_ReadOnly< StockID > | property_stock_id () const
| The stock icon displayed in widgets representing this action.
Glib::PropertyProxy< Glib::RefPtr< Gio::Icon > > | property_gicon ()
| The Gio::Icon displayed in the Gtk::Action.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Gio::Icon > > | property_gicon () const
| The Gio::Icon displayed in the Gtk::Action.
Glib::PropertyProxy< Glib::ustring > | property_icon_name ()
| The name of the icon from the icon theme.
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_icon_name () const
| The name of the icon from the icon theme.
Glib::PropertyProxy< bool > | property_visible_horizontal ()
| Whether the toolbar item is visible when the toolbar is in a horizontal orientation.
Glib::PropertyProxy_ReadOnly< bool > | property_visible_horizontal () const
| Whether the toolbar item is visible when the toolbar is in a horizontal orientation.
Glib::PropertyProxy< bool > | property_visible_vertical ()
| Whether the toolbar item is visible when the toolbar is in a vertical orientation.
Glib::PropertyProxy_ReadOnly< bool > | property_visible_vertical () const
| Whether the toolbar item is visible when the toolbar is in a vertical orientation.
Glib::PropertyProxy< bool > | property_visible_overflown ()
| When `true`, toolitem proxies for this action are represented in the toolbar overflow menu.
Glib::PropertyProxy_ReadOnly< bool > | property_visible_overflown () const
| When `true`, toolitem proxies for this action are represented in the toolbar overflow menu.
Glib::PropertyProxy< bool > | property_is_important ()
| Whether the action is considered important.
Glib::PropertyProxy_ReadOnly< bool > | property_is_important () const
| Whether the action is considered important.
Glib::PropertyProxy< bool > | property_hide_if_empty ()
| When `true`, empty menu proxies for this action are hidden.
Glib::PropertyProxy_ReadOnly< bool > | property_hide_if_empty () const
| When `true`, empty menu proxies for this action are hidden.
Glib::PropertyProxy< bool > | property_sensitive ()
| Whether the action is enabled.
Glib::PropertyProxy_ReadOnly< bool > | property_sensitive () const
| Whether the action is enabled.
Glib::PropertyProxy< bool > | property_visible ()
| Whether the action is visible.
Glib::PropertyProxy_ReadOnly< bool > | property_visible () const
| Whether the action is visible.
Glib::PropertyProxy< Glib::RefPtr< ActionGroup > > | property_action_group ()
| The GtkActionGroup this GtkAction is associated with, or `nullptr` (for internal use).
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< ActionGroup > > | property_action_group () const
| The GtkActionGroup this GtkAction is associated with, or `nullptr` (for internal use).
Glib::PropertyProxy< bool > | property_always_show_image ()
| If `true`, the action's menu item proxies will ignore the Gtk::Settings::property_gtk_menu_images() setting and always show their image, if available.
Glib::PropertyProxy_ReadOnly< bool > | property_always_show_image () const
| If `true`, the action's menu item proxies will ignore the Gtk::Settings::property_gtk_menu_images() setting and always show their image, if available.
Public Member Functions inherited from Glib::Object
| Object (const Object &)=delete
Object & | operator= (const Object &)=delete
| Object (Object &&src) noexcept
Object & | operator= (Object &&src) noexcept
void * | get_data (const QueryQuark &key)
void | set_data (const Quark &key, void *data)
void | set_data (const Quark &key, void *data, DestroyNotify notify)
void | remove_data (const QueryQuark &quark)
void * | steal_data (const QueryQuark &quark)
Glib::RefPtr< Glib::Object > | wrap (GObject *object, bool take_copy=false)
Public Member Functions inherited from Glib::ObjectBase
| ObjectBase (const ObjectBase &)=delete
ObjectBase & | operator= (const ObjectBase &)=delete
void | set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value)
void | get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const
void | set_property (const Glib::ustring &property_name, const PropertyType &value)
void | get_property (const Glib::ustring &property_name, PropertyType &value) const
void | connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void > &slot)
void | connect_property_changed (const Glib::ustring &property_name, sigc::slot< void > &&slot)
sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, const sigc::slot< void > &slot)
sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, sigc::slot< void > &&slot)
void | freeze_notify ()
void | thaw_notify ()
virtual void | reference () const
virtual void | unreference () const
GObject * | gobj ()
const GObject * | gobj () const
GObject * | gobj_copy () const
Public Member Functions inherited from sigc::trackable
| trackable () noexcept
| trackable (const trackable &src) noexcept
| trackable (trackable &&src)
| ~trackable ()
void | add_destroy_notify_callback (void *data, func_destroy_notify func) const
void | notify_callbacks ()
trackable & | operator= (const trackable &src)
trackable & | operator= (trackable &&src)
void | remove_destroy_notify_callback (void *data) const
Public Member Functions inherited from Gtk::Buildable
| Buildable (Buildable &&src) noexcept
Buildable & | operator= (Buildable &&src) noexcept
| ~Buildable () noexcept override
GtkBuildable * | gobj ()
| Provides access to the underlying C GObject.
const GtkBuildable * | gobj () const
| Provides access to the underlying C GObject.
void | set_name (const Glib::ustring & name)
| Sets the name of the buildable object.
Glib::ustring | get_name () const
| Gets the name of the buildable object.
Public Member Functions inherited from Glib::Interface
| Interface ()
| Interface (Interface &&src) noexcept
Interface & | operator= (Interface &&src) noexcept
| Interface (const Glib::Interface_Class &interface_class)
| Interface (GObject *castitem)
| ~Interface () noexcept override
| Interface (const Interface &)=delete
Interface & | operator= (const Interface &)=delete
GObject * | gobj ()
const GObject * | gobj () const

## Static Public Member Functions
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system.
static Glib::RefPtr< Action > | create ()
static Glib::RefPtr< Action > | create (const Glib::ustring & name, const Glib::ustring &label=Glib::ustring(), const Glib::ustring &tooltip=Glib::ustring())
| Creates an action.
static Glib::RefPtr< Action > | create (const Glib::ustring & name, const Gtk::StockID &stock_id, const Glib::ustring &label=Glib::ustring(), const Glib::ustring &tooltip=Glib::ustring())
| Creates an action with a stock ID.
static Glib::RefPtr< Action > | create_with_icon_name (const Glib::ustring & name, const Glib::ustring &icon_name, const Glib::ustring &label, const Glib::ustring &tooltip)
| Create an action with an icon name.
Static Public Member Functions inherited from Gtk::Buildable
static void | add_interface (GType gtype_implementer)
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system.

## Protected Member Functions
| Action ()
| Creates an empty action.
| Action (const Glib::ustring & name, const StockID &stock_id=StockID(), const Glib::ustring &label=Glib::ustring(), const Glib::ustring &tooltip=Glib::ustring())
| Creates an action with a stock ID.
| Action (const Glib::ustring & name, const Glib::ustring &icon_name, const Glib::ustring &label=Glib::ustring(), const Glib::ustring &tooltip=Glib::ustring())
| Creates an action with an icon name.
virtual Widget * | create_menu_item_vfunc ()
virtual Widget * | create_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().
Protected Member Functions inherited from Glib::Object
| Object ()
| Object (const Glib::ConstructParams &construct_params)
| Object (GObject *castitem)
| ~Object () noexcept override
Protected Member Functions inherited from Glib::ObjectBase
| ObjectBase ()
| ObjectBase (const char *custom_type_name)
| ObjectBase (const std::type_info &custom_type_info)
| ObjectBase (ObjectBase &&src) noexcept
ObjectBase & | operator= (ObjectBase &&src) noexcept
virtual | ~ObjectBase () noexcept=0
void | initialize (GObject *castitem)
void | initialize_move (GObject *castitem, Glib::ObjectBase *previous_wrapper)
Protected Member Functions inherited from Gtk::Buildable
| Buildable ()
| You should derive from this class to use it.

## Related Symbols
(Note that these are not member symbols.)
Glib::RefPtr< Gtk::Action > | wrap (GtkAction *object, bool take_copy=false)
| A Glib::wrap() method for this object.
Related Symbols inherited from Gtk::Buildable
Glib::RefPtr< Gtk::Buildable > | wrap (GtkBuildable *object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

A deprecated action which can be triggered by a menu or toolbar item.

Actions represent operations that the user can perform, along with some information about how it should be presented in the user interface. Each action provides methods to create icons, menu items and toolbar items representing itself.

As well as the callback that is called when the action is activated, the following is also associated with the action:

- a name (not translated, for path lookup)
- a label (translated, for display)
- an accelerator
- whether the label indicates a stock id
- a tooltip (optional, translated)
- a toolbar label (optional, shorter than label)

The action will also have some state information:

- visible (shown/hidden)
- sensitive (enabled/disabled)

Apart from regular actions, there are toggle actions, which can be toggled between two states and radio actions, of which only one in a group can be in the "active" state. Other actions can be implemented as Gtk::Action subclasses.

Each action can have one or more proxy menu item, toolbar button or other proxy widgets. Proxies mirror the state of the action (text label, tooltip, icon, visible, sensitive, etc), and should change when the action's state changes. When the proxy is activated, it should activate its action.

Deprecated
  Use Gio::Action and Gio::SimpleAction instead, and associate actions with Gtk::Actionable widgets. Use Gio::MenuModel for creating menus with Gtk::Menu(const Glib::RefPtr<Gio::MenuModel>& model).
  Some gtkmm widgets don't derive from Gtk::Actionable, although the corresponding gtk+ widgets implement the GtkActionable interface. This discrepancy can't be fixed until we can break ABI. You can sometimes work around this problem by using a widget's gobj() method and calling a gtk_actionable_*() method directly. Several examples in the Programming with gtkmm 3 book use Gio::SimpleAction, such as the menus and toolbars examples.

## Member Typedef Documentation

## ◆ SlotActivate

typedef sigc::slot<void> Gtk::Action::SlotActivate

For instance, void on_activate();.

## Constructor & Destructor Documentation

## ◆ Action() [1/4]

Gtk::Action::Action | ( | Action && | src | ) |
| noexcept

## ◆ ~Action()

Gtk::Action::~Action | ( |  | ) |
| override noexcept

## ◆ Action() [2/4]

Gtk::Action::Action | ( |  | ) |
| protected

Creates an empty action.

## ◆ Action() [3/4]

Gtk::Action::Action | ( | const Glib::ustring & | name,
|  | const StockID & | stock_id = StockID(),
|  | const Glib::ustring & | label = Glib::ustring(),
|  | const Glib::ustring & | tooltip = Glib::ustring() )
| explicit protected

Creates an action with a stock ID.

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

Parameters

  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.

Deprecated
  There is no corresponding replacement when using Gio::Action.

## ◆ Action() [4/4]

Gtk::Action::Action | ( | const Glib::ustring & | name,
|  | const Glib::ustring & | icon_name,
|  | const Glib::ustring & | label = Glib::ustring(),
|  | const Glib::ustring & | tooltip = Glib::ustring() )
| explicit protected

Creates an action with an icon name.

The action's icon will reflect the specified icon name in the user's icon theme.

Parameters

  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.

Deprecated
  See set_icon_name(), set_label() and set_tooltip() for replacements when using Gio::Action.

## Member Function Documentation

## ◆ activate()

void Gtk::Action::activate | ( |  | ) |

Emits the “activate” signal on the specified action, if it isn't insensitive.

This gets called by the proxy widgets when they get activated.

It can also be used to manually activate an action.

Since gtkmm 2.4

Deprecated: 3.10: Use Glib::action_group_activate_action() on a Gio::Action instead

Deprecated
  Use Gio::ActionGroup::activate_action() on a Gio::Action instead.

## ◆ block_activate()

void Gtk::Action::block_activate | ( |  | ) |

Disable activation signals from the action.

This is needed when updating the state of your proxy Gtk::Activatable widget could result in calling activate(), this is a convenience function to avoid recursing in those cases (updating toggle state for instance).

Since gtkmm 2.16

Deprecated: 3.10: Use Glib::simple_action_set_enabled() to disable the SimpleAction instead

Deprecated
  Use Gio::SimpleAction::set_enabled() to disable the Gio::SimpleAction instead.

## ◆ connect_accelerator()

void Gtk::Action::connect_accelerator | ( |  | ) |

Installs the accelerator for action if action has an accel path and group.

See set_accel_path() and set_accel_group()

Since multiple proxies may independently trigger the installation of the accelerator, the action counts the number of times this function has been called and doesn’t remove the accelerator until disconnect_accelerator() has been called as many times.

Since gtkmm 2.4

Deprecated: 3.10: Use Gio::Action and the accelerator group on an associated Gtk::Menu instead

Deprecated
  Use Gio::Action and the accelerator group on an associated Gtk::Menu instead.

## ◆ connect_proxy_vfunc()

virtual void Gtk::Action::connect_proxy_vfunc | ( | Widget * | proxy | ) |
| protected virtual

## ◆ create() [1/3]

static Glib::RefPtr< Action > Gtk::Action::create | ( |  | ) |
| static

## ◆ create() [2/3]

static Glib::RefPtr< Action > Gtk::Action::create | ( | const Glib::ustring & | name,
|  | const Glib::ustring & | label = Glib::ustring(),
|  | const Glib::ustring & | tooltip = Glib::ustring() )
| static

Creates an action.

Parameters

  name | A unique name for the action.
  label | The label displayed in menu items and on buttons.
  tooltip | A tooltip for the action.

Returns
  A new Action.

Deprecated
  See set_label() and set_tooltip() for replacements when using Gio::Action.

## ◆ create() [3/3]

static Glib::RefPtr< Action > Gtk::Action::create | ( | const Glib::ustring & | name,
|  | const Gtk::StockID & | stock_id,
|  | const Glib::ustring & | label = Glib::ustring(),
|  | const Glib::ustring & | tooltip = Glib::ustring() )
| static

Creates an action with a stock ID.

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

Parameters

  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.

Returns
  A new Action.

Deprecated
  There is no corresponding replacement when using Gio::Action.

## ◆ create_icon()

Image * Gtk::Action::create_icon | ( | IconSize | icon_size | ) |

This function is intended for use by action implementations to create icons displayed in the proxy widgets.

Since gtkmm 2.4

Deprecated: 3.10: Use Glib::menu_item_set_icon() to set an icon on a MenuItem, or Gtk::Container::add() to add a Gtk::Image to a Gtk::Button

Deprecated
  Use Gio::MenuItem::set_icon() to set an icon on a Gio::MenuItem, or Gtk::Container::add() to add a Gtk::Image to a Gtk::Button.

Parameters

  icon_size | The size of the icon (Gtk::IconSize) that should be created.

Returns
  A widget that displays the icon for this action.

## ◆ create_menu()

Menu * Gtk::Action::create_menu | ( |  | ) |

If action provides a Gtk::Menu widget as a submenu for the menu item or the toolbar item it creates, this function returns an instance of that menu.

Since gtkmm 2.12

Deprecated: 3.10: Use Gio::Action and Gio::MenuModel instead, and create a Gtk::Menu with Gtk::Menu::new_from_model()

Deprecated
  Use Gio::Action and Gio::MenuModel instead, and create a Gtk::Menu with Gtk::Menu(const Glib::RefPtr<Gio::MenuModel>& model).

Returns
  The menu item provided by the action, or `nullptr`.

## ◆ create_menu_item()

MenuItem * Gtk::Action::create_menu_item | ( |  | ) |

Creates a menu item widget that proxies for the given action.

Since gtkmm 2.4

Deprecated: 3.10: Use Glib::menu_item_new() and associate it with a Gio::Action instead.

Deprecated
  Use a Gio::MenuItem and associate it with a Gio::Action instead.

Returns
  A menu item connected to the action.

## ◆ create_menu_item_vfunc()

virtual Widget * Gtk::Action::create_menu_item_vfunc | ( |  | ) |
| protected virtual

## ◆ create_tool_item()

ToolItem * Gtk::Action::create_tool_item | ( |  | ) |

Creates a toolbar item widget that proxies for the given action.

Since gtkmm 2.4

Deprecated: 3.10: Use a Gtk::ToolItem and associate it with a Gio::Action using Gtk::Actionable::set_action_name() instead

Deprecated
  Use a Gtk::ToolItem and associate it with a Gio::Action using Gtk::Actionable::set_action_name() instead. (Impossible until GtkToolItem implements the GActionable interface.)

Returns
  A toolbar item connected to the action.

## ◆ create_tool_item_vfunc()

virtual Widget * Gtk::Action::create_tool_item_vfunc | ( |  | ) |
| protected virtual

## ◆ create_with_icon_name()

static Glib::RefPtr< Action > Gtk::Action::create_with_icon_name | ( | const Glib::ustring & | name,
|  | const Glib::ustring & | icon_name,
|  | const Glib::ustring & | label,
|  | const Glib::ustring & | tooltip )
| static

Create an action with an icon name.

The action's icon will reflect the specified icon name in the user's icon theme.

Parameters

  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.

Returns
  A new Action.

Deprecated
  See set_icon_name(), set_label() and set_tooltip() for replacements when using Gio::Action.

## ◆ disconnect_accelerator()

void Gtk::Action::disconnect_accelerator | ( |  | ) |

Undoes the effect of one call to connect_accelerator().

Since gtkmm 2.4

Deprecated: 3.10: Use Gio::Action and the accelerator group on an associated Gtk::Menu instead

Deprecated
  Use Gio::Action and the accelerator group on an associated Gtk::Menu instead.

## ◆ disconnect_proxy_vfunc()

virtual void Gtk::Action::disconnect_proxy_vfunc | ( | Widget * | proxy | ) |
| protected virtual

## ◆ get_accel_path()

Glib::ustring Gtk::Action::get_accel_path | ( |  | ) | const

Returns the accel path for this action.

Since gtkmm 2.6

Deprecated: 3.10: Use Gio::Action and the accelerator path on an associated Gtk::Menu instead

Deprecated
  Use Gio::Action and the accelerator path on an associated Gtk::Menu instead.

Returns
  The accel path for this action, or `nullptr` if none is set. The returned string is owned by GTK+ and must not be freed or modified.

## ◆ get_always_show_image()

bool Gtk::Action::get_always_show_image | ( |  | ) | const

Returns whether action's menu item proxies will always show their image, if available.

Since gtkmm 2.20

Deprecated: 3.10: Use Glib::menu_item_get_attribute_value() on a MenuItem instead

Deprecated
  Use Gio::MenuItem::get_attribute_value() on a Gio::MenuItem instead.

Returns
  `true` if the menu item proxies will always show their image.

## ◆ get_gicon() [1/2]

Glib::RefPtr< Gio::Icon > Gtk::Action::get_gicon | ( |  | ) |

Gets the gicon of action.

Since gtkmm 2.16

Deprecated: 3.10: Use Gio::Action instead, and Glib::menu_item_get_attribute_value() to get an icon from a MenuItem associated with a Gio::Action

Deprecated
  Use Gio::Action instead, and Gio::MenuItem::get_attribute_value() to get an icon from a Gio::MenuItem associated with a Gio::Action.

Returns
  The action’s Gio::Icon if one is set.

## ◆ get_gicon() [2/2]

Glib::RefPtr< const Gio::Icon > Gtk::Action::get_gicon | ( |  | ) | const

Gets the gicon of action.

Since gtkmm 2.16

Deprecated: 3.10: Use Gio::Action instead, and Glib::menu_item_get_attribute_value() to get an icon from a MenuItem associated with a Gio::Action

Deprecated
  Use Gio::Action instead, and Gio::MenuItem::get_attribute_value() to get an icon from a Gio::MenuItem associated with a Gio::Action.

Returns
  The action’s Gio::Icon if one is set.

## ◆ get_icon_name()

Glib::ustring Gtk::Action::get_icon_name | ( |  | ) | const

Gets the icon name of action.

Since gtkmm 2.16

Deprecated: 3.10: Use Gio::Action instead, and Glib::menu_item_get_attribute_value() to get an icon from a MenuItem associated with a Gio::Action

Deprecated
  Use Gio::Action instead, and Gio::MenuItem::get_attribute_value() to get an icon from a Gio::MenuItem associated with a Gio::Action.

Returns
  The icon name.

## ◆ get_is_important()

bool Gtk::Action::get_is_important | ( |  | ) | const

Checks whether action is important or not.

Since gtkmm 2.16

Deprecated: 3.10: Use Gio::Action instead, and control and monitor whether labels are shown directly

Deprecated
  Use Gio::Action instead, and control and monitor whether labels are shown directly.

Returns
  Whether action is important.

## ◆ get_label()

Glib::ustring Gtk::Action::get_label | ( |  | ) | const

Gets the label text of action.

Since gtkmm 2.16

Deprecated: 3.10: Use Gio::Action instead, and get a label from a menu item with Glib::menu_item_get_attribute_value(). For Gtk::Actionable widgets, use the widget-specific API to get a label

Deprecated
  Use Gio::Action instead, and get a label from a menu item with Gio::MenuItem::get_attribute_value(). For Gtk::Actionable widgets, use the widget-specific API to get a label.

Returns
  The label text.

## ◆ get_name()

Glib::ustring Gtk::Action::get_name | ( |  | ) | const

Returns the name of the action.

Since gtkmm 2.4

Deprecated: 3.10: Use Glib::action_get_name() on a Gio::Action instead

Deprecated
  Use Gio::Action::get_name() on a Gio::Action instead.

Returns
  The name of the action. The string belongs to GTK+ and should not be freed.

## ◆ get_proxies() [1/2]

std::vector< Widget * > Gtk::Action::get_proxies | ( |  | ) |

Returns the proxy widgets for an action.

See also Gtk::Activatable::get_related_action().

Since gtkmm 2.4

Deprecated: 3.10

Deprecated
  There is no corresponding replacement when using Gio::Action.

Returns
  A SList of proxy widgets. The list is owned by GTK+ and must not be modified.

## ◆ get_proxies() [2/2]

std::vector< const Widget * > Gtk::Action::get_proxies | ( |  | ) | const

Returns the proxy widgets for an action.

See also Gtk::Activatable::get_related_action().

Since gtkmm 2.4

Deprecated: 3.10

Deprecated
  There is no corresponding replacement when using Gio::Action.

Returns
  A SList of proxy widgets. The list is owned by GTK+ and must not be modified.

## ◆ get_sensitive()

bool Gtk::Action::get_sensitive | ( |  | ) | const

Returns whether the action itself is sensitive.

Note that this doesn’t necessarily mean effective sensitivity. See is_sensitive() for that.

Since gtkmm 2.4

Deprecated: 3.10: Use Glib::action_get_enabled() on a Gio::Action instead

Deprecated
  Use Gio::Action::get_enabled() on a Gio::Action instead.

Returns
  `true` if the action itself is sensitive.

## ◆ get_short_label()

Glib::ustring Gtk::Action::get_short_label | ( |  | ) | const

Gets the short label text of action.

Since gtkmm 2.16

Deprecated: 3.10: Use Gio::Action instead, which has no equivalent of short labels

Deprecated
  There is no corresponding replacement when using Gio::Action.

Returns
  The short label text.

## ◆ get_stock_id()

StockID Gtk::Action::get_stock_id | ( |  | ) | const

Gets the stock id of action.

Since gtkmm 2.16

Deprecated: 3.10: Use Gio::Action instead, which has no equivalent of stock items

Deprecated
  There is no corresponding replacement when using Gio::Action.

Returns
  The stock id.

## ◆ get_tooltip()

Glib::ustring Gtk::Action::get_tooltip | ( |  | ) | const

Gets the tooltip text of action.

Since gtkmm 2.16

Deprecated: 3.10: Use Gio::Action instead, and get tooltips from associated Gtk::Actionable widgets with Gtk::Widget::get_tooltip_text()

Deprecated
  Use Gio::Action instead, and get tooltips from associated Gtk::Actionable widgets with Gtk::Widget::get_tooltip_text().

Returns
  The tooltip text.

## ◆ get_type()

static GType Gtk::Action::get_type | ( |  | ) |
| static

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

## ◆ get_visible()

bool Gtk::Action::get_visible | ( |  | ) | const

Returns whether the action itself is visible.

Note that this doesn’t necessarily mean effective visibility. See is_sensitive() for that.

Since gtkmm 2.4

Deprecated: 3.10: Use Gio::Action instead, and control and monitor the state of Gtk::Actionable widgets directly

Deprecated
  Use Gio::Action instead, and control and monitor the state of Gtk::Actionable widgets directly.

Returns
  `true` if the action itself is visible.

## ◆ get_visible_horizontal()

bool Gtk::Action::get_visible_horizontal | ( |  | ) | const

Checks whether action is visible when horizontal.

Since gtkmm 2.16

Deprecated: 3.10: Use Gio::Action instead, and control and monitor the visibility of associated widgets and menu items directly

Deprecated
  Use Gio::Action instead, and control and monitor the visibility of associated widgets and menu items directly.

Returns
  Whether action is visible when horizontal.

## ◆ get_visible_vertical()

bool Gtk::Action::get_visible_vertical | ( |  | ) | const

Checks whether action is visible when horizontal.

Since gtkmm 2.16

Deprecated: 3.10: Use Gio::Action instead, and control and monitor the visibility of associated widgets and menu items directly

Deprecated
  Use Gio::Action instead, and control and monitor the visibility of associated widgets and menu items directly.

Returns
  Whether action is visible when horizontal.

## ◆ gobj() [1/2]

GtkAction * Gtk::Action::gobj | ( |  | ) |
| inline

Provides access to the underlying C GObject.

## ◆ gobj() [2/2]

const GtkAction * Gtk::Action::gobj | ( |  | ) | const
| inline

Provides access to the underlying C GObject.

## ◆ gobj_copy()

GtkAction * Gtk::Action::gobj_copy | ( |  | ) |

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

## ◆ is_sensitive()

bool Gtk::Action::is_sensitive | ( |  | ) | const

Returns whether the action is effectively sensitive.

Since gtkmm 2.4

Deprecated: 3.10: Use Glib::action_get_enabled() on a Gio::Action instead

Deprecated
  Use Gio::Action::get_enabled() on a Gio::Action instead.

Returns
  `true` if the action and its associated action group are both sensitive.

## ◆ is_visible()

bool Gtk::Action::is_visible | ( |  | ) | const

Returns whether the action is effectively visible.

Since gtkmm 2.4

Deprecated: 3.10: Use Gio::Action instead, and control and monitor the state of Gtk::Actionable widgets directly

Deprecated
  Use Gio::Action instead, and control and monitor the state of Gtk::Actionable widgets directly.

Returns
  `true` if the action and its associated action group are both visible.

## ◆ on_activate()

virtual void Gtk::Action::on_activate | ( |  | ) |
| protected virtual

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

## ◆ operator=()

Action & Gtk::Action::operator= | ( | Action && | src | ) |
| noexcept

## ◆ property_action_group() [1/2]

Glib::PropertyProxy< Glib::RefPtr< ActionGroup > > Gtk::Action::property_action_group | ( |  | ) |

The GtkActionGroup this GtkAction is associated with, or `nullptr` (for internal use).

Deprecated: 3.10: Lookup the Gio::Action using Glib::action_map_lookup_action() instead

Deprecated
  Lookup the Gio::Action using Gio::ActionMap::lookup_action() instead.

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

Glib::PropertyProxy_ReadOnly< Glib::RefPtr< ActionGroup > > Gtk::Action::property_action_group | ( |  | ) | const

The GtkActionGroup this GtkAction is associated with, or `nullptr` (for internal use).

Deprecated: 3.10: Lookup the Gio::Action using Glib::action_map_lookup_action() instead

Deprecated
  Lookup the Gio::Action using Gio::ActionMap::lookup_action() instead.

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

Glib::PropertyProxy< bool > Gtk::Action::property_always_show_image | ( |  | ) |

If `true`, the action's menu item proxies will ignore the Gtk::Settings::property_gtk_menu_images() setting and always show their image, if available.

Use this property if the menu item would be useless or hard to use without their image.

Since gtkmm 2.20

Deprecated: 3.10: There is no corresponding replacement when using Gio::Action

Deprecated
  There is no corresponding replacement when using Gio::Action.

Default value: `false`

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

Glib::PropertyProxy_ReadOnly< bool > Gtk::Action::property_always_show_image | ( |  | ) | const

If `true`, the action's menu item proxies will ignore the Gtk::Settings::property_gtk_menu_images() setting and always show their image, if available.

Use this property if the menu item would be useless or hard to use without their image.

Since gtkmm 2.20

Deprecated: 3.10: There is no corresponding replacement when using Gio::Action

Deprecated
  There is no corresponding replacement when using Gio::Action.

Default value: `false`

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

Glib::PropertyProxy< Glib::RefPtr< Gio::Icon > > Gtk::Action::property_gicon | ( |  | ) |

The Gio::Icon displayed in the Gtk::Action.

Note that the stock icon is preferred, if the Gtk::Action::property_stock_id() property holds the id of an existing stock icon.

This is an appearance property and thus only applies if Gtk::Activatable::property_use_action_appearance() is `true`.

Since gtkmm 2.16

Deprecated: 3.10: Use the "icon" attribute on a MenuItem instead

Deprecated
  Use the 'icon' attribute on Gio::MenuItem instead.

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

Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Gio::Icon > > Gtk::Action::property_gicon | ( |  | ) | const

The Gio::Icon displayed in the Gtk::Action.

Note that the stock icon is preferred, if the Gtk::Action::property_stock_id() property holds the id of an existing stock icon.

This is an appearance property and thus only applies if Gtk::Activatable::property_use_action_appearance() is `true`.

Since gtkmm 2.16

Deprecated: 3.10: Use the "icon" attribute on a MenuItem instead

Deprecated
  Use the 'icon' attribute on Gio::MenuItem instead.

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

Glib::PropertyProxy< bool > Gtk::Action::property_hide_if_empty | ( |  | ) |

When `true`, empty menu proxies for this action are hidden.

Deprecated: 3.10: There is no corresponding replacement when using Gio::Action

Deprecated
  There is no corresponding replacement when using Gio::Action.

Default value: `true`

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

Glib::PropertyProxy_ReadOnly< bool > Gtk::Action::property_hide_if_empty | ( |  | ) | const

When `true`, empty menu proxies for this action are hidden.

Deprecated: 3.10: There is no corresponding replacement when using Gio::Action

Deprecated
  There is no corresponding replacement when using Gio::Action.

Default value: `true`

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

Glib::PropertyProxy< Glib::ustring > Gtk::Action::property_icon_name | ( |  | ) |

The name of the icon from the icon theme.

Note that the stock icon is preferred, if the Gtk::Action::property_stock_id() property holds the id of an existing stock icon, and the Gio::Icon is preferred if the Gtk::Action::property_gicon() property is set.

This is an appearance property and thus only applies if Gtk::Activatable::property_use_action_appearance() is `true`.

Since gtkmm 2.10

Deprecated: 3.10: Use the "icon" attribute on a MenuItem instead

Deprecated
  Use the 'icon' attribute on Gio::MenuItem instead.

Default value: ""

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

Glib::PropertyProxy_ReadOnly< Glib::ustring > Gtk::Action::property_icon_name | ( |  | ) | const

The name of the icon from the icon theme.

Note that the stock icon is preferred, if the Gtk::Action::property_stock_id() property holds the id of an existing stock icon, and the Gio::Icon is preferred if the Gtk::Action::property_gicon() property is set.

This is an appearance property and thus only applies if Gtk::Activatable::property_use_action_appearance() is `true`.

Since gtkmm 2.10

Deprecated: 3.10: Use the "icon" attribute on a MenuItem instead

Deprecated
  Use the 'icon' attribute on Gio::MenuItem instead.

Default value: ""

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

Glib::PropertyProxy< bool > Gtk::Action::property_is_important | ( |  | ) |

Whether the action is considered important.

When `true`, toolitem proxies for this action show text in GTK_TOOLBAR_BOTH_HORIZ mode.

Deprecated: 3.10: There is no corresponding replacement when using Gio::Action

Deprecated
  There is no corresponding replacement when using Gio::Action.

Default value: `false`

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

Glib::PropertyProxy_ReadOnly< bool > Gtk::Action::property_is_important | ( |  | ) | const

Whether the action is considered important.

When `true`, toolitem proxies for this action show text in GTK_TOOLBAR_BOTH_HORIZ mode.

Deprecated: 3.10: There is no corresponding replacement when using Gio::Action

Deprecated
  There is no corresponding replacement when using Gio::Action.

Default value: `false`

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

Glib::PropertyProxy< Glib::ustring > Gtk::Action::property_label | ( |  | ) |

The label used for menu items and buttons that activate this action.

If the label is `nullptr`, GTK+ uses the stock label specified via the stock-id property.

This is an appearance property and thus only applies if Gtk::Activatable::property_use_action_appearance() is `true`.

Deprecated: 3.10: Use the "label" attribute on MenuItem instead

Deprecated
  Use the 'label' attribute on Gio::MenuItem instead.

Default value: ""

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

Glib::PropertyProxy_ReadOnly< Glib::ustring > Gtk::Action::property_label | ( |  | ) | const

The label used for menu items and buttons that activate this action.

If the label is `nullptr`, GTK+ uses the stock label specified via the stock-id property.

This is an appearance property and thus only applies if Gtk::Activatable::property_use_action_appearance() is `true`.

Deprecated: 3.10: Use the "label" attribute on MenuItem instead

Deprecated
  Use the 'label' attribute on Gio::MenuItem instead.

Default value: ""

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

Glib::PropertyProxy_ReadOnly< Glib::ustring > Gtk::Action::property_name | ( |  | ) | const

A unique name for the action.

Deprecated: 3.10: Use Gio::Action::property_name() instead

Deprecated
  Use Gio::Action::property_name() instead.

Default value: ""

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

Glib::PropertyProxy< bool > Gtk::Action::property_sensitive | ( |  | ) |

Whether the action is enabled.

Deprecated: 3.10: Use Gio::Action::property_enabled() and SimpleAction::property_enabled() instead

Deprecated
  Use Gio::Action::property_enabled() and Gio::SimpleAction::property_enabled() instead.

Default value: `true`

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

Glib::PropertyProxy_ReadOnly< bool > Gtk::Action::property_sensitive | ( |  | ) | const

Whether the action is enabled.

Deprecated: 3.10: Use Gio::Action::property_enabled() and SimpleAction::property_enabled() instead

Deprecated
  Use Gio::Action::property_enabled() and Gio::SimpleAction::property_enabled() instead.

Default value: `true`

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

Glib::PropertyProxy< Glib::ustring > Gtk::Action::property_short_label | ( |  | ) |

A shorter label that may be used on toolbar buttons.

This is an appearance property and thus only applies if Gtk::Activatable::property_use_action_appearance() is `true`.

Deprecated: 3.10: There is no corresponding replacement when using Gio::Action

Deprecated
  There is no corresponding replacement when using Gio::Action.

Default value: ""

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

Glib::PropertyProxy_ReadOnly< Glib::ustring > Gtk::Action::property_short_label | ( |  | ) | const

A shorter label that may be used on toolbar buttons.

This is an appearance property and thus only applies if Gtk::Activatable::property_use_action_appearance() is `true`.

Deprecated: 3.10: There is no corresponding replacement when using Gio::Action

Deprecated
  There is no corresponding replacement when using Gio::Action.

Default value: ""

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

Glib::PropertyProxy< StockID > Gtk::Action::property_stock_id | ( |  | ) |

The stock icon displayed in widgets representing this action.

This is an appearance property and thus only applies if Gtk::Activatable::property_use_action_appearance() is `true`.

Deprecated: 3.10: There is no corresponding replacement when using Gio::Action

Deprecated
  There is no corresponding replacement when using Gio::Action.

Default value: ""

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

Glib::PropertyProxy_ReadOnly< StockID > Gtk::Action::property_stock_id | ( |  | ) | const

The stock icon displayed in widgets representing this action.

This is an appearance property and thus only applies if Gtk::Activatable::property_use_action_appearance() is `true`.

Deprecated: 3.10: There is no corresponding replacement when using Gio::Action

Deprecated
  There is no corresponding replacement when using Gio::Action.

Default value: ""

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

Glib::PropertyProxy< Glib::ustring > Gtk::Action::property_tooltip | ( |  | ) |

A tooltip for this action.

Deprecated: 3.10: Use Gtk::Widget::set_tooltip_text() instead

Deprecated
  Use Gtk::Widget::set_tooltip_text() and Gtk::Widget::get_tooltip_text() instead.

Default value: ""

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

Glib::PropertyProxy_ReadOnly< Glib::ustring > Gtk::Action::property_tooltip | ( |  | ) | const

A tooltip for this action.

Deprecated: 3.10: Use Gtk::Widget::set_tooltip_text() instead

Deprecated
  Use Gtk::Widget::set_tooltip_text() and Gtk::Widget::get_tooltip_text() instead.

Default value: ""

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

Glib::PropertyProxy< bool > Gtk::Action::property_visible | ( |  | ) |

Whether the action is visible.

Deprecated: 3.10: There is no corresponding replacement when using Gio::Action

Deprecated
  There is no corresponding replacement when using Gio::Action.

Default value: `true`

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

Glib::PropertyProxy_ReadOnly< bool > Gtk::Action::property_visible | ( |  | ) | const

Whether the action is visible.

Deprecated: 3.10: There is no corresponding replacement when using Gio::Action

Deprecated
  There is no corresponding replacement when using Gio::Action.

Default value: `true`

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

Glib::PropertyProxy< bool > Gtk::Action::property_visible_horizontal | ( |  | ) |

Whether the toolbar item is visible when the toolbar is in a horizontal orientation.

Deprecated: 3.10: There is no corresponding replacement when using Gio::Action

Deprecated
  There is no corresponding replacement when using Gio::Action.

Default value: `true`

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

Glib::PropertyProxy_ReadOnly< bool > Gtk::Action::property_visible_horizontal | ( |  | ) | const

Whether the toolbar item is visible when the toolbar is in a horizontal orientation.

Deprecated: 3.10: There is no corresponding replacement when using Gio::Action

Deprecated
  There is no corresponding replacement when using Gio::Action.

Default value: `true`

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

Glib::PropertyProxy< bool > Gtk::Action::property_visible_overflown | ( |  | ) |

When `true`, toolitem proxies for this action are represented in the toolbar overflow menu.

Since gtkmm 2.6

Deprecated: 3.10: There is no corresponding replacement when using Gio::Action

Deprecated
  There is no corresponding replacement when using Gio::Action.

Default value: `true`

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

Glib::PropertyProxy_ReadOnly< bool > Gtk::Action::property_visible_overflown | ( |  | ) | const

When `true`, toolitem proxies for this action are represented in the toolbar overflow menu.

Since gtkmm 2.6

Deprecated: 3.10: There is no corresponding replacement when using Gio::Action

Deprecated
  There is no corresponding replacement when using Gio::Action.

Default value: `true`

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

Glib::PropertyProxy< bool > Gtk::Action::property_visible_vertical | ( |  | ) |

Whether the toolbar item is visible when the toolbar is in a vertical orientation.

Deprecated: 3.10: There is no corresponding replacement when using Gio::Action

Deprecated
  There is no corresponding replacement when using Gio::Action.

Default value: `true`

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

Glib::PropertyProxy_ReadOnly< bool > Gtk::Action::property_visible_vertical | ( |  | ) | const

Whether the toolbar item is visible when the toolbar is in a vertical orientation.

Deprecated: 3.10: There is no corresponding replacement when using Gio::Action

Deprecated
  There is no corresponding replacement when using Gio::Action.

Default value: `true`

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

void Gtk::Action::set_accel_group | ( | const Glib::RefPtr< AccelGroup > & | accel_group | ) |

Sets the Gtk::AccelGroup in which the accelerator for this action will be installed.

Since gtkmm 2.4

Deprecated: 3.10: Use Gio::Action and the accelerator group on an associated Gtk::Menu instead

Deprecated
  Use Gio::Action and the accelerator group on an associated Gtk::Menu instead.

Parameters

  accel_group | A Gtk::AccelGroup or `nullptr`.

## ◆ set_accel_path()

void Gtk::Action::set_accel_path | ( | const Glib::ustring & | accel_path | ) |

Sets the accel path for this action.

All proxy widgets associated with the action will have this accel path, so that their accelerators are consistent.

Note that accel_path string will be stored in a Quark. Therefore, if you pass a static string, you can save some memory by interning it first with Glib::intern_static_string().

Since gtkmm 2.4

Deprecated: 3.10: Use Gio::Action and the accelerator path on an associated Gtk::Menu instead

Deprecated
  Use Gio::Action and the accelerator path on an associated Gtk::Menu instead.

Parameters

  accel_path | The accelerator path.

## ◆ set_always_show_image()

void Gtk::Action::set_always_show_image | ( | bool | always_show = true | ) |

Sets whether action's menu item proxies will ignore the Gtk::Settings::property_gtk_menu_images() setting and always show their image, if available.

Use this if the menu item would be useless or hard to use without their image.

Since gtkmm 2.20

Deprecated: 3.10: Use Glib::menu_item_set_icon() on a MenuItem instead, if the item should have an image

Deprecated
  Use Gio::MenuItem::set_icon() on a Gio::MenuItem instead, if the item should have an image.

Parameters

  always_show | `true` if menuitem proxies should always show their image.

## ◆ set_gicon()

void Gtk::Action::set_gicon | ( | const Glib::RefPtr< Gio::Icon > & | icon | ) |

Sets the icon of action.

Since gtkmm 2.16

Deprecated: 3.10: Use Gio::Action instead, and Glib::menu_item_set_icon() to set an icon on a MenuItem associated with a Gio::Action, or Gtk::Container::add() to add a Gtk::Image to a Gtk::Button

Deprecated
  Use Gio::Action instead, and Gio::MenuItem::set_icon() to set an icon on a Gio::MenuItem associated with a Gio::Action, or Gtk::Container::add() to add a Gtk::Image to a Gtk::Button.

Parameters

  icon | The Gio::Icon to set.

## ◆ set_icon_name()

void Gtk::Action::set_icon_name | ( | const Glib::ustring & | icon_name | ) |

Sets the icon name on action.

Since gtkmm 2.16

Deprecated: 3.10: Use Gio::Action instead, and Glib::menu_item_set_icon() to set an icon on a MenuItem associated with a Gio::Action, or Gtk::Container::add() to add a Gtk::Image to a Gtk::Button

Deprecated
  Use Gio::Action instead, and Gio::MenuItem::set_icon() to set an icon on a Gio::MenuItem associated with a Gio::Action, or Gtk::Container::add() to add a Gtk::Image to a Gtk::Button.

Parameters

  icon_name | The icon name to set.

## ◆ set_is_important()

void Gtk::Action::set_is_important | ( | bool | is_important = true | ) |

Sets whether the action is important, this attribute is used primarily by toolbar items to decide whether to show a label or not.

Since gtkmm 2.16

Deprecated: 3.10: Use Gio::Action instead, and control and monitor whether labels are shown directly

Deprecated
  Use Gio::Action instead, and control and monitor whether labels are shown directly.

Parameters

  is_important | `true` to make the action important.

## ◆ set_label()

void Gtk::Action::set_label | ( | const Glib::ustring & | label | ) |

Sets the label of action.

Since gtkmm 2.16

Deprecated: 3.10: Use Gio::Action instead, and set a label on a menu item with Glib::menu_item_set_label(). For Gtk::Actionable widgets, use the widget-specific API to set a label

Deprecated
  Use Gio::Action instead, and set a label on a menu item with Gio::MenuItem::set_label(). For Gtk::Actionable widgets, use the widget-specific API to set a label.

Parameters

  label | The label text to set.

## ◆ set_sensitive()

void Gtk::Action::set_sensitive | ( | bool | sensitive = true | ) |

Sets the :sensitive property of the action to sensitive.

Note that this doesn’t necessarily mean effective sensitivity. See is_sensitive() for that.

Since gtkmm 2.6

Deprecated: 3.10: Use Glib::simple_action_set_enabled() on a SimpleAction instead

Deprecated
  Use Gio::SimpleAction::set_enabled() on a Gio::SimpleAction instead.

Parameters

  sensitive | `true` to make the action sensitive.

## ◆ set_short_label()

void Gtk::Action::set_short_label | ( | const Glib::ustring & | short_label | ) |

Sets a shorter label text on action.

Since gtkmm 2.16

Deprecated: 3.10: Use Gio::Action instead, which has no equivalent of short labels

Deprecated
  There is no corresponding replacement when using Gio::Action.

Parameters

  short_label | The label text to set.

## ◆ set_stock_id()

void Gtk::Action::set_stock_id | ( | const StockID & | stock_id | ) |

Sets the stock id on action.

Since gtkmm 2.16

Deprecated: 3.10: Use Gio::Action instead, which has no equivalent of stock items

Deprecated
  There is no corresponding replacement when using Gio::Action.

Parameters

  stock_id | The stock id.

## ◆ set_tooltip()

void Gtk::Action::set_tooltip | ( | const Glib::ustring & | tooltip | ) |

Sets the tooltip text on action.

Since gtkmm 2.16

Deprecated: 3.10: Use Gio::Action instead, and set tooltips on associated Gtk::Actionable widgets with Gtk::Widget::set_tooltip_text()

Deprecated
  Use Gio::Action instead, and set tooltips on associated Gtk::Actionable widgets with Gtk::Widget::set_tooltip_text().

Parameters

  tooltip | The tooltip text.

## ◆ set_visible()

void Gtk::Action::set_visible | ( | bool | visible = true | ) |

Sets the :visible property of the action to visible.

Note that this doesn’t necessarily mean effective visibility. See is_visible() for that.

Since gtkmm 2.6

Deprecated: 3.10: Use Gio::Action instead, and control and monitor the state of Gtk::Actionable widgets directly

Deprecated
  Use Gio::Action instead, and control and monitor the state of Gtk::Actionable widgets directly.

Parameters

  visible | `true` to make the action visible.

## ◆ set_visible_horizontal()

void Gtk::Action::set_visible_horizontal | ( | bool | visible_horizontal = true | ) |

Sets whether action is visible when horizontal.

Since gtkmm 2.16

Deprecated: 3.10: Use Gio::Action instead, and control and monitor the visibility of associated widgets and menu items directly

Deprecated
  Use Gio::Action instead, and control and monitor the visibility of associated widgets and menu items directly.

Parameters

  visible_horizontal | Whether the action is visible horizontally.

## ◆ set_visible_vertical()

void Gtk::Action::set_visible_vertical | ( | bool | visible_vertical = true | ) |

Sets whether action is visible when vertical.

Since gtkmm 2.16

Deprecated: 3.10: Use Gio::Action instead, and control and monitor the visibility of associated widgets and menu items directly

Deprecated
  Use Gio::Action instead, and control and monitor the visibility of associated widgets and menu items directly.

Parameters

  visible_vertical | Whether the action is visible vertically.

## ◆ signal_activate()

Glib::SignalProxy< void > Gtk::Action::signal_activate | ( |  | ) |

Slot Prototype:
  `void on_my_activate()`

Flags: Run First, No Recurse

The "activate" signal is emitted when the action is activated.

Since gtkmm 2.4

Deprecated: 3.10: Use SimpleAction::signal_activate() instead

Deprecated
  Use Gio::SimpleAction::signal_activate() instead.

## ◆ unblock_activate()

void Gtk::Action::unblock_activate | ( |  | ) |

Reenable activation signals from the action.

Since gtkmm 2.16

Deprecated: 3.10: Use Glib::simple_action_set_enabled() to enable the SimpleAction instead

Deprecated
  Use Gio::SimpleAction::set_enabled() to enable the Gio::SimpleAction instead.

## Friends And Related Symbol Documentation

## ◆ wrap()

Glib::RefPtr< Gtk::Action > wrap | ( | GtkAction * | object,
|  | bool | take_copy = false )
| related

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

Parameters

  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.

Returns
  A C++ instance that wraps this C instance.