glibmm 2.52.1

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

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

Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions | List of all members
Gio::SimpleActionGroup Class Reference

SimpleActionGroup - A simple ActionGroup implementation. More...

`#include <giomm/simpleactiongroup.h>`

Inheritance diagram for Gio::SimpleActionGroup:
[legend]

## Public Member Functions
| SimpleActionGroup (SimpleActionGroup&& src) noexcept
SimpleActionGroup& | operator= (SimpleActionGroup&& src) noexcept
| ~SimpleActionGroup () noexceptoverride
GSimpleActionGroup* | gobj ()
| Provides access to the underlying C GObject. More...
const GSimpleActionGroup* | gobj () const
| Provides access to the underlying C GObject. More...
GSimpleActionGroup* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
Glib::RefPtr< Action > | lookup (const Glib::ustring& action_name)
| Looks up the action with the name action_name in the group. More...
Glib::RefPtr< const Action > | lookup (const Glib::ustring& action_name) const
| Looks up the action with the name action_name in the group. More...
void | insert (const Glib::RefPtr< Action >& action)
| Adds an action to the action group. More...
void | remove (const Glib::ustring& action_name)
| Removes the named action from the action group. More...
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)
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)
| You probably want to use a specific property_*() accessor method instead. More...
void | get_property_value (const Glib::ustring& property_name, Glib::ValueBase& value) const
| You probably want to use a specific property_*() accessor method instead. More...
template<class PropertyType >
void | set_property (const Glib::ustring& property_name, const PropertyType& value)
| You probably want to use a specific property_*() accessor method instead. More...
template<class PropertyType >
void | get_property (const Glib::ustring& property_name, PropertyType& value) const
| You probably want to use a specific property_*() accessor method instead. More...
void | connect_property_changed (const Glib::ustring& property_name, const sigc::slot< void >& slot)
| You can use the signal_changed() signal of the property proxy instead. More...
void | connect_property_changed (const Glib::ustring& property_name, sigc::slot< void >&& slot)
| You can use the signal_changed() signal of the property proxy instead. More...
sigc::connection | connect_property_changed_with_return (const Glib::ustring& property_name, const sigc::slot< void >& slot)
| You can use the signal_changed() signal of the property proxy instead. More...
sigc::connection | connect_property_changed_with_return (const Glib::ustring& property_name, sigc::slot< void >&& slot)
| You can use the signal_changed() signal of the property proxy instead. More...
void | freeze_notify ()
| Increases the freeze count on object. More...
void | thaw_notify ()
| Reverts the effect of a previous call to freeze_notify(). More...
virtual void | reference () const
| Increment the reference count for this object. More...
virtual void | unreference () const
| Decrement the reference count for this object. More...
GObject* | gobj ()
| Provides access to the underlying C GObject. More...
const GObject* | gobj () const
| Provides access to the underlying C GObject. More...
GObject* | gobj_copy () const
| Give a ref-ed copy to someone. Use for direct struct access. More...
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 Gio::ActionGroup
| ActionGroup (ActionGroup&& src) noexcept
ActionGroup& | operator= (ActionGroup&& src) noexcept
| ~ActionGroup () noexceptoverride
GActionGroup* | gobj ()
| Provides access to the underlying C GObject. More...
const GActionGroup* | gobj () const
| Provides access to the underlying C GObject. More...
bool | has_action (const Glib::ustring& action_name) const
| Checks if the named action exists within action_group. More...
std::vector< Glib::ustring > | list_actions () const
| Lists the actions contained within action_group. More...
bool | query_action (const Glib::ustring& action_name, bool& enabled, Glib::VariantType& parameter_type, Glib::VariantBase& state_hint, Glib::VariantType& state_type, Glib::VariantBase& state)
| Queries all aspects of the named action within an action_group. More...
bool | query_action (const Glib::ustring& action_name, bool& enabled, Glib::VariantType& parameter_type, Glib::VariantBase& state_hint, Glib::VariantType& state_type)
| A query_action() convenience overload. More...
bool | query_action (const Glib::ustring& action_name, bool& enabled, Glib::VariantType& parameter_type, Glib::VariantBase& state_hint, Glib::VariantBase& state)
| A query_action() convenience overload. More...
bool | query_action (const Glib::ustring& action_name, bool& enabled, Glib::VariantType& parameter_type, Glib::VariantBase& state_hint)
| A query_action() convenience overload. More...
bool | query_action (const Glib::ustring& action_name, bool& enabled, Glib::VariantBase& state_hint, Glib::VariantType& state_type, Glib::VariantBase& state)
| A query_action() convenience overload. More...
bool | query_action (const Glib::ustring& action_name, bool& enabled, Glib::VariantBase& state_hint, Glib::VariantType& state_type)
| A query_action() convenience overload. More...
bool | query_action (const Glib::ustring& action_name, bool& enabled, Glib::VariantBase& state_hint, Glib::VariantBase& state)
| A query_action() convenience overload. More...
bool | query_action (const Glib::ustring& action_name, bool& enabled, Glib::VariantBase& state_hint)
| A query_action() convenience overload. More...
bool | get_action_enabled (const Glib::ustring& action_name) const
| Checks if the named action within action_group is currently enabled. More...
Glib::VariantType | get_action_parameter_type (const Glib::ustring& action_name) const
| Queries the type of the parameter that must be given when activating the named action within action_group. More...
Glib::VariantType | get_action_state_type (const Glib::ustring& action_name) const
| Queries the type of the state of the named action within action_group. More...
Glib::VariantContainerBase | get_action_state_hint (const Glib::ustring& action_name) const
| Requests a hint about the valid range of values for the state of the named action within action_group. More...
template<typename T_Value >
void | get_action_state_hint (const Glib::ustring& action_name, T_Value& value) const
| Requests a hint about the valid range of values for the state of the named action within the action group. More...
Glib::VariantContainerBase | get_action_state_hint_variant (const Glib::ustring& action_name) const
| Requests a hint about the valid range of values for the state of the named action within action_group. More...
Glib::VariantBase | get_action_state (const Glib::ustring& action_name) const
| Queries the current state of the named action within action_group. More...
template<typename T_Value >
void | get_action_state (const Glib::ustring& action_name, T_Value& value) const
| Queries the current state of the named action within the action group. More...
Glib::VariantBase | get_action_state_variant (const Glib::ustring& action_name) const
| Queries the current state of the named action within action_group. More...
void | change_action_state (const Glib::ustring& action_name, const Glib::VariantBase& value)
| Request for the state of the named action within action_group to be changed to value. More...
void | activate_action (const Glib::ustring& action_name, const Glib::VariantBase& parameter)
| Activate the named action within action_group. More...
void | activate_action (const Glib::ustring& action_name)
| A activate_action() convenience overload. More...
void | action_added (const Glib::ustring& action_name)
| Emits the ActionGroup::signal_action_added() signal on action_group. More...
void | action_removed (const Glib::ustring& action_name)
| Emits the ActionGroup::signal_action_removed() signal on action_group. More...
void | action_enabled_changed (const Glib::ustring& action_name, bool enabled)
| Emits the ActionGroup::signal_action_enabled_changed() signal on action_group. More...
void | action_state_changed (const Glib::ustring& action_name, const Glib::VariantBase& state)
| Emits the ActionGroup::signal_action_state_changed() signal on action_group. More...
Glib::SignalProxy< void, const Glib::ustring& > | signal_action_added ()
Glib::SignalProxy< void, const Glib::ustring&, bool > | signal_action_enabled_changed ()
Glib::SignalProxy< void, const Glib::ustring& > | signal_action_removed ()
Glib::SignalProxy< void, const Glib::ustring&, const Glib::VariantBase& > | signal_action_state_changed ()
virtual bool | has_action_vfunc (const Glib::ustring& name) const
virtual std::vector< Glib::ustring > | list_actions_vfunc () const
virtual bool | get_action_enabled_vfunc (const Glib::ustring& name) const
virtual Glib::VariantType | get_action_parameter_type_vfunc (const Glib::ustring& name) const
virtual Glib::VariantType | get_action_state_type_vfunc (const Glib::ustring& name) const
virtual Glib::VariantBase | get_action_state_hint_vfunc (const Glib::ustring& name) const
virtual Glib::VariantBase | get_action_state_vfunc (const Glib::ustring& name) const
virtual void | change_action_state_vfunc (const Glib::ustring& name, const Glib::VariantBase& value)
virtual void | activate_action_vfunc (const Glib::ustring& name, const Glib::VariantBase& parameter)
Public Member Functions inherited from Glib::Interface
| Interface ()
| A Default constructor. More...
| Interface (Interface&& src) noexcept
Interface& | operator= (Interface&& src) noexcept
| Interface (const Glib::Interface_Class& interface_class)
| Called by constructors of derived classes. More...
| Interface (GObject* castitem)
| Called by constructors of derived classes. More...
| ~Interface () noexceptoverride
| Interface (const Interface&)=delete
Interface& | operator= (const Interface&)=delete
GObject* | gobj ()
const GObject* | gobj () const
Public Member Functions inherited from Gio::ActionMap
| ActionMap (ActionMap&& src) noexcept
ActionMap& | operator= (ActionMap&& src) noexcept
| ~ActionMap () noexceptoverride
GActionMap* | gobj ()
| Provides access to the underlying C GObject. More...
const GActionMap* | gobj () const
| Provides access to the underlying C GObject. More...
void | add_action (const Glib::RefPtr< Action >& action)
| Adds an action to the action_map. More...
void | remove_action (const Glib::ustring& action_name)
| Removes the named action from the action map. More...
Glib::RefPtr< Action > | lookup_action (const Glib::ustring& action_name)
| Looks up the action with the name action_name in action_map. More...
Glib::RefPtr< const Action > | lookup_action (const Glib::ustring& action_name) const
| Looks up the action with the name action_name in action_map. More...
Glib::RefPtr< SimpleAction > | add_action (const Glib::ustring& name)
| A convenience method for creating a SimpleAction instance and adding it to the ActionMap. More...
Glib::RefPtr< SimpleAction > | add_action (const Glib::ustring& name, const ActivateSlot& slot)
| A convenience method for creating a SimpleAction instance and adding it to the ActionMap. More...
Glib::RefPtr< SimpleAction > | add_action_with_parameter (const Glib::ustring& name, const ActivateWithParameterSlot& slot)
| A convenience method for creating a SimpleAction instance and adding it to the ActionMap. More...
Glib::RefPtr< SimpleAction > | add_action_with_parameter (const Glib::ustring& name, const Glib::VariantType& parameter_type, const ActivateWithParameterSlot& slot)
| A convenience method for creating a SimpleAction instance, which when activated will call a slot receiving a given type of parameter, and adding that SimpleAction to the ActionMap. More...
Glib::RefPtr< SimpleAction > | add_action_bool (const Glib::ustring& name, bool state=false)
| A convenience method for creating a boolean-stateful SimpleAction instance and adding it to the ActionMap. More...
Glib::RefPtr< SimpleAction > | add_action_bool (const Glib::ustring& name, const ActivateSlot& slot, bool state=false)
| A convenience method for creating a boolean-stateful (toggle) SimpleAction instance and adding it to the ActionMap. More...
Glib::RefPtr< SimpleAction > | add_action_radio_string (const Glib::ustring& name, const Glib::ustring& state)
| A convenience method for creating a string-based radio SimpleAction instance and adding it to the ActionMap. More...
Glib::RefPtr< SimpleAction > | add_action_radio_string (const Glib::ustring& name, const ActivateWithStringParameterSlot& slot, const Glib::ustring& state)
| A convenience method for creating a string-based radio SimpleAction instance and adding it to the ActionMap. More...
Glib::RefPtr< SimpleAction > | add_action_radio_integer (const Glib::ustring& name, gint32 state)
| A convenience method for creating an integer-based radio SimpleAction instance and adding it to the ActionMap. More...
Glib::RefPtr< SimpleAction > | add_action_radio_integer (const Glib::ustring& name, const ActivateWithIntParameterSlot& slot, gint32 state)
| A convenience method for creating an integer-based radio SimpleAction instance and adding it to the ActionMap. More...
virtual Glib::RefPtr< Action > | lookup_action_vfunc (const Glib::ustring& name) const
virtual void | add_action_vfunc (Glib::RefPtr< Action > action) const
virtual void | remove_action_vfunc (const Glib::ustring& name)

