gtkmm 3.6.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions
Gtk::Actionable Class Reference

This interface provides a convenient way of associating widgets with actions on a ApplicationWindow or Application. More...

Inheritance diagram for Gtk::Actionable:
[legend]

List of all members.

## Public Member Functions
virtual | ~Actionable ()
GtkActionable* | gobj ()
| Provides access to the underlying C GObject.
const GtkActionable* | gobj () const
| Provides access to the underlying C GObject.
Glib::ustring | get_action_name () const
| Gets the action name for actionable.
void | set_action_name (const Glib::ustring& action_name)
| Specifies the name of the action with which this widget should be associated.
Glib::VariantBase | get_action_target_value ()
| Gets the current target value of actionabe.
const Glib::VariantBase | get_action_target_value () const
| Gets the current target value of actionabe.
void | set_action_target_value (const Glib::VariantBase& target_value)
| Sets the target value of an actionable widget.
void | set_detailed_action_name (const Glib::ustring& detailed_action_name)
| Sets the action-name and associated string target value of an actionable widget.
Glib::PropertyProxy < Glib::ustring > | property_action_name ()
| The name of the associated action, like 'app.quit'.
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_action_name () const
| The name of the associated action, like 'app.quit'.
Glib::PropertyProxy < Glib::VariantBase > | property_action_target ()
| The parameter for action invocations.
Glib::PropertyProxy_ReadOnly < Glib::VariantBase > | property_action_target () const
| The parameter for action invocations.
virtual Glib::ustring | get_action_name_vfunc () const
virtual void | set_action_name_vfunc (const Glib::ustring& action_name)
virtual Glib::VariantBase | get_action_target_value_vfunc () const
virtual void | set_action_target_value_vfunc (const Glib::VariantBase& action_target_value)
Public Member Functions inherited from Glib::Interface
| Interface (const Glib::Interface_Class &interface_class)
| Interface (GObject *castitem)
virtual | ~Interface ()
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)
sigc::connection | connect_property_changed_with_return (const Glib::ustring &property_name, const sigc::slot< void > &slot)
void | freeze_notify ()
void | thaw_notify ()
virtual void | reference () const
virtual void | unreference () const
GObject * | gobj_copy () const

## Static Public Member Functions
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
| Actionable ()
| You should derive from this class to use it.
Protected Member Functions inherited from Glib::Interface
| ObjectBase ()
| ObjectBase (const char *custom_type_name)
| ObjectBase (const std::type_info &custom_type_info)
virtual | ~ObjectBase ()=0
void | initialize (GObject *castitem)

## Related Functions
(Note that these are not member functions.)
Glib::RefPtr< Gtk::Actionable > | wrap (GtkActionable* object, bool take_copy=false)
| A Glib::wrap() method for this object.

## Detailed Description

This interface provides a convenient way of associating widgets with actions on a ApplicationWindow or Application.

It primarily consists of two properties: "action-name" and "action-target". There are also some convenience APIs for setting these properties.

This interface is presently only meaningful if used on a widget that is (or will be) located inside of a ApplicationWindow and can only be used to associate the widget with actions on that window, or its associated Application.

Since gtkmm 3.4:

## Constructor & Destructor Documentation

Gtk::Actionable::Actionable | ( |  | ) |
| protected

You should derive from this class to use it.

virtual Gtk::Actionable::~Actionable | ( |  | ) |
| virtual

## Member Function Documentation

static void Gtk::Actionable::add_interface | ( | GType | gtype_implementer | ) |
| static

Glib::ustring Gtk::Actionable::get_action_name | ( |  | ) | const

Gets the action name for actionable.

See set_action_name() for more information.

Since gtkmm 3.4:

Returns:
  The action name, or `0` if none is set.

virtual Glib::ustring Gtk::Actionable::get_action_name_vfunc | ( |  | ) | const
| virtual

Glib::VariantBase Gtk::Actionable::get_action_target_value | ( |  | ) |

Gets the current target value of actionabe.

See set_action_target_value() for more information.

Since gtkmm 3.4:

Returns:
  The current target value.

const Glib::VariantBase Gtk::Actionable::get_action_target_value | ( |  | ) | const

Gets the current target value of actionabe.

See set_action_target_value() for more information.

Since gtkmm 3.4:

Returns:
  The current target value.

virtual Glib::VariantBase Gtk::Actionable::get_action_target_value_vfunc | ( |  | ) | const
| virtual

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

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

GtkActionable* Gtk::Actionable::gobj | ( |  | ) |
| inline

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

const GtkActionable* Gtk::Actionable::gobj | ( |  | ) | const
| inline

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

Glib::PropertyProxy< Glib::ustring > Gtk::Actionable::property_action_name | ( |  | ) |

The name of the associated action, like 'app.quit'.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

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

Glib::PropertyProxy_ReadOnly< Glib::ustring > Gtk::Actionable::property_action_name | ( |  | ) | const

The name of the associated action, like 'app.quit'.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

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

Glib::PropertyProxy< Glib::VariantBase > Gtk::Actionable::property_action_target | ( |  | ) |

The parameter for action invocations.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

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

Glib::PropertyProxy_ReadOnly< Glib::VariantBase > Gtk::Actionable::property_action_target | ( |  | ) | const

The parameter for action invocations.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

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

void Gtk::Actionable::set_action_name | ( | const Glib::ustring & | action_name | ) |

Specifies the name of the action with which this widget should be associated.

If action_name is `0` then the widget will be unassociated from any previous action.

Usually this function is used when the widget is located (or will be located) within the hierarchy of a Gtk::ApplicationWindow.

Names are of the form "win.save" or "app.quit" for actions on the containing Gtk::ApplicationWindow or its associated Gtk::Application, respectively. This is the same form used for actions in the Menu associated with the window.

Since gtkmm 3.4:

Parameters:

  action_name | An action name, or `0`.

virtual void Gtk::Actionable::set_action_name_vfunc | ( | const Glib::ustring & | action_name | ) |
| virtual

void Gtk::Actionable::set_action_target_value | ( | const Glib::VariantBase & | target_value | ) |

Sets the target value of an actionable widget.

If target_value is `0` then the target value is unset.

The target value has two purposes. First, it is used as the parameter to activation of the action associated with the Gtk::Actionable widget. Second, it is used to determine if the widget should be rendered as "active" - the widget is active if the state is equal to the given target.

Consider the example of associating a set of buttons with a Action with string state in a typical "radio button" situation. Each button will be associated with the same action, but with a different target value for that action. Clicking on a particular button will activate the action with the target of that button, which will typically cause the action's state to change to that value. Since the action's state is now equal to the target value of the button, the button will now be rendered as active (and the other buttons, with different targets, rendered inactive).

Since gtkmm 3.4:

Parameters:

  target_value | A Variant to set as the target value, or `0`.

virtual void Gtk::Actionable::set_action_target_value_vfunc | ( | const Glib::VariantBase & | action_target_value | ) |
| virtual

void Gtk::Actionable::set_detailed_action_name | ( | const Glib::ustring & | detailed_action_name | ) |

Sets the action-name and associated string target value of an actionable widget.

This allows for the effect of both set_action_name() and set_action_target_value() in the common case that the target is string-valued.

detailed_action_name is a string of the form `"action::target"` where `action` is the action name and `target` is the string to use as the target.

Since gtkmm 3.4:

Parameters:

  detailed_action_name | The detailed action name.

## Friends And Related Function Documentation

Glib::RefPtr< Gtk::Actionable > wrap | ( | GtkActionable * | 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.

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

- gtkmm/actionable.h