gi-gtk-3.0.37: Gtk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Objects.Action

Description

In GTK+ 3.10, GtkAction has been deprecated. Use t'GI.Gio.Interfaces.Action.Action'
instead, and associate actions with t'GI.Gtk.Interfaces.Actionable.Actionable' widgets. Use
t'GI.Gio.Objects.MenuModel.MenuModel' for creating menus with 'GI.Gtk.Objects.Menu.menuNewFromModel'.

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][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 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 Action:sensitive and Action:visible. Action:gicon, Action:icon-name, Action:label, Action:short-label and Action:stock-id properties are only mirorred if proxy widget has Activatable:use-action-appearance property set to True.

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

Synopsis

Exported types

newtype Action Source #

Memory-managed wrapper type.

Constructors

Action (ManagedPtr Action) 

Instances

Instances details
Eq Action Source # 
Instance details

Defined in GI.Gtk.Objects.Action

Methods

(==) :: Action -> Action -> Bool #

(/=) :: Action -> Action -> Bool #

GObject Action Source # 
Instance details

Defined in GI.Gtk.Objects.Action

ManagedPtrNewtype Action Source # 
Instance details

Defined in GI.Gtk.Objects.Action

Methods

toManagedPtr :: Action -> ManagedPtr Action

TypedObject Action Source # 
Instance details

Defined in GI.Gtk.Objects.Action

Methods

glibType :: IO GType

HasParentTypes Action Source # 
Instance details

Defined in GI.Gtk.Objects.Action

IsGValue (Maybe Action) Source #

Convert Action to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.Action

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Action -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Action)

type ParentTypes Action Source # 
Instance details

Defined in GI.Gtk.Objects.Action

type ParentTypes Action = '[Object, Buildable]

class (GObject o, IsDescendantOf Action o) => IsAction o Source #

Type class for types which can be safely cast to Action, for instance with toAction.

Instances

Instances details
(GObject o, IsDescendantOf Action o) => IsAction o Source # 
Instance details

Defined in GI.Gtk.Objects.Action

toAction :: (MonadIO m, IsAction o) => o -> m Action Source #

Cast to Action, for types for which this is known to be safe. For general casts, use castTo.

Methods

activate

actionActivate Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: the action object

-> m () 

Deprecated: (Since version 3.10)Use actionGroupActivateAction on a Action instead

Emits the “activate” signal on the specified action, if it isn't insensitive. This gets called by the proxy widgets when they get activated.

It can also be used to manually activate an action.

Since: 2.4

blockActivate

actionBlockActivate Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: a Action

-> m () 

Deprecated: (Since version 3.10)Use simpleActionSetEnabled to disable thetSimpleAction instead

Disable activation signals from the action

This is needed when updating the state of your proxy Activatable widget could result in calling actionActivate, this is a convenience function to avoid recursing in those cases (updating toggle state for instance).

Since: 2.16

connectAccelerator

actionConnectAccelerator Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: a Action

-> m () 

Deprecated: (Since version 3.10)Use Action and the accelerator group on an associatedtMenu instead

Installs the accelerator for action if action has an accel path and group. See actionSetAccelPath and actionSetAccelGroup

Since multiple proxies may independently trigger the installation of the accelerator, the action counts the number of times this function has been called and doesn’t remove the accelerator until actionDisconnectAccelerator has been called as many times.

Since: 2.4

createIcon

actionCreateIcon Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: the action object

-> Int32

iconSize: the size of the icon (tIconSize) that should be created.

-> m Widget

Returns: a widget that displays the icon for this action.

Deprecated: (Since version 3.10)Use menuItemSetIcon to set an icon on a MenuItem,or containerAdd to add a Image to a Button

This function is intended for use by action implementations to create icons displayed in the proxy widgets.

Since: 2.4

createMenu

actionCreateMenu Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: a Action

-> m Widget

Returns: the menu item provided by the action, or Nothing.