## Static Public Member Functions
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...
static Glib::RefPtr< SimpleActionGroup > | create ()
| Creates a new, empty, SimpleActionGroup. More...
Static Public Member Functions inherited from Gio::ActionGroup
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. More...
Static Public Member Functions inherited from Gio::ActionMap
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. More...

## Protected Member Functions
| SimpleActionGroup ()
Protected Member Functions inherited from Glib::Object
| Object ()
| Object (const Glib::ConstructParams& construct_params)
| Object (GObject* castitem)
| ~Object () noexceptoverride
Protected Member Functions inherited from Glib::ObjectBase
| ObjectBase ()
| This default constructor is called implicitly from the constructor of user-derived classes, even if, for instance, Gtk::Button calls a different ObjectBase constructor. More...
| ObjectBase (const char* custom_type_name)
| A derived constructor always overrides this choice. More...
| ObjectBase (const std::type_info& custom_type_info)
| This constructor is a special feature to allow creation of derived types on the fly, without having to use g_object_new() manually. More...
| 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 Gio::ActionGroup
| ActionGroup ()
| You should derive from this class to use it. More...
virtual void | on_action_added (const Glib::ustring& action_name)
| This is a default handler for the signal signal_action_added(). More...
virtual void | on_action_enabled_changed (const Glib::ustring& action_name, bool enabled)
| This is a default handler for the signal signal_action_enabled_changed(). More...
virtual void | on_action_removed (const Glib::ustring& action_name)
| This is a default handler for the signal signal_action_removed(). More...
virtual void | on_action_state_changed (const Glib::ustring& action_name, const Glib::VariantBase& value)
| This is a default handler for the signal signal_action_state_changed(). More...
Protected Member Functions inherited from Gio::ActionMap
| ActionMap ()
| You should derive from this class to use it. More...

