Action


Object Hierarchy:

Object hierarchy for Action

Description:

[ Version ( deprecated = true , deprecated_since = "3.10" , replacement = "GLib.Action" ) ]
public class Action : Object, Buildable

Warning: Action is deprecated since "3.10". Use GLib.Action.

Note:

In GTK+ 3.10, GtkAction has been deprecated. Use Action instead, and associate actions with Actionable widgets. Use MenuModel for creating menus with Menu.from_model.

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:

  • a name (not translated, for path lookup)
  • a label (translated, for display)
  • an accelerator
  • whether label indicates a stock id
  • a tooltip (optional, translated)
  • a toolbar label (optional, shorter than label)

The action will also have some state information:

  • visible (shown/hidden)
  • sensitive (enabled/disabled)

Apart from regular actions, there are toggle actions, which can be toggled between two states and radio actions, of which only one in a group can be in the “active” state. Other actions can be implemented as Action subclasses.

Each action can have one or more proxy widgets. To act as an action proxy, widget needs to implement Activatable 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 sensitive and visible. gicon, icon_name, label , short_label and stock_id properties are only mirorred if proxy widget has use_action_appearance property set to true.

When the proxy is activated, it should activate its action.

All known sub-classes:

Namespace: Gtk
Package: gtk+-3.0

Content:

Properties:

Creation methods:

Methods:

Signals:

Inherited Members: