Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
- Exported types
- Methods
- activate
- blockActivate
- connectAccelerator
- createIcon
- createMenu
- createMenuItem
- createToolItem
- disconnectAccelerator
- getAccelClosure
- getAccelPath
- getAlwaysShowImage
- getGicon
- getIconName
- getIsImportant
- getLabel
- getName
- getProxies
- getSensitive
- getShortLabel
- getStockId
- getTooltip
- getVisible
- getVisibleHorizontal
- getVisibleVertical
- isSensitive
- isVisible
- new
- setAccelGroup
- setAccelPath
- setAlwaysShowImage
- setGicon
- setIconName
- setIsImportant
- setLabel
- setSensitive
- setShortLabel
- setStockId
- setTooltip
- setVisible
- setVisibleHorizontal
- setVisibleVertical
- unblockActivate
- Properties
- Signals
In GTK+ 3.10, GtkAction has been deprecated. Use 'GI.Gio.Interfaces.Action.Action' instead, and associate actions with 'GI.Gtk.Interfaces.Actionable.Actionable' widgets. Use '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.
- newtype Action = Action (ManagedPtr Action)
- class GObject o => IsAction o
- toAction :: IsAction o => o -> IO Action
- noAction :: Maybe Action
- data ActionActivateMethodInfo
- actionActivate :: (HasCallStack, MonadIO m, IsAction a) => a -> m ()
- data ActionBlockActivateMethodInfo
- actionBlockActivate :: (HasCallStack, MonadIO m, IsAction a) => a -> m ()
- data ActionConnectAcceleratorMethodInfo
- actionConnectAccelerator :: (HasCallStack, MonadIO m, IsAction a) => a -> m ()
- data ActionCreateIconMethodInfo
- actionCreateIcon :: (HasCallStack, MonadIO m, IsAction a) => a -> Int32 -> m Widget
- data ActionCreateMenuMethodInfo
- actionCreateMenu :: (HasCallStack, MonadIO m, IsAction a) => a -> m Widget
- data ActionCreateMenuItemMethodInfo
- actionCreateMenuItem :: (HasCallStack, MonadIO m, IsAction a) => a -> m Widget
- data ActionCreateToolItemMethodInfo
- actionCreateToolItem :: (HasCallStack, MonadIO m, IsAction a) => a -> m Widget
- data ActionDisconnectAcceleratorMethodInfo
- actionDisconnectAccelerator :: (HasCallStack, MonadIO m, IsAction a) => a -> m ()
- data ActionGetAccelClosureMethodInfo
- actionGetAccelClosure :: (HasCallStack, MonadIO m, IsAction a) => a -> m Closure
- data ActionGetAccelPathMethodInfo
- actionGetAccelPath :: (HasCallStack, MonadIO m, IsAction a) => a -> m Text
- data ActionGetAlwaysShowImageMethodInfo
- actionGetAlwaysShowImage :: (HasCallStack, MonadIO m, IsAction a) => a -> m Bool
- data ActionGetGiconMethodInfo
- actionGetGicon :: (HasCallStack, MonadIO m, IsAction a) => a -> m Icon
- data ActionGetIconNameMethodInfo
- actionGetIconName :: (HasCallStack, MonadIO m, IsAction a) => a -> m Text
- data ActionGetIsImportantMethodInfo
- actionGetIsImportant :: (HasCallStack, MonadIO m, IsAction a) => a -> m Bool
- data ActionGetLabelMethodInfo
- actionGetLabel :: (HasCallStack, MonadIO m, IsAction a) => a -> m Text
- data ActionGetNameMethodInfo
- actionGetName :: (HasCallStack, MonadIO m, IsAction a) => a -> m Text
- data ActionGetProxiesMethodInfo
- actionGetProxies :: (HasCallStack, MonadIO m, IsAction a) => a -> m [Widget]
- data ActionGetSensitiveMethodInfo
- actionGetSensitive :: (HasCallStack, MonadIO m, IsAction a) => a -> m Bool
- data ActionGetShortLabelMethodInfo
- actionGetShortLabel :: (HasCallStack, MonadIO m, IsAction a) => a -> m Text
- data ActionGetStockIdMethodInfo
- actionGetStockId :: (HasCallStack, MonadIO m, IsAction a) => a -> m Text
- data ActionGetTooltipMethodInfo
- actionGetTooltip :: (HasCallStack, MonadIO m, IsAction a) => a -> m Text
- data ActionGetVisibleMethodInfo
- actionGetVisible :: (HasCallStack, MonadIO m, IsAction a) => a -> m Bool
- data ActionGetVisibleHorizontalMethodInfo
- actionGetVisibleHorizontal :: (HasCallStack, MonadIO m, IsAction a) => a -> m Bool
- data ActionGetVisibleVerticalMethodInfo
- actionGetVisibleVertical :: (HasCallStack, MonadIO m, IsAction a) => a -> m Bool
- data ActionIsSensitiveMethodInfo
- actionIsSensitive :: (HasCallStack, MonadIO m, IsAction a) => a -> m Bool
- data ActionIsVisibleMethodInfo
- actionIsVisible :: (HasCallStack, MonadIO m, IsAction a) => a -> m Bool
- actionNew :: (HasCallStack, MonadIO m) => Text -> Maybe Text -> Maybe Text -> Maybe Text -> m Action
- data ActionSetAccelGroupMethodInfo
- actionSetAccelGroup :: (HasCallStack, MonadIO m, IsAction a, IsAccelGroup b) => a -> Maybe b -> m ()
- data ActionSetAccelPathMethodInfo
- actionSetAccelPath :: (HasCallStack, MonadIO m, IsAction a) => a -> Text -> m ()
- data ActionSetAlwaysShowImageMethodInfo
- actionSetAlwaysShowImage :: (HasCallStack, MonadIO m, IsAction a) => a -> Bool -> m ()
- data ActionSetGiconMethodInfo
- actionSetGicon :: (HasCallStack, MonadIO m, IsAction a, IsIcon b) => a -> b -> m ()
- data ActionSetIconNameMethodInfo
- actionSetIconName :: (HasCallStack, MonadIO m, IsAction a) => a -> Text -> m ()
- data ActionSetIsImportantMethodInfo
- actionSetIsImportant :: (HasCallStack, MonadIO m, IsAction a) => a -> Bool -> m ()
- data ActionSetLabelMethodInfo
- actionSetLabel :: (HasCallStack, MonadIO m, IsAction a) => a -> Text -> m ()
- data ActionSetSensitiveMethodInfo
- actionSetSensitive :: (HasCallStack, MonadIO m, IsAction a) => a -> Bool -> m ()
- data ActionSetShortLabelMethodInfo
- actionSetShortLabel :: (HasCallStack, MonadIO m, IsAction a) => a -> Text -> m ()
- data ActionSetStockIdMethodInfo
- actionSetStockId :: (HasCallStack, MonadIO m, IsAction a) => a -> Text -> m ()
- data ActionSetTooltipMethodInfo
- actionSetTooltip :: (HasCallStack, MonadIO m, IsAction a) => a -> Text -> m ()
- data ActionSetVisibleMethodInfo
- actionSetVisible :: (HasCallStack, MonadIO m, IsAction a) => a -> Bool -> m ()
- data ActionSetVisibleHorizontalMethodInfo
- actionSetVisibleHorizontal :: (HasCallStack, MonadIO m, IsAction a) => a -> Bool -> m ()
- data ActionSetVisibleVerticalMethodInfo
- actionSetVisibleVertical :: (HasCallStack, MonadIO m, IsAction a) => a -> Bool -> m ()
- data ActionUnblockActivateMethodInfo
- actionUnblockActivate :: (HasCallStack, MonadIO m, IsAction a) => a -> m ()
- data ActionActionGroupPropertyInfo
- actionActionGroup :: AttrLabelProxy "actionGroup"
- clearActionActionGroup :: (MonadIO m, IsAction o) => o -> m ()
- constructActionActionGroup :: (IsAction o, IsActionGroup a) => a -> IO (GValueConstruct o)
- getActionActionGroup :: (MonadIO m, IsAction o) => o -> m (Maybe ActionGroup)
- setActionActionGroup :: (MonadIO m, IsAction o, IsActionGroup a) => o -> a -> m ()
- data ActionAlwaysShowImagePropertyInfo
- actionAlwaysShowImage :: AttrLabelProxy "alwaysShowImage"
- constructActionAlwaysShowImage :: IsAction o => Bool -> IO (GValueConstruct o)
- getActionAlwaysShowImage :: (MonadIO m, IsAction o) => o -> m Bool
- setActionAlwaysShowImage :: (MonadIO m, IsAction o) => o -> Bool -> m ()
- data ActionGiconPropertyInfo
- actionGicon :: AttrLabelProxy "gicon"
- constructActionGicon :: (IsAction o, IsIcon a) => a -> IO (GValueConstruct o)
- getActionGicon :: (MonadIO m, IsAction o) => o -> m Icon
- setActionGicon :: (MonadIO m, IsAction o, IsIcon a) => o -> a -> m ()
- data ActionHideIfEmptyPropertyInfo
- actionHideIfEmpty :: AttrLabelProxy "hideIfEmpty"
- constructActionHideIfEmpty :: IsAction o => Bool -> IO (GValueConstruct o)
- getActionHideIfEmpty :: (MonadIO m, IsAction o) => o -> m Bool
- setActionHideIfEmpty :: (MonadIO m, IsAction o) => o -> Bool -> m ()
- data ActionIconNamePropertyInfo
- actionIconName :: AttrLabelProxy "iconName"
- constructActionIconName :: IsAction o => Text -> IO (GValueConstruct o)
- getActionIconName :: (MonadIO m, IsAction o) => o -> m Text
- setActionIconName :: (MonadIO m, IsAction o) => o -> Text -> m ()
- data ActionIsImportantPropertyInfo
- actionIsImportant :: AttrLabelProxy "isImportant"
- constructActionIsImportant :: IsAction o => Bool -> IO (GValueConstruct o)
- getActionIsImportant :: (MonadIO m, IsAction o) => o -> m Bool
- setActionIsImportant :: (MonadIO m, IsAction o) => o -> Bool -> m ()
- data ActionLabelPropertyInfo
- actionLabel :: AttrLabelProxy "label"
- constructActionLabel :: IsAction o => Text -> IO (GValueConstruct o)
- getActionLabel :: (MonadIO m, IsAction o) => o -> m Text
- setActionLabel :: (MonadIO m, IsAction o) => o -> Text -> m ()
- data ActionNamePropertyInfo
- actionName :: AttrLabelProxy "name"
- constructActionName :: IsAction o => Text -> IO (GValueConstruct o)
- getActionName :: (MonadIO m, IsAction o) => o -> m Text
- data ActionSensitivePropertyInfo
- actionSensitive :: AttrLabelProxy "sensitive"
- constructActionSensitive :: IsAction o => Bool -> IO (GValueConstruct o)
- getActionSensitive :: (MonadIO m, IsAction o) => o -> m Bool
- setActionSensitive :: (MonadIO m, IsAction o) => o -> Bool -> m ()
- data ActionShortLabelPropertyInfo
- actionShortLabel :: AttrLabelProxy "shortLabel"
- constructActionShortLabel :: IsAction o => Text -> IO (GValueConstruct o)
- getActionShortLabel :: (MonadIO m, IsAction o) => o -> m Text
- setActionShortLabel :: (MonadIO m, IsAction o) => o -> Text -> m ()
- data ActionStockIdPropertyInfo
- actionStockId :: AttrLabelProxy "stockId"
- constructActionStockId :: IsAction o => Text -> IO (GValueConstruct o)
- getActionStockId :: (MonadIO m, IsAction o) => o -> m Text
- setActionStockId :: (MonadIO m, IsAction o) => o -> Text -> m ()
- data ActionTooltipPropertyInfo
- actionTooltip :: AttrLabelProxy "tooltip"
- constructActionTooltip :: IsAction o => Text -> IO (GValueConstruct o)
- getActionTooltip :: (MonadIO m, IsAction o) => o -> m Text
- setActionTooltip :: (MonadIO m, IsAction o) => o -> Text -> m ()
- data ActionVisiblePropertyInfo
- actionVisible :: AttrLabelProxy "visible"
- constructActionVisible :: IsAction o => Bool -> IO (GValueConstruct o)
- getActionVisible :: (MonadIO m, IsAction o) => o -> m Bool
- setActionVisible :: (MonadIO m, IsAction o) => o -> Bool -> m ()
- data ActionVisibleHorizontalPropertyInfo
- actionVisibleHorizontal :: AttrLabelProxy "visibleHorizontal"
- constructActionVisibleHorizontal :: IsAction o => Bool -> IO (GValueConstruct o)
- getActionVisibleHorizontal :: (MonadIO m, IsAction o) => o -> m Bool
- setActionVisibleHorizontal :: (MonadIO m, IsAction o) => o -> Bool -> m ()
- data ActionVisibleOverflownPropertyInfo
- actionVisibleOverflown :: AttrLabelProxy "visibleOverflown"
- constructActionVisibleOverflown :: IsAction o => Bool -> IO (GValueConstruct o)
- getActionVisibleOverflown :: (MonadIO m, IsAction o) => o -> m Bool
- setActionVisibleOverflown :: (MonadIO m, IsAction o) => o -> Bool -> m ()
- data ActionVisibleVerticalPropertyInfo
- actionVisibleVertical :: AttrLabelProxy "visibleVertical"
- constructActionVisibleVertical :: IsAction o => Bool -> IO (GValueConstruct o)
- getActionVisibleVertical :: (MonadIO m, IsAction o) => o -> m Bool
- setActionVisibleVertical :: (MonadIO m, IsAction o) => o -> Bool -> m ()
- type ActionActivateCallback = IO ()
- data ActionActivateSignalInfo
- type C_ActionActivateCallback = Ptr () -> Ptr () -> IO ()
- afterActionActivate :: (IsAction a, MonadIO m) => a -> ActionActivateCallback -> m SignalHandlerId
- genClosure_ActionActivate :: ActionActivateCallback -> IO Closure
- mk_ActionActivateCallback :: C_ActionActivateCallback -> IO (FunPtr C_ActionActivateCallback)
- noActionActivateCallback :: Maybe ActionActivateCallback
- onActionActivate :: (IsAction a, MonadIO m) => a -> ActionActivateCallback -> m SignalHandlerId
- wrap_ActionActivateCallback :: ActionActivateCallback -> Ptr () -> Ptr () -> IO ()
Exported types
GObject Action Source # | |
IsObject Action Source # | |
IsAction Action Source # | |
IsBuildable Action Source # | |
((~) * info (ResolveActionMethod t Action), MethodInfo * info Action p) => IsLabel t (Action -> p) Source # | |
((~) * info (ResolveActionMethod t Action), MethodInfo * info Action p) => IsLabelProxy t (Action -> p) Source # | |
HasAttributeList * Action Source # | |
type AttributeList Action Source # | |
type SignalList Action Source # | |
Methods
activate
data ActionActivateMethodInfo Source #
((~) * signature (m ()), MonadIO m, IsAction a) => MethodInfo * ActionActivateMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> 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
data ActionBlockActivateMethodInfo Source #
((~) * signature (m ()), MonadIO m, IsAction a) => MethodInfo * ActionBlockActivateMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> m () |
Deprecated: (Since version 3.10)Use simpleActionSetEnabled
to disable theSimpleAction
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
data ActionConnectAcceleratorMethodInfo Source #
((~) * signature (m ()), MonadIO m, IsAction a) => MethodInfo * ActionConnectAcceleratorMethodInfo a signature Source # | |
actionConnectAccelerator Source #
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> m () |
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
data ActionCreateIconMethodInfo Source #
((~) * signature (Int32 -> m Widget), MonadIO m, IsAction a) => MethodInfo * ActionCreateIconMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> Int32 |
|
-> 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
data ActionCreateMenuMethodInfo Source #
((~) * signature (m Widget), MonadIO m, IsAction a) => MethodInfo * ActionCreateMenuMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> m Widget | Returns: the menu item provided by the
action, or |
Deprecated: (Since version 3.10)Use Action
and MenuModel
instead, and create aMenu
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
data ActionCreateMenuItemMethodInfo Source #
((~) * signature (m Widget), MonadIO m, IsAction a) => MethodInfo * ActionCreateMenuItemMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> m Widget | Returns: a menu item connected to the action. |
Deprecated: (Since version 3.10)Use menuItemNew
and associate it with a Action
instead.
Creates a menu item widget that proxies for the given action.
Since: 2.4
createToolItem
data ActionCreateToolItemMethodInfo Source #
((~) * signature (m Widget), MonadIO m, IsAction a) => MethodInfo * ActionCreateToolItemMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> 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
data ActionDisconnectAcceleratorMethodInfo Source #
((~) * signature (m ()), MonadIO m, IsAction a) => MethodInfo * ActionDisconnectAcceleratorMethodInfo a signature Source # | |
actionDisconnectAccelerator Source #
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> m () |
Undoes the effect of one call to actionConnectAccelerator
.
Since: 2.4
getAccelClosure
data ActionGetAccelClosureMethodInfo Source #
((~) * signature (m Closure), MonadIO m, IsAction a) => MethodInfo * ActionGetAccelClosureMethodInfo a signature Source # | |
actionGetAccelClosure Source #
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> m Closure | Returns: the accel closure for this action. The returned closure is owned by GTK+ and must not be unreffed or modified. |
getAccelPath
data ActionGetAccelPathMethodInfo Source #
((~) * signature (m Text), MonadIO m, IsAction a) => MethodInfo * ActionGetAccelPathMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> m Text | Returns: the accel path for this action, or |
getAlwaysShowImage
data ActionGetAlwaysShowImageMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsAction a) => MethodInfo * ActionGetAlwaysShowImageMethodInfo a signature Source # | |
actionGetAlwaysShowImage Source #
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> m Bool | Returns: |
Deprecated: (Since version 3.10)Use menuItemGetAttributeValue
on a MenuItem
instead
Returns whether action
's menu item proxies will always
show their image, if available.
Since: 2.20
getGicon
data ActionGetGiconMethodInfo Source #
((~) * signature (m Icon), MonadIO m, IsAction a) => MethodInfo * ActionGetGiconMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> m Icon | Returns: The action’s |
Deprecated: (Since version 3.10)Use Action
instead, andmenuItemGetAttributeValue
to get an icon from a MenuItem
associated with a Action
Gets the gicon of action
.
Since: 2.16
getIconName
data ActionGetIconNameMethodInfo Source #
((~) * signature (m Text), MonadIO m, IsAction a) => MethodInfo * ActionGetIconNameMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> m Text | Returns: the icon name |
Deprecated: (Since version 3.10)Use Action
instead, andmenuItemGetAttributeValue
to get an icon from a MenuItem
associated with a Action
Gets the icon name of action
.
Since: 2.16
getIsImportant
data ActionGetIsImportantMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsAction a) => MethodInfo * ActionGetIsImportantMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> m Bool | Returns: whether |
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
data ActionGetLabelMethodInfo Source #
((~) * signature (m Text), MonadIO m, IsAction a) => MethodInfo * ActionGetLabelMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> 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
data ActionGetNameMethodInfo Source #
((~) * signature (m Text), MonadIO m, IsAction a) => MethodInfo * ActionGetNameMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> 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
data ActionGetProxiesMethodInfo Source #
((~) * signature (m [Widget]), MonadIO m, IsAction a) => MethodInfo * ActionGetProxiesMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> m [Widget] | Returns: a |
Deprecated: (Since version 3.10)
Returns the proxy widgets for an action.
See also activatableGetRelatedAction
.
Since: 2.4
getSensitive
data ActionGetSensitiveMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsAction a) => MethodInfo * ActionGetSensitiveMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> m Bool | Returns: |
Deprecated: (Since version 3.10)Use actionGetEnabled
on a Action
instead
Returns whether the action itself is sensitive. Note that this doesn’t
necessarily mean effective sensitivity. See actionIsSensitive
for that.
Since: 2.4
getShortLabel
data ActionGetShortLabelMethodInfo Source #
((~) * signature (m Text), MonadIO m, IsAction a) => MethodInfo * ActionGetShortLabelMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> 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
data ActionGetStockIdMethodInfo Source #
((~) * signature (m Text), MonadIO m, IsAction a) => MethodInfo * ActionGetStockIdMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> 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
data ActionGetTooltipMethodInfo Source #
((~) * signature (m Text), MonadIO m, IsAction a) => MethodInfo * ActionGetTooltipMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> m Text | Returns: the tooltip text |
Deprecated: (Since version 3.10)Use Action
instead, and get tooltips from associatedActionable
widgets with widgetGetTooltipText
Gets the tooltip text of action
.
Since: 2.16
getVisible
data ActionGetVisibleMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsAction a) => MethodInfo * ActionGetVisibleMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> m Bool | Returns: |
Deprecated: (Since version 3.10)Use Action
instead, and control and monitor the state ofActionable
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
data ActionGetVisibleHorizontalMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsAction a) => MethodInfo * ActionGetVisibleHorizontalMethodInfo a signature Source # | |
actionGetVisibleHorizontal Source #
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> m Bool | Returns: whether |
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
data ActionGetVisibleVerticalMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsAction a) => MethodInfo * ActionGetVisibleVerticalMethodInfo a signature Source # | |
actionGetVisibleVertical Source #
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> m Bool | Returns: whether |
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
data ActionIsSensitiveMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsAction a) => MethodInfo * ActionIsSensitiveMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> m Bool | Returns: |
Deprecated: (Since version 3.10)Use actionGetEnabled
on a Action
instead
Returns whether the action is effectively sensitive.
Since: 2.4
isVisible
data ActionIsVisibleMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsAction a) => MethodInfo * ActionIsVisibleMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> m Bool | Returns: |
Deprecated: (Since version 3.10)Use Action
instead, and control and monitor the state ofActionable
widgets directly
Returns whether the action is effectively visible.
Since: 2.4
new
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> Maybe Text |
|
-> Maybe Text |
|
-> Maybe Text |
|
-> m Action | Returns: a new |
Deprecated: (Since version 3.10)Use Action
instead, associating it to a widget withActionable
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
data ActionSetAccelGroupMethodInfo Source #
((~) * signature (Maybe b -> m ()), MonadIO m, IsAction a, IsAccelGroup b) => MethodInfo * ActionSetAccelGroupMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a, IsAccelGroup b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the AccelGroup
in which the accelerator for this action
will be installed.
Since: 2.4
setAccelPath
data ActionSetAccelPathMethodInfo Source #
((~) * signature (Text -> m ()), MonadIO m, IsAction a) => MethodInfo * ActionSetAccelPathMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> Text |
|
-> m () |
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
data ActionSetAlwaysShowImageMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsAction a) => MethodInfo * ActionSetAlwaysShowImageMethodInfo a signature Source # | |
actionSetAlwaysShowImage Source #
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> Bool |
|
-> 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
data ActionSetGiconMethodInfo Source #
((~) * signature (b -> m ()), MonadIO m, IsAction a, IsIcon b) => MethodInfo * ActionSetGiconMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a, IsIcon b) | |
=> a |
|
-> b |
|
-> 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
data ActionSetIconNameMethodInfo Source #
((~) * signature (Text -> m ()), MonadIO m, IsAction a) => MethodInfo * ActionSetIconNameMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> Text |
|
-> 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
data ActionSetIsImportantMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsAction a) => MethodInfo * ActionSetIsImportantMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> Bool |
|
-> 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
data ActionSetLabelMethodInfo Source #
((~) * signature (Text -> m ()), MonadIO m, IsAction a) => MethodInfo * ActionSetLabelMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> Text |
|
-> 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
data ActionSetSensitiveMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsAction a) => MethodInfo * ActionSetSensitiveMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> Bool |
|
-> m () |
Deprecated: (Since version 3.10)Use simpleActionSetEnabled
on a SimpleAction
instead
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
data ActionSetShortLabelMethodInfo Source #
((~) * signature (Text -> m ()), MonadIO m, IsAction a) => MethodInfo * ActionSetShortLabelMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> Text |
|
-> 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
data ActionSetStockIdMethodInfo Source #
((~) * signature (Text -> m ()), MonadIO m, IsAction a) => MethodInfo * ActionSetStockIdMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> Text |
|
-> 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
data ActionSetTooltipMethodInfo Source #
((~) * signature (Text -> m ()), MonadIO m, IsAction a) => MethodInfo * ActionSetTooltipMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> Text |
|
-> m () |
Deprecated: (Since version 3.10)Use Action
instead, and set tooltips on associatedActionable
widgets with widgetSetTooltipText
Sets the tooltip text on action
Since: 2.16
setVisible
data ActionSetVisibleMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsAction a) => MethodInfo * ActionSetVisibleMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> Bool |
|
-> m () |
Deprecated: (Since version 3.10)Use Action
instead, and control and monitor the state ofActionable
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
data ActionSetVisibleHorizontalMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsAction a) => MethodInfo * ActionSetVisibleHorizontalMethodInfo a signature Source # | |
actionSetVisibleHorizontal Source #
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> Bool |
|
-> 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
data ActionSetVisibleVerticalMethodInfo Source #
((~) * signature (Bool -> m ()), MonadIO m, IsAction a) => MethodInfo * ActionSetVisibleVerticalMethodInfo a signature Source # | |
actionSetVisibleVertical Source #
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> Bool |
|
-> 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
data ActionUnblockActivateMethodInfo Source #
((~) * signature (m ()), MonadIO m, IsAction a) => MethodInfo * ActionUnblockActivateMethodInfo a signature Source # | |
actionUnblockActivate Source #
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> m () |
Deprecated: (Since version 3.10)Use simpleActionSetEnabled
to enable theSimpleAction
instead
Reenable activation signals from the action
Since: 2.16
Properties
actionGroup
data ActionActionGroupPropertyInfo Source #
actionActionGroup :: AttrLabelProxy "actionGroup" Source #
clearActionActionGroup :: (MonadIO m, IsAction o) => o -> m () Source #
constructActionActionGroup :: (IsAction o, IsActionGroup a) => a -> IO (GValueConstruct o) Source #
getActionActionGroup :: (MonadIO m, IsAction o) => o -> m (Maybe ActionGroup) Source #
setActionActionGroup :: (MonadIO m, IsAction o, IsActionGroup a) => o -> a -> m () Source #
alwaysShowImage
data ActionAlwaysShowImagePropertyInfo Source #
actionAlwaysShowImage :: AttrLabelProxy "alwaysShowImage" Source #
constructActionAlwaysShowImage :: IsAction o => Bool -> IO (GValueConstruct o) Source #
gicon
data ActionGiconPropertyInfo Source #
actionGicon :: AttrLabelProxy "gicon" Source #
constructActionGicon :: (IsAction o, IsIcon a) => a -> IO (GValueConstruct o) Source #
hideIfEmpty
data ActionHideIfEmptyPropertyInfo Source #
actionHideIfEmpty :: AttrLabelProxy "hideIfEmpty" Source #
constructActionHideIfEmpty :: IsAction o => Bool -> IO (GValueConstruct o) Source #
iconName
data ActionIconNamePropertyInfo Source #
actionIconName :: AttrLabelProxy "iconName" Source #
constructActionIconName :: IsAction o => Text -> IO (GValueConstruct o) Source #
isImportant
data ActionIsImportantPropertyInfo Source #
actionIsImportant :: AttrLabelProxy "isImportant" Source #
constructActionIsImportant :: IsAction o => Bool -> IO (GValueConstruct o) Source #
label
data ActionLabelPropertyInfo Source #
actionLabel :: AttrLabelProxy "label" Source #
constructActionLabel :: IsAction o => Text -> IO (GValueConstruct o) Source #
name
data ActionNamePropertyInfo Source #
actionName :: AttrLabelProxy "name" Source #
constructActionName :: IsAction o => Text -> IO (GValueConstruct o) Source #
sensitive
data ActionSensitivePropertyInfo Source #
actionSensitive :: AttrLabelProxy "sensitive" Source #
constructActionSensitive :: IsAction o => Bool -> IO (GValueConstruct o) Source #
shortLabel
data ActionShortLabelPropertyInfo Source #
actionShortLabel :: AttrLabelProxy "shortLabel" Source #
constructActionShortLabel :: IsAction o => Text -> IO (GValueConstruct o) Source #
stockId
data ActionStockIdPropertyInfo Source #
actionStockId :: AttrLabelProxy "stockId" Source #
constructActionStockId :: IsAction o => Text -> IO (GValueConstruct o) Source #
tooltip
data ActionTooltipPropertyInfo Source #
actionTooltip :: AttrLabelProxy "tooltip" Source #
constructActionTooltip :: IsAction o => Text -> IO (GValueConstruct o) Source #
visible
data ActionVisiblePropertyInfo Source #
actionVisible :: AttrLabelProxy "visible" Source #
constructActionVisible :: IsAction o => Bool -> IO (GValueConstruct o) Source #
visibleHorizontal
data ActionVisibleHorizontalPropertyInfo Source #
actionVisibleHorizontal :: AttrLabelProxy "visibleHorizontal" Source #
constructActionVisibleHorizontal :: IsAction o => Bool -> IO (GValueConstruct o) Source #
visibleOverflown
data ActionVisibleOverflownPropertyInfo Source #
actionVisibleOverflown :: AttrLabelProxy "visibleOverflown" Source #
constructActionVisibleOverflown :: IsAction o => Bool -> IO (GValueConstruct o) Source #
visibleVertical
data ActionVisibleVerticalPropertyInfo Source #
actionVisibleVertical :: AttrLabelProxy "visibleVertical" Source #
constructActionVisibleVertical :: IsAction o => Bool -> IO (GValueConstruct o) Source #
Signals
activate
type ActionActivateCallback = IO () Source #
Deprecated: (Since version 3.10)Use SimpleAction
::activate
instead
afterActionActivate :: (IsAction a, MonadIO m) => a -> ActionActivateCallback -> m SignalHandlerId Source #
mk_ActionActivateCallback :: C_ActionActivateCallback -> IO (FunPtr C_ActionActivateCallback) Source #
onActionActivate :: (IsAction a, MonadIO m) => a -> ActionActivateCallback -> m SignalHandlerId Source #
wrap_ActionActivateCallback :: ActionActivateCallback -> Ptr () -> Ptr () -> IO () Source #