Deprecated: (Since version 3.10)Use Action and MenuModel instead, and create atMenu with menuNewFromModel

If action provides a Menu widget as a submenu for the menu item or the toolbar item it creates, this function returns an instance of that menu.

Since: 2.12

createMenuItem

actionCreateMenuItem Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: the action object

-> m Widget

Returns: a menu item connected to the action.

Deprecated: (Since version 3.10)Use menuItemNew and associate it with a Actioninstead.

Creates a menu item widget that proxies for the given action.

Since: 2.4

createToolItem

actionCreateToolItem Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: the action object

-> m Widget

Returns: a toolbar item connected to the action.

Deprecated: (Since version 3.10)Use a ToolItem and associate it with a Action usingactionableSetActionName instead

Creates a toolbar item widget that proxies for the given action.

Since: 2.4

disconnectAccelerator

actionDisconnectAccelerator Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: a Action

-> m () 

Deprecated: (Since version 3.10)Use Action and the accelerator group on an associatedtMenu instead

Undoes the effect of one call to actionConnectAccelerator.

Since: 2.4

getAccelClosure

actionGetAccelClosure Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: the action object

-> m (GClosure b)

Returns: the accel closure for this action. The returned closure is owned by GTK+ and must not be unreffed or modified.

Deprecated: (Since version 3.10)Use Action and Menu instead, which have noequivalent for getting the accel closure

Returns the accel closure for this action.

Since: 2.8

getAccelPath

actionGetAccelPath Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: the action object

-> m Text

Returns: the accel path for this action, or Nothing if none is set. The returned string is owned by GTK+ and must not be freed or modified.

Deprecated: (Since version 3.10)Use Action and the accelerator path on an associatedtMenu instead

Returns the accel path for this action.

Since: 2.6

getAlwaysShowImage

actionGetAlwaysShowImage Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: a Action

-> m Bool

Returns: True if the menu item proxies will always show their image

Deprecated: (Since version 3.10)Use menuItemGetAttributeValue on a MenuIteminstead

Returns whether action's menu item proxies will always show their image, if available.

Since: 2.20

getGicon

actionGetGicon Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: a Action

-> m Icon

Returns: The action’s Icon if one is set.

Deprecated: (Since version 3.10)Use Action instead, andmenuItemGetAttributeValue to get an icon from a MenuItemassociated with a Action

Gets the gicon of action.

Since: 2.16

getIconName

actionGetIconName Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: a Action

-> m Text

Returns: the icon name

Deprecated: (Since version 3.10)Use Action instead, andmenuItemGetAttributeValue to get an icon from a MenuItemassociated with a Action

Gets the icon name of action.

Since: 2.16

getIsImportant

actionGetIsImportant Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: a Action

-> m Bool

Returns: whether action is important

Deprecated: (Since version 3.10)Use Action instead, and control and monitor whetherlabels are shown directly

Checks whether action is important or not

Since: 2.16

getLabel

actionGetLabel Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: a Action

-> m Text

Returns: the label text

Deprecated: (Since version 3.10)Use Action instead, and get a label from a menu itemwith menuItemGetAttributeValue. For Actionable widgets, use thewidget-specific API to get a label

Gets the label text of action.

Since: 2.16

getName

actionGetName Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: the action object

-> m Text

Returns: the name of the action. The string belongs to GTK+ and should not be freed.

Deprecated: (Since version 3.10)Use actionGetName on a Action instead

Returns the name of the action.

Since: 2.4

getProxies

actionGetProxies Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: the action object

-> m [Widget]

Returns: a SList of proxy widgets. The list is owned by GTK+ and must not be modified.

Deprecated: (Since version 3.10)

Returns the proxy widgets for an action. See also activatableGetRelatedAction.

Since: 2.4

getSensitive

actionGetSensitive Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: the action object

-> m Bool

Returns: True if the action itself is sensitive.

