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

GI.Gtk.Interfaces.Actionable

Description

This interface provides a convenient way of associating widgets with actions on a ApplicationWindow or Application.

It primarily consists of two properties: Actionable:action-name and Actionable:action-target. There are also some convenience APIs for setting these properties.

The action will be looked up in action groups that are found among the widgets ancestors. Most commonly, these will be the actions with the “win.” or “app.” prefix that are associated with the ApplicationWindow or Application, but other action groups that are added with widgetInsertActionGroup will be consulted as well.

Since: 3.4

Synopsis

Exported types

newtype Actionable Source #

Memory-managed wrapper type.

Constructors

Actionable (ManagedPtr Actionable) 

Instances

Instances details
Eq Actionable Source # 
Instance details

Defined in GI.Gtk.Interfaces.Actionable

GObject Actionable Source # 
Instance details

Defined in GI.Gtk.Interfaces.Actionable

ManagedPtrNewtype Actionable Source # 
Instance details

Defined in GI.Gtk.Interfaces.Actionable

Methods

toManagedPtr :: Actionable -> ManagedPtr Actionable

TypedObject Actionable Source # 
Instance details

Defined in GI.Gtk.Interfaces.Actionable

Methods

glibType :: IO GType

HasParentTypes Actionable Source # 
Instance details

Defined in GI.Gtk.Interfaces.Actionable

IsGValue (Maybe Actionable) Source #

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

Instance details

Defined in GI.Gtk.Interfaces.Actionable

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes Actionable Source # 
Instance details

Defined in GI.Gtk.Interfaces.Actionable

type ParentTypes Actionable = '[Object, Widget]

class (GObject o, IsDescendantOf Actionable o) => IsActionable o Source #

Type class for types which can be safely cast to Actionable, for instance with toActionable.

Instances

Instances details
(GObject o, IsDescendantOf Actionable o) => IsActionable o Source # 
Instance details

Defined in GI.Gtk.Interfaces.Actionable

toActionable :: (MonadIO m, IsActionable o) => o -> m Actionable Source #

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

Methods

Click to display all available methods, including inherited ones

Expand

Methods

activate, addAccelerator, addChild, addDeviceEvents, addEvents, addMnemonicLabel, addTickCallback, bindProperty, bindPropertyFull, canActivateAccel, childFocus, childNotify, classPath, computeExpand, constructChild, createPangoContext, createPangoLayout, customFinished, customTagEnd, customTagStart, destroy, destroyed, deviceIsShadowed, dragBegin, dragBeginWithCoordinates, dragCheckThreshold, dragDestAddImageTargets, dragDestAddTextTargets, dragDestAddUriTargets, dragDestFindTarget, dragDestGetTargetList, dragDestGetTrackMotion, dragDestSet, dragDestSetProxy, dragDestSetTargetList, dragDestSetTrackMotion, dragDestUnset, dragGetData, dragHighlight, dragSourceAddImageTargets, dragSourceAddTextTargets, dragSourceAddUriTargets, dragSourceGetTargetList, dragSourceSet, dragSourceSetIconGicon, dragSourceSetIconName, dragSourceSetIconPixbuf, dragSourceSetIconStock, dragSourceSetTargetList, dragSourceUnset, dragUnhighlight, draw, ensureStyle, errorBell, event, forceFloating, freezeChildNotify, freezeNotify, getv, grabAdd, grabDefault, grabFocus, grabRemove, hasDefault, hasFocus, hasGrab, hasRcStyle, hasScreen, hasVisibleFocus, hide, hideOnDelete, inDestruction, initTemplate, inputShapeCombineRegion, insertActionGroup, intersect, isAncestor, isComposited, isDrawable, isFloating, isFocus, isSensitive, isToplevel, isVisible, keynavFailed, listAccelClosures, listActionPrefixes, listMnemonicLabels, map, mnemonicActivate, modifyBase, modifyBg, modifyCursor, modifyFg, modifyFont, modifyStyle, modifyText, notify, notifyByPspec, overrideBackgroundColor, overrideColor, overrideCursor, overrideFont, overrideSymbolicColor, parserFinished, path, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, ref, refSink, regionIntersect, registerWindow, removeAccelerator, removeMnemonicLabel, removeTickCallback, renderIcon, renderIconPixbuf, reparent, resetRcStyles, resetStyle, runDispose, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, stealData, stealQdata, styleAttach, styleGetProperty, thawChildNotify, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unregisterWindow, unsetStateFlags, watchClosure.

Getters

