Creates a new #GtkAction object. To add the action to a #GtkActionGroup and set the accelerator for the action, call gtk.action_group.ActionGroup.addActionWithAccel. See the [UI Definition section][XML-UI] for information on allowed action names.
Emits the “activate” signal on the specified action, if it isn't insensitive. This gets called by the proxy widgets when they get activated.
Disable activation signals from the action
Installs the accelerator for action if action has an accel path and group. See gtk.action.Action.setAccelPath and gtk.action.Action.setAccelGroup
Connect to Activate signal.
This function is intended for use by action implementations to create icons displayed in the proxy widgets.
If action provides a #GtkMenu widget as a submenu for the menu item or the toolbar item it creates, this function returns an instance of that menu.
Creates a menu item widget that proxies for the given action.
Creates a toolbar item widget that proxies for the given action.
Undoes the effect of one call to gtk.action.Action.connectAccelerator.
Returns the accel closure for this action.
Returns the accel path for this action.
Returns whether action's menu item proxies will always show their image, if available.
Gets the gicon of action.
Gets the icon name of action.
Checks whether action is important or not
Gets the label text of action.
Returns the name of the action.
Returns the proxy widgets for an action. See also gtk.activatable.Activatable.getRelatedAction.
Returns whether the action itself is sensitive. Note that this doesn’t necessarily mean effective sensitivity. See gtk.action.Action.isSensitive for that.
Gets the short label text of action.
Gets the stock id of action.
Gets the tooltip text of action.
Returns whether the action itself is visible. Note that this doesn’t necessarily mean effective visibility. See gtk.action.Action.isSensitive for that.
Checks whether action is visible when horizontal
Checks whether action is visible when horizontal
Returns whether the action is effectively sensitive.
Returns whether the action is effectively visible.
Returns this, for use in with statements.
Sets the #GtkAccelGroup in which the accelerator for this action will be installed.
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.
Sets whether action's menu item proxies will ignore the #GtkSettings:gtk-menu-images setting and always show their image, if available.
Sets the icon of action.
Sets the icon name on action
Sets whether the action is important, this attribute is used primarily by toolbar items to decide whether to show a label or not.
Sets the label of action.
Sets the :sensitive property of the action to sensitive. Note that this doesn’t necessarily mean effective sensitivity. See gtk.action.Action.isSensitive
for that.
Sets a shorter label text on action.
Sets the stock id on action
Sets the tooltip text on action
Sets the :visible property of the action to visible. Note that this doesn’t necessarily mean effective visibility. See gtk.action.Action.isVisible
for that.
Sets whether action is visible when horizontal
Sets whether action is visible when vertical
Reenable activation signals from the action
Get actionGroup property.
Set actionGroup property.
Get alwaysShowImage property.
Set alwaysShowImage property.
Get gicon property.
Set gicon property.
Get hideIfEmpty property.
Set hideIfEmpty property.
Get iconName property.
Set iconName property.
Get isImportant property.
Set isImportant property.
Get label property.
Set label property.
Get name property.
Get sensitive property.
Set sensitive property.
Get shortLabel property.
Set shortLabel property.
Get stockId property.
Set stockId property.
Get tooltip property.
Set tooltip property.
Get visible property.
Set visible property.
Get visibleHorizontal property.
Set visibleHorizontal property.
Get visibleOverflown property.
Set visibleOverflown property.
Get visibleVertical property.
Set visibleVertical property.
Get builder for gtk.action.Action
Adds a child to buildable. type is an optional string describing how the child should be added.
Constructs a child of buildable with the name name.
This is similar to gtk.buildable.Buildable.parserFinished but is called once for each custom tag handled by the buildable.
This is called for each unknown element under <child>.
Get the internal child called childname of the buildable object.
Gets the name of the buildable object.
Called when the builder finishes the parsing of a [GtkBuilder UI definition][BUILDER-UI]. Note that this will be called once for each time gtk.builder.Builder.addFromFile or gtk.builder.Builder.addFromString is called on a builder.
Sets the property name name to value on the buildable object.
Sets the name of the buildable object.
Set the GObject of a D ObjectWrap wrapper.
Get a pointer to the underlying C object.
Calls g_object_ref() on a GObject.
Calls g_object_unref() on a GObject.
Get the GType of an object.
GObject GType property.
Convenience method to return this cast to a type. For use in D with statements.
Template to get the D object from a C GObject and cast it to the given D object type.
Connect a D closure to an object signal.
Template for setting a GObject property.
Template for getting a GObject property.
Creates a binding between source_property on source and target_property on target.
Creates a binding between source_property on source and target_property on target, allowing you to set the transformation functions to be used by the binding.
This function is intended for #GObject implementations to re-enforce a floating[floating-ref] object reference. Doing this is seldom required: all #GInitiallyUnowneds are created with a floating reference which usually just needs to be sunken by calling gobject.object.ObjectWrap.refSink.
Increases the freeze count on object. If the freeze count is non-zero, the emission of "notify" signals on object is stopped. The signals are queued until the freeze count is decreased to zero. Duplicate notifications are squashed so that at most one #GObject::notify signal is emitted for each property modified while the object is frozen.
Gets a named field from the objects table of associations (see gobject.object.ObjectWrap.setData).
Gets a property of an object.
This function gets back user data pointers stored via gobject.object.ObjectWrap.setQdata.
Gets n_properties properties for an object. Obtained properties will be set to values. All properties must be valid. Warnings will be emitted and undefined behaviour may result if invalid properties are passed in.
Checks whether object has a floating[floating-ref] reference.
Emits a "notify" signal for the property property_name on object.
Emits a "notify" signal for the property specified by pspec on object.
Increase the reference count of object, and possibly remove the floating[floating-ref] reference, if object has a floating reference.
Releases all references to other objects. This can be used to break reference cycles.
Each object carries around a table of associations from strings to pointers. This function lets you set an association.
Sets a property on an object.
Remove a specified datum from the object's data associations, without invoking the association's destroy handler.
This function gets back user data pointers stored via gobject.object.ObjectWrap.setQdata and removes the data from object without invoking its destroy() function (if any was set). Usually, calling this function is only required to update user data pointers with a destroy notifier, for example:
Reverts the effect of a previous call to gobject.object.ObjectWrap.freezeNotify. The freeze count is decreased on object and when it reaches zero, queued "notify" signals are emitted.
This function essentially limits the life time of the closure to the life time of the object. That is, when the object is finalized, the closure is invalidated by calling gobject.closure.Closure.invalidate on it, in order to prevent invocations of the closure with a finalized (nonexisting) object. Also, gobject.object.ObjectWrap.ref_ and gobject.object.ObjectWrap.unref are added as marshal guards to the closure, to ensure that an extra reference count is held on object during invocation of the closure. Usually, this function will be called on closures that use this object as closure data.
Connect to Notify signal.
Adds a child to buildable. type is an optional string describing how the child should be added.
Constructs a child of buildable with the name name.
This is similar to gtk.buildable.Buildable.parserFinished but is called once for each custom tag handled by the buildable.
This is called for each unknown element under <child>.
Get the internal child called childname of the buildable object.
Gets the name of the buildable object.
Called when the builder finishes the parsing of a [GtkBuilder UI definition][BUILDER-UI]. Note that this will be called once for each time gtk.builder.Builder.addFromFile or gtk.builder.Builder.addFromString is called on a builder.
Sets the property name name to value on the buildable object.
Sets the name of the buildable object.
The action will also have some state information:
Apart from regular actions, there are [toggle actions]GtkToggleAction, which can be toggled between two states and [radio actions]GtkRadioAction, of which only one in a group can be in the “active” state. Other actions can be implemented as #GtkAction subclasses.
Each action can have one or more proxy widgets. To act as an action proxy, widget needs to implement #GtkActivatable interface. Proxies mirror the state of the action and should change when the action’s state changes. Properties that are always mirrored by proxies are #GtkAction:sensitive and #GtkAction:visible. #GtkAction:gicon, #GtkAction:icon-name, #GtkAction:label, #GtkAction:short-label and #GtkAction:stock-id properties are only mirorred if proxy widget has #GtkActivatable:use-action-appearance property set to true.
When the proxy is activated, it should activate its action.
> In GTK+ 3.10, GtkAction has been deprecated. Use #GAction > instead, and associate actions with #GtkActionable widgets. Use > #GMenuModel for creating menus with gtk.menu.Menu.newFromModel.
Actions represent operations that the user can be perform, along with some information how it should be presented in the 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 gets activated, the following also gets associated with the action: