glibmm  2.36.1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions | List of all members
Gio::ActionMap Class Reference

ActionMap - Interface for action containers. More...

#include <giomm/actionmap.h>

Inheritance diagram for Gio::ActionMap:
Inheritance graph
[legend]

Public Member Functions

virtual ~ActionMap ()
GActionMap* gobj ()
 Provides access to the underlying C GObject.
const GActionMap* gobj () const
 Provides access to the underlying C GObject.
Glib::RefPtr< Actionlookup_action (const Glib::ustring& action_name)
 Looks up the action with the name action_name in action_map.
Glib::RefPtr< const Actionlookup_action (const Glib::ustring& action_name) const
 Looks up the action with the name action_name in action_map.
void add_action (const Glib::RefPtr< Action >& action)
 Adds an action to the action_map.
void remove_action (const Glib::ustring& action_name)
 Removes the named action from the action map.
virtual Glib::RefPtr< Actionlookup_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)
- Public Member Functions inherited from Glib::Interface
 Interface (const Glib::Interface_Class& interface_class)
 Called by constructors of derived classes.
 Interface (GObject* castitem)
 Called by constructors of derived classes.
virtual ~Interface ()
- Public Member Functions inherited from Glib::ObjectBase
void set_property_value (const Glib::ustring& property_name, const Glib::ValueBase&value)
 You probably want to use a specific property_*() accessor method instead.
void get_property_value (const Glib::ustring& property_name, Glib::ValueBase&value) const
 You probably want to use a specific property_*() accessor method instead.
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.
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.
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, but this is necessary when using the reduced API.
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, but this is necessary when using the reduced API.
void freeze_notify ()
 Increases the freeze count on object.
void thaw_notify ()
 Reverts the effect of a previous call to freeze_notify().
virtual void reference () const
 Increment the reference count for this object.
virtual void unreference () const
 Decrement the reference count for this object.
GObject* gobj_copy () const
 Give a ref-ed copy to someone. Use for direct struct access.
- Public Member Functions inherited from sigc::trackable
 trackable ()
 trackable (const trackable &src)
 ~trackable ()
void add_destroy_notify_callback (void *data, func_destroy_notify func) const
void notify_callbacks ()
trackableoperator= (const trackable &src)
void remove_destroy_notify_callback (void *data) 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

 ActionMap ()
 You should derive from this class to use it.

Related Functions

(Note that these are not member functions.)

Glib::RefPtr< Gio::ActionMapwrap (GActionMap* object, bool take_copy=false)
 A Glib::wrap() method for this object.

Additional Inherited Members

- Public Types inherited from sigc::trackable
typedef
internal::func_destroy_notify 
func_destroy_notify

Detailed Description

ActionMap - Interface for action containers.

The ActionMap interface is implemented by ActionGroup implementations that operate by containing a number of named Action instances, such as SimpleActionGroup.

One useful application of this interface is to map the names of actions from various action groups to unique, prefixed names (e.g. by prepending "app." or "win."). This is the motivation for the 'Map' part of the interface name.

Since glibmm 2.32:

Constructor & Destructor Documentation

Gio::ActionMap::ActionMap ( )
protected

You should derive from this class to use it.

virtual Gio::ActionMap::~ActionMap ( )
virtual

Member Function Documentation

void Gio::ActionMap::add_action ( const Glib::RefPtr< Action >&  action)

Adds an action to the action_map.

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

The action map takes its own reference on action.

Since glibmm 2.32:
Parameters
actionA Action.
virtual void Gio::ActionMap::add_action_vfunc ( Glib::RefPtr< Action action) const
virtual
static void Gio::ActionMap::add_interface ( GType  gtype_implementer)
static
static GType Gio::ActionMap::get_type ( )
static

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

Reimplemented in Gio::Application, and Gio::SimpleActionGroup.

GActionMap* Gio::ActionMap::gobj ( )
inline

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

Reimplemented in Gio::Application, and Gio::SimpleActionGroup.

const GActionMap* Gio::ActionMap::gobj ( ) const
inline

Provides access to the underlying C GObject.

Reimplemented from Glib::Interface.

Reimplemented in Gio::Application, and Gio::SimpleActionGroup.

Glib::RefPtr<Action> Gio::ActionMap::lookup_action ( const Glib::ustring action_name)

Looks up the action with the name action_name in action_map.

If no such action exists, returns 0.

Since glibmm 2.32:
Parameters
action_nameThe name of an action.
Returns
A Action, or 0.
Glib::RefPtr<const Action> Gio::ActionMap::lookup_action ( const Glib::ustring action_name) const

Looks up the action with the name action_name in action_map.

If no such action exists, returns 0.

Since glibmm 2.32:
Parameters
action_nameThe name of an action.
Returns
A Action, or 0.
virtual Glib::RefPtr<Action> Gio::ActionMap::lookup_action_vfunc ( const Glib::ustring name) const
virtual
void Gio::ActionMap::remove_action ( const Glib::ustring action_name)

Removes the named action from the action map.

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

Since glibmm 2.32:
Parameters
action_nameThe name of the action.
virtual void Gio::ActionMap::remove_action_vfunc ( const Glib::ustring name)
virtual

Friends And Related Function Documentation

Glib::RefPtr< Gio::ActionMap > wrap ( GActionMap *  object,
bool  take_copy = false 
)
related

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

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