Deprecated: (Since version 3.10)Use actionGetEnabled on a Actioninstead

Returns whether the action itself is sensitive. Note that this doesn’t necessarily mean effective sensitivity. See actionIsSensitive for that.

Since: 2.4

getShortLabel

actionGetShortLabel Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: a Action

-> m Text

Returns: the short label text.

Deprecated: (Since version 3.10)Use Action instead, which has no equivalent of shortlabels

Gets the short label text of action.

Since: 2.16

getStockId

actionGetStockId Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: a Action

-> m Text

Returns: the stock id

Deprecated: (Since version 3.10)Use Action instead, which has no equivalent of stockitems

Gets the stock id of action.

Since: 2.16

getTooltip

actionGetTooltip Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: a Action

-> m Text

Returns: the tooltip text

Deprecated: (Since version 3.10)Use Action instead, and get tooltips from associatedtActionable widgets with widgetGetTooltipText

Gets the tooltip text of action.

Since: 2.16

getVisible

actionGetVisible Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: the action object

-> m Bool

Returns: True if the action itself is visible.

Deprecated: (Since version 3.10)Use Action instead, and control and monitor the state oftActionable widgets directly

Returns whether the action itself is visible. Note that this doesn’t necessarily mean effective visibility. See actionIsSensitive for that.

Since: 2.4

getVisibleHorizontal

actionGetVisibleHorizontal Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: a Action

-> m Bool

Returns: whether action is visible when horizontal

Deprecated: (Since version 3.10)Use Action instead, and control and monitor thevisibility of associated widgets and menu items directly

Checks whether action is visible when horizontal

Since: 2.16

getVisibleVertical

actionGetVisibleVertical Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: a Action

-> m Bool

Returns: whether action is visible when horizontal

Deprecated: (Since version 3.10)Use Action instead, and control and monitor thevisibility of associated widgets and menu items directly

Checks whether action is visible when horizontal

Since: 2.16

isSensitive

actionIsSensitive Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: the action object

-> m Bool

Returns: True if the action and its associated action group are both sensitive.

Deprecated: (Since version 3.10)Use actionGetEnabled on a Actioninstead

Returns whether the action is effectively sensitive.

Since: 2.4

isVisible

actionIsVisible Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: the action object

-> m Bool

Returns: True if the action and its associated action group are both visible.

Deprecated: (Since version 3.10)Use Action instead, and control and monitor the state oftActionable widgets directly

Returns whether the action is effectively visible.

Since: 2.4

new

actionNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: A unique name for the action

-> Maybe Text

label: the label displayed in menu items and on buttons, or Nothing

-> Maybe Text

tooltip: a tooltip for the action, or Nothing

-> Maybe Text

stockId: the stock icon to display in widgets representing the action, or Nothing

-> m Action

Returns: a new Action

Deprecated: (Since version 3.10)Use Action instead, associating it to a widget withtActionable or creating a Menu with menuNewFromModel

Creates a new Action object. To add the action to a ActionGroup and set the accelerator for the action, call actionGroupAddActionWithAccel. See the [UI Definition section][XML-UI] for information on allowed action names.

Since: 2.4

setAccelGroup

actionSetAccelGroup Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a, IsAccelGroup b) 
=> a

action: the action object

-> Maybe b

accelGroup: a AccelGroup or Nothing

-> m () 

Deprecated: (Since version 3.10)Use Action and the accelerator group on an associatedtMenu instead

Sets the AccelGroup in which the accelerator for this action will be installed.

Since: 2.4

setAccelPath

actionSetAccelPath Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: the action object

-> Text

accelPath: the accelerator path

-> m () 

Deprecated: (Since version 3.10)Use Action and the accelerator path on an associatedtMenu instead

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.

Note that accelPath string will be stored in a GQuark. Therefore, if you pass a static string, you can save some memory by interning it first with internStaticString.

Since: 2.4

setAlwaysShowImage

