gio.action_map_mixin

Module for ActionMap interface mixin

Templates 2

tmplActionMapT()

gio.action_map.ActionMap is an interface for action containers.

The gio.action_map.ActionMap interface is implemented by gio.action_group.ActionGroup implementations that operate by containing a number of named gio.action.Action instances, such as gio.simple_action_group.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.

Functions
void addAction(gio.action.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.

Parameters

actiona #GAction
gio.action.Action lookupAction(string actionName)

Looks up the action with the name action_name in action_map.

If no such action exists, returns null.

Parameters

actionNamethe name of an action

Returns

a #GAction, or null
void removeAction(string actionName)

Removes the named action from the action map.

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

Parameters

actionNamethe name of the action
tmplActionMapGidBuilderT()

Fluent builder implementation template for gio.action_map.ActionMap