getAccessible, getActionGroup, getActionName, getActionTargetValue, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppPaintable, getCanDefault, getCanFocus, getChildRequisition, getChildVisible, getClip, getClipboard, getCompositeName, getData, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getEvents, getFocusOnClick, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getInternalChild, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getPangoContext, getParent, getParentWindow, getPath, getPointer, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRequisition, getRootWindow, getScaleFactor, getScreen, getSensitive, getSettings, getSizeRequest, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getTemplateChild, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisual, getWindow.

Setters

setAccelPath, setActionName, setActionTargetValue, setAllocation, setAppPaintable, setBuildableProperty, setCanDefault, setCanFocus, setChildVisible, setClip, setCompositeName, setData, setDataFull, setDetailedActionName, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEvents, setFocusOnClick, setFontMap, setFontOptions, setHalign, setHasTooltip, setHasWindow, setHexpand, setHexpandSet, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setName, setNoShowAll, setOpacity, setParent, setParentWindow, setProperty, setRealized, setReceivesDefault, setRedrawOnAllocate, setSensitive, setSizeRequest, setState, setStateFlags, setStyle, setSupportMultidevice, setTooltipMarkup, setTooltipText, setTooltipWindow, setValign, setVexpand, setVexpandSet, setVisible, setVisual, setWindow.

getActionName

actionableGetActionName Source #

Arguments

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

actionable: a Actionable widget

-> m (Maybe Text)

Returns: the action name, or Nothing if none is set

Gets the action name for actionable.

See actionableSetActionName for more information.

Since: 3.4

getActionTargetValue

actionableGetActionTargetValue Source #

Arguments

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

actionable: a Actionable widget

-> m GVariant

Returns: the current target value

Gets the current target value of actionable.

See actionableSetActionTargetValue for more information.

Since: 3.4

setActionName

actionableSetActionName Source #

Arguments

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

actionable: a Actionable widget

-> Maybe Text

actionName: an action name, or Nothing

-> m () 

Specifies the name of the action with which this widget should be associated. If actionName is Nothing then the widget will be unassociated from any previous action.

Usually this function is used when the widget is located (or will be located) within the hierarchy of a ApplicationWindow.

Names are of the form “win.save” or “app.quit” for actions on the containing ApplicationWindow or its associated Application, respectively. This is the same form used for actions in the Menu associated with the window.

Since: 3.4

setActionTargetValue

actionableSetActionTargetValue Source #

Arguments

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

actionable: a Actionable widget

-> Maybe GVariant

targetValue: a GVariant to set as the target value, or Nothing

-> m () 

Sets the target value of an actionable widget.

If targetValue is Nothing then the target value is unset.

The target value has two purposes. First, it is used as the parameter to activation of the action associated with the Actionable widget. Second, it is used to determine if the widget should be rendered as “active” — the widget is active if the state is equal to the given target.

Consider the example of associating a set of buttons with a Action with string state in a typical “radio button” situation. Each button will be associated with the same action, but with a different target value for that action. Clicking on a particular button will activate the action with the target of that button, which will typically cause the action’s state to change to that value. Since the action’s state is now equal to the target value of the button, the button will now be rendered as active (and the other buttons, with different targets, rendered inactive).

Since: 3.4

setDetailedActionName

actionableSetDetailedActionName Source #

Arguments

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

actionable: a Actionable widget

-> Text

detailedActionName: the detailed action name

-> m () 

Sets the action-name and associated string target value of an actionable widget.

detailedActionName is a string in the format accepted by actionParseDetailedName.

(Note that prior to version 3.22.25, this function is only usable for actions with a simple "s" target, and detailedActionName must be of the form "action::target" where action is the action name and target is the string to use as the target.)

Since: 3.4

Properties

actionName

No description available in the introspection data.

clearActionableActionName :: (MonadIO m, IsActionable o) => o -> m () Source #

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

clear #actionName

constructActionableActionName :: (IsActionable o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getActionableActionName :: (MonadIO m, IsActionable o) => o -> m (Maybe Text) Source #

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

get actionable #actionName

setActionableActionName :: (MonadIO m, IsActionable o) => o -> Text -> m () Source #

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

set actionable [ #actionName := value ]

actionTarget

No description available in the introspection data.

clearActionableActionTarget :: (MonadIO m, IsActionable o) => o -> m () Source #

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

clear #actionTarget

constructActionableActionTarget :: (IsActionable o, MonadIO m) => GVariant -> m (GValueConstruct o) Source #

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

getActionableActionTarget :: (MonadIO m, IsActionable o) => o -> m (Maybe GVariant) Source #

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

get actionable #actionTarget

setActionableActionTarget :: (MonadIO m, IsActionable o) => o -> GVariant -> m () Source #

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

set actionable [ #actionTarget := value ]