actionSetAlwaysShowImage Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: a Action

-> Bool

alwaysShow: True if menuitem proxies should always show their image

-> m () 

Deprecated: (Since version 3.10)Use menuItemSetIcon on a MenuItem instead, if theitem should have an image

Sets whether action's menu item proxies will ignore the Settings:gtk-menu-images setting and always show their image, if available.

Use this if the menu item would be useless or hard to use without their image.

Since: 2.20

setGicon

actionSetGicon Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a, IsIcon b) 
=> a

action: a Action

-> b

icon: the Icon to set

-> m () 

Deprecated: (Since version 3.10)Use Action instead, and menuItemSetIcon to set anicon on a MenuItem associated with a Action, or containerAdd toadd a Image to a Button

Sets the icon of action.

Since: 2.16

setIconName

actionSetIconName Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: a Action

-> Text

iconName: the icon name to set

-> m () 

Deprecated: (Since version 3.10)Use Action instead, and menuItemSetIcon to set anicon on a MenuItem associated with a Action, or containerAdd toadd a Image to a Button

Sets the icon name on action

Since: 2.16

setIsImportant

actionSetIsImportant Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: the action object

-> Bool

isImportant: True to make the action important

-> m () 

Deprecated: (Since version 3.10)Use Action instead, and control and monitor whetherlabels are shown directly

Sets whether the action is important, this attribute is used primarily by toolbar items to decide whether to show a label or not.

Since: 2.16

setLabel

actionSetLabel Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: a Action

-> Text

label: the label text to set

-> m () 

Deprecated: (Since version 3.10)Use Action instead, and set a label on a menu item withmenuItemSetLabel. For Actionable widgets, use the widget-specificAPI to set a label

Sets the label of action.

Since: 2.16

setSensitive

actionSetSensitive Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: the action object

-> Bool

sensitive: True to make the action sensitive

-> m () 

Deprecated: (Since version 3.10)Use simpleActionSetEnabled on a SimpleActioninstead

Sets the :sensitive property of the action to sensitive. Note that this doesn’t necessarily mean effective sensitivity. See actionIsSensitive for that.

Since: 2.6

setShortLabel

actionSetShortLabel Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: a Action

-> Text

shortLabel: the label text to set

-> m () 

Deprecated: (Since version 3.10)Use Action instead, which has no equivalent of shortlabels

Sets a shorter label text on action.

Since: 2.16

setStockId

actionSetStockId Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: a Action

-> Text

stockId: the stock id

-> m () 

Deprecated: (Since version 3.10)Use Action instead, which has no equivalent of stockitems

Sets the stock id on action

Since: 2.16

setTooltip

actionSetTooltip Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: a Action

-> Text

tooltip: the tooltip text

-> m () 

Deprecated: (Since version 3.10)Use Action instead, and set tooltips on associatedtActionable widgets with widgetSetTooltipText

Sets the tooltip text on action

Since: 2.16

setVisible

actionSetVisible Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: the action object

-> Bool

visible: True to make the action visible

-> m () 

Deprecated: (Since version 3.10)Use Action instead, and control and monitor the state oftActionable widgets directly

Sets the :visible property of the action to visible. Note that this doesn’t necessarily mean effective visibility. See actionIsVisible for that.

Since: 2.6

setVisibleHorizontal

actionSetVisibleHorizontal Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: a Action

-> Bool

visibleHorizontal: whether the action is visible horizontally

-> m () 

Deprecated: (Since version 3.10)Use Action instead, and control and monitor thevisibility of associated widgets and menu items directly

Sets whether action is visible when horizontal

Since: 2.16

setVisibleVertical

actionSetVisibleVertical Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: a Action

-> Bool

visibleVertical: whether the action is visible vertically

-> m () 

Deprecated: (Since version 3.10)Use Action instead, and control and monitor thevisibility of associated widgets and menu items directly

Sets whether action is visible when vertical

Since: 2.16