## Related Functions
(Note that these are not member functions.)
Glib::RefPtr< Gio::SimpleActionGroup > | wrap (GSimpleActionGroup* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...
Related Functions inherited from Glib::Object
Glib::RefPtr< Glib::Object > | wrap (GObject* object, bool take_copy=false)
Related Functions inherited from Gio::ActionGroup
Glib::RefPtr< Gio::ActionGroup > | wrap (GActionGroup* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...
Related Functions inherited from Gio::ActionMap
Glib::RefPtr< Gio::ActionMap > | wrap (GActionMap* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...

## Additional Inherited Members
Public Types inherited from Glib::Object
using | DestroyNotify = void(*)(gpointer data)
Public Types inherited from sigc::trackable
typedef internal::func_destroy_notify | func_destroy_notify
Public Types inherited from Gio::ActionMap
using | ActivateSlot = sigc::slot< void >
| A Slot to be called when an action has been activated, without passing a parameter to the slot. More...
using | ActivateWithParameterSlot = sigc::slot< void, const Glib::VariantBase& >
| A Slot to be called when an action has been activated, passing a parameter of a specified type. More...
using | ActivateWithStringParameterSlot = sigc::slot< void, const Glib::ustring& >
| A Slot to be called when an action has been activated. More...
using | ActivateWithIntParameterSlot = sigc::slot< void, int >
| A Slot to be called when an action has been activated. More...

## Detailed Description

SimpleActionGroup - A simple ActionGroup implementation.

SimpleActionGroup is a hash table filled with Action objects, implementing the ActionGroup interface.

Since glibmm 2.32:

## Constructor & Destructor Documentation

Gio::SimpleActionGroup::SimpleActionGroup | ( | SimpleActionGroup&& | src | ) |
| noexcept

Gio::SimpleActionGroup::~SimpleActionGroup | ( |  | ) |
| override noexcept

Gio::SimpleActionGroup::SimpleActionGroup | ( |  | ) |
| protected

## Member Function Documentation

static Glib::RefPtr<SimpleActionGroup> Gio::SimpleActionGroup::create | ( |  | ) |
| static

Creates a new, empty, SimpleActionGroup.

Since glibmm 2.28:

Returns
  A new SimpleActionGroup.

static GType Gio::SimpleActionGroup::get_type | ( |  | ) |
| static

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

GSimpleActionGroup* Gio::SimpleActionGroup::gobj | ( |  | ) |
| inline

Provides access to the underlying C GObject.

const GSimpleActionGroup* Gio::SimpleActionGroup::gobj | ( |  | ) | const
| inline

Provides access to the underlying C GObject.

GSimpleActionGroup* Gio::SimpleActionGroup::gobj_copy | ( |  | ) |

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

void Gio::SimpleActionGroup::insert | ( | const Glib::RefPtr< Action >& | action | ) |

Adds an action to the action group.

If the action group already contains an action with the same name as action then the old action is dropped from the group.

The action group takes its own reference on action.

Since glibmm 2.28:

Deprecated: 2.38: Use g_action_map_add_action()

Deprecated:
  Use ActionMap::add_action() instead

Parameters

  action | A Action.

Glib::RefPtr<Action> Gio::SimpleActionGroup::lookup | ( | const Glib::ustring& | action_name | ) |

Looks up the action with the name action_name in the group.

If no such action exists, returns `nullptr`.

Since glibmm 2.28:

Deprecated: 2.38: Use g_action_map_lookup_action()

Deprecated:
  Use ActionMap::lookup_action() instead

Parameters

  action_name | The name of an action.

Returns
  A Action, or `nullptr`.

Glib::RefPtr<const Action> Gio::SimpleActionGroup::lookup | ( | const Glib::ustring& | action_name | ) | const

Looks up the action with the name action_name in the group.

If no such action exists, returns `nullptr`.

Since glibmm 2.28:

Deprecated: 2.38: Use g_action_map_lookup_action()

Deprecated:
  Use ActionMap::lookup_action() instead

Parameters

  action_name | The name of an action.

Returns
  A Action, or `nullptr`.

SimpleActionGroup& Gio::SimpleActionGroup::operator= | ( | SimpleActionGroup&& | src | ) |
| noexcept

void Gio::SimpleActionGroup::remove | ( | const Glib::ustring& | action_name | ) |

Removes the named action from the action group.

If no action of this name is in the group then nothing happens.

Since glibmm 2.28:

Deprecated: 2.38: Use g_action_map_remove_action()

Deprecated:
  Use ActionMap::remove_action() instead

Parameters

  action_name | The name of the action.

## Friends And Related Function Documentation

Glib::RefPtr< Gio::SimpleActionGroup > wrap | ( | GSimpleActionGroup * | 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.