unblockActivate

actionUnblockActivate Source #

Arguments

:: (HasCallStack, MonadIO m, IsAction a) 
=> a

action: a Action

-> m () 

Deprecated: (Since version 3.10)Use simpleActionSetEnabled to enable thetSimpleAction instead

Reenable activation signals from the action

Since: 2.16

Properties

actionGroup

The GtkActionGroup this GtkAction is associated with, or NULL (for internal use).

clearActionActionGroup :: (MonadIO m, IsAction o) => o -> m () Source #

Set the value of the “action-group” property to Nothing. When overloading is enabled, this is equivalent to

clear #actionGroup

constructActionActionGroup :: (IsAction o, MonadIO m, IsActionGroup a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “action-group” property. This is rarely needed directly, but it is used by new.

getActionActionGroup :: (MonadIO m, IsAction o) => o -> m (Maybe ActionGroup) Source #

Get the value of the “action-group” property. When overloading is enabled, this is equivalent to

get action #actionGroup

setActionActionGroup :: (MonadIO m, IsAction o, IsActionGroup a) => o -> a -> m () Source #

Set the value of the “action-group” property. When overloading is enabled, this is equivalent to

set action [ #actionGroup := value ]

alwaysShowImage

If True, the action's menu item proxies will ignore the Settings:gtk-menu-images setting and always show their image, if available.

Use this property if the menu item would be useless or hard to use without their image.

Since: 2.20

constructActionAlwaysShowImage :: (IsAction o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “always-show-image” property. This is rarely needed directly, but it is used by new.

getActionAlwaysShowImage :: (MonadIO m, IsAction o) => o -> m Bool Source #

Get the value of the “always-show-image” property. When overloading is enabled, this is equivalent to

get action #alwaysShowImage

setActionAlwaysShowImage :: (MonadIO m, IsAction o) => o -> Bool -> m () Source #

Set the value of the “always-show-image” property. When overloading is enabled, this is equivalent to

set action [ #alwaysShowImage := value ]

gicon

The Icon displayed in the Action.

Note that the stock icon is preferred, if the Action:stock-id property holds the id of an existing stock icon.

This is an appearance property and thus only applies if Activatable:use-action-appearance is True.

Since: 2.16

constructActionGicon :: (IsAction o, MonadIO m, IsIcon a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “gicon” property. This is rarely needed directly, but it is used by new.

getActionGicon :: (MonadIO m, IsAction o) => o -> m Icon Source #

Get the value of the “gicon” property. When overloading is enabled, this is equivalent to

get action #gicon

setActionGicon :: (MonadIO m, IsAction o, IsIcon a) => o -> a -> m () Source #

Set the value of the “gicon” property. When overloading is enabled, this is equivalent to

set action [ #gicon := value ]

hideIfEmpty

When TRUE, empty menu proxies for this action are hidden.

constructActionHideIfEmpty :: (IsAction o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “hide-if-empty” property. This is rarely needed directly, but it is used by new.

getActionHideIfEmpty :: (MonadIO m, IsAction o) => o -> m Bool Source #

Get the value of the “hide-if-empty” property. When overloading is enabled, this is equivalent to

get action #hideIfEmpty

setActionHideIfEmpty :: (MonadIO m, IsAction o) => o -> Bool -> m () Source #

Set the value of the “hide-if-empty” property. When overloading is enabled, this is equivalent to

set action [ #hideIfEmpty := value ]

iconName

The name of the icon from the icon theme.

Note that the stock icon is preferred, if the Action:stock-id property holds the id of an existing stock icon, and the Icon is preferred if the Action:gicon property is set.

This is an appearance property and thus only applies if Activatable:use-action-appearance is True.

Since: 2.10

constructActionIconName :: (IsAction o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “icon-name” property. This is rarely needed directly, but it is used by new.

getActionIconName :: (MonadIO m, IsAction o) => o -> m Text Source #

Get the value of the “icon-name” property. When overloading is enabled, this is equivalent to

get action #iconName

setActionIconName :: (MonadIO m, IsAction o) => o -> Text -> m () Source #

Set the value of the “icon-name” property. When overloading is enabled, this is equivalent to

set action [ #iconName := value ]

isImportant

Whether the action is considered important. When TRUE, toolitem proxies for this action show text in GTK_TOOLBAR_BOTH_HORIZ mode.

constructActionIsImportant :: (IsAction o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “is-important” property. This is rarely needed directly, but it is used by new.

getActionIsImportant :: (MonadIO m, IsAction o) => o -> m Bool Source #

Get the value of the “is-important” property. When overloading is enabled, this is equivalent to

get action #isImportant

setActionIsImportant :: (MonadIO m, IsAction o) => o -> Bool -> m () Source #

Set the value of the “is-important” property. When overloading is enabled, this is equivalent to

set action [ #isImportant := value ]

label

The label used for menu items and buttons that activate this action. If the label is Nothing, GTK+ uses the stock label specified via the stock-id property.

This is an appearance property and thus only applies if Activatable:use-action-appearance is True.

constructActionLabel :: (IsAction o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “label” property. This is rarely needed directly, but it is used by new.

getActionLabel :: (MonadIO m, IsAction o) => o -> m Text Source #

Get the value of the “label” property. When overloading is enabled, this is equivalent to

get action #label

setActionLabel :: (MonadIO m, IsAction o) => o -> Text -> m () Source #

Set the value of the “label” property. When overloading is enabled, this is equivalent to

set action [ #label := value ]

name

A unique name for the action.

constructActionName :: (IsAction o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “name” property. This is rarely needed directly, but it is used by new.

getActionName :: (MonadIO m, IsAction o) => o -> m Text Source #

Get the value of the “name” property. When overloading is enabled, this is equivalent to

get action #name

sensitive

Whether the action is enabled.

constructActionSensitive :: (IsAction o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “sensitive” property. This is rarely needed directly, but it is used by new.

getActionSensitive :: (MonadIO m, IsAction o) => o -> m Bool Source #

Get the value of the “sensitive” property. When overloading is enabled, this is equivalent to

get action #sensitive

setActionSensitive :: (MonadIO m, IsAction o) => o -> Bool -> m () Source #

Set the value of the “sensitive” property. When overloading is enabled, this is equivalent to

set action [ #sensitive := value ]

shortLabel

A shorter label that may be used on toolbar buttons.

This is an appearance property and thus only applies if Activatable:use-action-appearance is True.

constructActionShortLabel :: (IsAction o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “short-label” property. This is rarely needed directly, but it is used by new.

getActionShortLabel :: (MonadIO m, IsAction o) => o -> m Text Source #

Get the value of the “short-label” property. When overloading is enabled, this is equivalent to

get action #shortLabel

setActionShortLabel :: (MonadIO m, IsAction o) => o -> Text -> m () Source #

Set the value of the “short-label” property. When overloading is enabled, this is equivalent to

set action [ #shortLabel := value ]

stockId

The stock icon displayed in widgets representing this action.

This is an appearance property and thus only applies if Activatable:use-action-appearance is True.

constructActionStockId :: (IsAction o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “stock-id” property. This is rarely needed directly, but it is used by new.

getActionStockId :: (MonadIO m, IsAction o) => o -> m Text Source #

Get the value of the “stock-id” property. When overloading is enabled, this is equivalent to

get action #stockId

setActionStockId :: (MonadIO m, IsAction o) => o -> Text -> m () Source #

Set the value of the “stock-id” property. When overloading is enabled, this is equivalent to

set action [ #stockId := value ]

tooltip

A tooltip for this action.

constructActionTooltip :: (IsAction o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “tooltip” property. This is rarely needed directly, but it is used by new.

getActionTooltip :: (MonadIO m, IsAction o) => o -> m Text Source #

Get the value of the “tooltip” property. When overloading is enabled, this is equivalent to

get action #tooltip

setActionTooltip :: (MonadIO m, IsAction o) => o -> Text -> m () Source #

Set the value of the “tooltip” property. When overloading is enabled, this is equivalent to

set action [ #tooltip := value ]

visible

Whether the action is visible.

constructActionVisible :: (IsAction o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “visible” property. This is rarely needed directly, but it is used by new.

getActionVisible :: (MonadIO m, IsAction o) => o -> m Bool Source #

Get the value of the “visible” property. When overloading is enabled, this is equivalent to

get action #visible

setActionVisible :: (MonadIO m, IsAction o) => o -> Bool -> m () Source #

Set the value of the “visible” property. When overloading is enabled, this is equivalent to

set action [ #visible := value ]

visibleHorizontal

Whether the toolbar item is visible when the toolbar is in a horizontal orientation.

constructActionVisibleHorizontal :: (IsAction o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “visible-horizontal” property. This is rarely needed directly, but it is used by new.

getActionVisibleHorizontal :: (MonadIO m, IsAction o) => o -> m Bool Source #

Get the value of the “visible-horizontal” property. When overloading is enabled, this is equivalent to

get action #visibleHorizontal

setActionVisibleHorizontal :: (MonadIO m, IsAction o) => o -> Bool -> m () Source #

Set the value of the “visible-horizontal” property. When overloading is enabled, this is equivalent to

set action [ #visibleHorizontal := value ]

visibleOverflown

When True, toolitem proxies for this action are represented in the toolbar overflow menu.

Since: 2.6

constructActionVisibleOverflown :: (IsAction o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “visible-overflown” property. This is rarely needed directly, but it is used by new.

getActionVisibleOverflown :: (MonadIO m, IsAction o) => o -> m Bool Source #

Get the value of the “visible-overflown” property. When overloading is enabled, this is equivalent to

get action #visibleOverflown

setActionVisibleOverflown :: (MonadIO m, IsAction o) => o -> Bool -> m () Source #

Set the value of the “visible-overflown” property. When overloading is enabled, this is equivalent to

set action [ #visibleOverflown := value ]

visibleVertical

Whether the toolbar item is visible when the toolbar is in a vertical orientation.

constructActionVisibleVertical :: (IsAction o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “visible-vertical” property. This is rarely needed directly, but it is used by new.

getActionVisibleVertical :: (MonadIO m, IsAction o) => o -> m Bool Source #

Get the value of the “visible-vertical” property. When overloading is enabled, this is equivalent to

get action #visibleVertical

setActionVisibleVertical :: (MonadIO m, IsAction o) => o -> Bool -> m () Source #

Set the value of the “visible-vertical” property. When overloading is enabled, this is equivalent to

set action [ #visibleVertical := value ]

Signals

activate

type ActionActivateCallback = IO () Source #

Deprecated: (Since version 3.10)Use activate instead

The "activate" signal is emitted when the action is activated.

Since: 2.4

type C_ActionActivateCallback = Ptr () -> Ptr () -> IO () Source #

Type for the callback on the (unwrapped) C side.

afterActionActivate :: (IsAction a, MonadIO m) => a -> ActionActivateCallback -> m SignalHandlerId Source #

Connect a signal handler for the activate signal, to be run after the default handler. When overloading is enabled, this is equivalent to

after action #activate callback

genClosure_ActionActivate :: MonadIO m => ActionActivateCallback -> m (GClosure C_ActionActivateCallback) Source #

Wrap the callback into a GClosure.

onActionActivate :: (IsAction a, MonadIO m) => a -> ActionActivateCallback -> m SignalHandlerId Source #

Connect a signal handler for the activate signal, to be run before the default handler. When overloading is enabled, this is equivalent to

on action #activate callback