Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
GtkToolButtons
are GtkToolItems
containing buttons.
Use toolButtonNew
to create a new ToolButton
.
The label of a ToolButton
is determined by the properties
ToolButton:labelWidget, ToolButton:label, and
ToolButton:stockId. If ToolButton:labelWidget is
non-Nothing
, then that widget is used as the label. Otherwise, if
ToolButton:label is non-Nothing
, that string is used as the label.
Otherwise, if ToolButton:stockId is non-Nothing
, the label is
determined by the stock item. Otherwise, the button does not have a label.
The icon of a ToolButton
is determined by the properties
ToolButton:iconWidget and ToolButton:stockId. If
ToolButton:iconWidget is non-Nothing
, then
that widget is used as the icon. Otherwise, if ToolButton:stockId is
non-Nothing
, the icon is determined by the stock item. Otherwise,
the button does not have a icon.
CSS nodes
GtkToolButton has a single CSS node with name toolbutton.
Synopsis
- newtype ToolButton = ToolButton (ManagedPtr ToolButton)
- class (GObject o, IsDescendantOf ToolButton o) => IsToolButton o
- toToolButton :: (MonadIO m, IsToolButton o) => o -> m ToolButton
- toolButtonGetIconName :: (HasCallStack, MonadIO m, IsToolButton a) => a -> m (Maybe Text)
- toolButtonGetIconWidget :: (HasCallStack, MonadIO m, IsToolButton a) => a -> m (Maybe Widget)
- toolButtonGetLabel :: (HasCallStack, MonadIO m, IsToolButton a) => a -> m (Maybe Text)
- toolButtonGetLabelWidget :: (HasCallStack, MonadIO m, IsToolButton a) => a -> m (Maybe Widget)
- toolButtonGetStockId :: (HasCallStack, MonadIO m, IsToolButton a) => a -> m Text
- toolButtonGetUseUnderline :: (HasCallStack, MonadIO m, IsToolButton a) => a -> m Bool
- toolButtonNew :: (HasCallStack, MonadIO m, IsWidget a) => Maybe a -> Maybe Text -> m ToolButton
- toolButtonNewFromStock :: (HasCallStack, MonadIO m) => Text -> m ToolButton
- toolButtonSetIconName :: (HasCallStack, MonadIO m, IsToolButton a) => a -> Maybe Text -> m ()
- toolButtonSetIconWidget :: (HasCallStack, MonadIO m, IsToolButton a, IsWidget b) => a -> Maybe b -> m ()
- toolButtonSetLabel :: (HasCallStack, MonadIO m, IsToolButton a) => a -> Maybe Text -> m ()
- toolButtonSetLabelWidget :: (HasCallStack, MonadIO m, IsToolButton a, IsWidget b) => a -> Maybe b -> m ()
- toolButtonSetStockId :: (HasCallStack, MonadIO m, IsToolButton a) => a -> Maybe Text -> m ()
- toolButtonSetUseUnderline :: (HasCallStack, MonadIO m, IsToolButton a) => a -> Bool -> m ()
- clearToolButtonIconName :: (MonadIO m, IsToolButton o) => o -> m ()
- constructToolButtonIconName :: (IsToolButton o, MonadIO m) => Text -> m (GValueConstruct o)
- getToolButtonIconName :: (MonadIO m, IsToolButton o) => o -> m (Maybe Text)
- setToolButtonIconName :: (MonadIO m, IsToolButton o) => o -> Text -> m ()
- clearToolButtonIconWidget :: (MonadIO m, IsToolButton o) => o -> m ()
- constructToolButtonIconWidget :: (IsToolButton o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getToolButtonIconWidget :: (MonadIO m, IsToolButton o) => o -> m (Maybe Widget)
- setToolButtonIconWidget :: (MonadIO m, IsToolButton o, IsWidget a) => o -> a -> m ()
- clearToolButtonLabel :: (MonadIO m, IsToolButton o) => o -> m ()
- constructToolButtonLabel :: (IsToolButton o, MonadIO m) => Text -> m (GValueConstruct o)
- getToolButtonLabel :: (MonadIO m, IsToolButton o) => o -> m (Maybe Text)
- setToolButtonLabel :: (MonadIO m, IsToolButton o) => o -> Text -> m ()
- clearToolButtonLabelWidget :: (MonadIO m, IsToolButton o) => o -> m ()
- constructToolButtonLabelWidget :: (IsToolButton o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getToolButtonLabelWidget :: (MonadIO m, IsToolButton o) => o -> m (Maybe Widget)
- setToolButtonLabelWidget :: (MonadIO m, IsToolButton o, IsWidget a) => o -> a -> m ()
- clearToolButtonStockId :: (MonadIO m, IsToolButton o) => o -> m ()
- constructToolButtonStockId :: (IsToolButton o, MonadIO m) => Text -> m (GValueConstruct o)
- getToolButtonStockId :: (MonadIO m, IsToolButton o) => o -> m Text
- setToolButtonStockId :: (MonadIO m, IsToolButton o) => o -> Text -> m ()
- constructToolButtonUseUnderline :: (IsToolButton o, MonadIO m) => Bool -> m (GValueConstruct o)
- getToolButtonUseUnderline :: (MonadIO m, IsToolButton o) => o -> m Bool
- setToolButtonUseUnderline :: (MonadIO m, IsToolButton o) => o -> Bool -> m ()
- type ToolButtonClickedCallback = IO ()
- afterToolButtonClicked :: (IsToolButton a, MonadIO m) => a -> ((?self :: a) => ToolButtonClickedCallback) -> m SignalHandlerId
- onToolButtonClicked :: (IsToolButton a, MonadIO m) => a -> ((?self :: a) => ToolButtonClickedCallback) -> m SignalHandlerId
Exported types
newtype ToolButton Source #
Memory-managed wrapper type.
ToolButton (ManagedPtr ToolButton) |
Instances
Eq ToolButton Source # | |
Defined in GI.Gtk.Objects.ToolButton (==) :: ToolButton -> ToolButton -> Bool # (/=) :: ToolButton -> ToolButton -> Bool # | |
GObject ToolButton Source # | |
Defined in GI.Gtk.Objects.ToolButton | |
ManagedPtrNewtype ToolButton Source # | |
Defined in GI.Gtk.Objects.ToolButton toManagedPtr :: ToolButton -> ManagedPtr ToolButton | |
TypedObject ToolButton Source # | |
Defined in GI.Gtk.Objects.ToolButton | |
HasParentTypes ToolButton Source # | |
Defined in GI.Gtk.Objects.ToolButton | |
IsGValue (Maybe ToolButton) Source # | Convert |
Defined in GI.Gtk.Objects.ToolButton gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe ToolButton -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe ToolButton) | |
type ParentTypes ToolButton Source # | |
Defined in GI.Gtk.Objects.ToolButton type ParentTypes ToolButton = '[ToolItem, Bin, Container, Widget, Object, ImplementorIface, Actionable, Activatable, Buildable] |
class (GObject o, IsDescendantOf ToolButton o) => IsToolButton o Source #
Type class for types which can be safely cast to ToolButton
, for instance with toToolButton
.
Instances
(GObject o, IsDescendantOf ToolButton o) => IsToolButton o Source # | |
Defined in GI.Gtk.Objects.ToolButton |
toToolButton :: (MonadIO m, IsToolButton o) => o -> m ToolButton Source #
Cast to ToolButton
, 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
Methods
activate, add, addAccelerator, addChild, addDeviceEvents, addEvents, addMnemonicLabel, addTickCallback, bindProperty, bindPropertyFull, canActivateAccel, checkResize, childFocus, childGetProperty, childNotify, childNotifyByPspec, childSetProperty, childType, classPath, computeExpand, constructChild, createPangoContext, createPangoLayout, customFinished, customTagEnd, customTagStart, destroy, destroyed, deviceIsShadowed, doSetRelatedAction, 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, forall, forceFloating, foreach, 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, propagateDraw, queueAllocate, queueComputeExpand, queueDraw, queueDrawArea, queueDrawRegion, queueResize, queueResizeNoRedraw, realize, rebuildMenu, ref, refSink, regionIntersect, registerWindow, remove, removeAccelerator, removeMnemonicLabel, removeTickCallback, renderIcon, renderIconPixbuf, reparent, resetRcStyles, resetStyle, resizeChildren, retrieveProxyMenuItem, runDispose, sendExpose, sendFocusChange, shapeCombineRegion, show, showAll, showNow, sizeAllocate, sizeAllocateWithBaseline, sizeRequest, stealData, stealQdata, styleAttach, styleGetProperty, syncActionProperties, thawChildNotify, thawNotify, toolbarReconfigured, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unregisterWindow, unsetFocusChain, unsetStateFlags, watchClosure.
Getters
getAccessible, getActionGroup, getActionName, getActionTargetValue, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppPaintable, getBorderWidth, getCanDefault, getCanFocus, getChild, getChildRequisition, getChildVisible, getChildren, getClip, getClipboard, getCompositeName, getData, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getEllipsizeMode, getEvents, getExpand, getFocusChain, getFocusChild, getFocusHadjustment, getFocusOnClick, getFocusVadjustment, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getHomogeneous, getIconName, getIconSize, getIconWidget, getInternalChild, getIsImportant, getLabel, getLabelWidget, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getOrientation, getPangoContext, getParent, getParentWindow, getPath, getPathForChild, getPointer, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getProxyMenuItem, getQdata, getRealized, getReceivesDefault, getRelatedAction, getReliefStyle, getRequestMode, getRequisition, getResizeMode, getRootWindow, getScaleFactor, getScreen, getSensitive, getSettings, getSizeRequest, getState, getStateFlags, getStockId, getStyle, getStyleContext, getSupportMultidevice, getTemplateChild, getTextAlignment, getTextOrientation, getTextSizeGroup, getToolbarStyle, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getUseActionAppearance, getUseDragWindow, getUseUnderline, getValign, getValignWithBaseline, getVexpand, getVexpandSet, getVisible, getVisibleHorizontal, getVisibleVertical, getVisual, getWindow.
Setters
setAccelPath, setActionName, setActionTargetValue, setAllocation, setAppPaintable, setBorderWidth, setBuildableProperty, setCanDefault, setCanFocus, setChildVisible, setClip, setCompositeName, setData, setDataFull, setDetailedActionName, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEvents, setExpand, setFocusChain, setFocusChild, setFocusHadjustment, setFocusOnClick, setFocusVadjustment, setFontMap, setFontOptions, setHalign, setHasTooltip, setHasWindow, setHexpand, setHexpandSet, setHomogeneous, setIconName, setIconWidget, setIsImportant, setLabel, setLabelWidget, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setName, setNoShowAll, setOpacity, setParent, setParentWindow, setProperty, setProxyMenuItem, setRealized, setReallocateRedraws, setReceivesDefault, setRedrawOnAllocate, setRelatedAction, setResizeMode, setSensitive, setSizeRequest, setState, setStateFlags, setStockId, setStyle, setSupportMultidevice, setTooltipMarkup, setTooltipText, setTooltipWindow, setUseActionAppearance, setUseDragWindow, setUseUnderline, setValign, setVexpand, setVexpandSet, setVisible, setVisibleHorizontal, setVisibleVertical, setVisual, setWindow.
getIconName
toolButtonGetIconName Source #
:: (HasCallStack, MonadIO m, IsToolButton a) | |
=> a |
|
-> m (Maybe Text) | Returns: the icon name or |
Returns the name of the themed icon for the tool button,
see toolButtonSetIconName
.
Since: 2.8
getIconWidget
toolButtonGetIconWidget Source #
:: (HasCallStack, MonadIO m, IsToolButton a) | |
=> a |
|
-> m (Maybe Widget) | Returns: The widget used as icon
on |
Return the widget used as icon widget on button
.
See toolButtonSetIconWidget
.
Since: 2.4
getLabel
:: (HasCallStack, MonadIO m, IsToolButton a) | |
=> a |
|
-> m (Maybe Text) | Returns: The label, or |
Returns the label used by the tool button, or Nothing
if the tool button
doesn’t have a label. or uses a the label from a stock item. The returned
string is owned by GTK+, and must not be modified or freed.
Since: 2.4
getLabelWidget
toolButtonGetLabelWidget Source #
:: (HasCallStack, MonadIO m, IsToolButton a) | |
=> a |
|
-> m (Maybe Widget) | Returns: The widget used as label
on |
Returns the widget used as label on button
.
See toolButtonSetLabelWidget
.
Since: 2.4
getStockId
:: (HasCallStack, MonadIO m, IsToolButton a) | |
=> a |
|
-> m Text | Returns: the name of the stock item for |
Deprecated: (Since version 3.10)Use toolButtonGetIconName
instead.
Returns the name of the stock item. See toolButtonSetStockId
.
The returned string is owned by GTK+ and must not be freed or modifed.
Since: 2.4
getUseUnderline
toolButtonGetUseUnderline Source #
:: (HasCallStack, MonadIO m, IsToolButton a) | |
=> a |
|
-> m Bool | Returns: |
Returns whether underscores in the label property are used as mnemonics
on menu items on the overflow menu. See toolButtonSetUseUnderline
.
Since: 2.4
new
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> Maybe a |
|
-> Maybe Text |
|
-> m ToolButton | Returns: A new |
Creates a new ToolButton
using iconWidget
as contents and label
as
label.
Since: 2.4
newFromStock
toolButtonNewFromStock Source #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m ToolButton | Returns: A new |
Deprecated: (Since version 3.10)Use toolButtonNew
together withimageNewFromIconName
instead.
Creates a new ToolButton
containing the image and text from a
stock item. Some stock ids have preprocessor macros like STOCK_OK
and STOCK_APPLY
.
It is an error if stockId
is not a name of a stock item.
Since: 2.4
setIconName
toolButtonSetIconName Source #
:: (HasCallStack, MonadIO m, IsToolButton a) | |
=> a |
|
-> Maybe Text |
|
-> m () |
Sets the icon for the tool button from a named themed icon.
See the docs for IconTheme
for more details.
The ToolButton:iconName property only has an effect if not
overridden by non-Nothing
ToolButton:labelWidget,
ToolButton:iconWidget and ToolButton:stockId properties.
Since: 2.8
setIconWidget
toolButtonSetIconWidget Source #
:: (HasCallStack, MonadIO m, IsToolButton a, IsWidget b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets icon
as the widget used as icon on button
. If iconWidget
is
Nothing
the icon is determined by the ToolButton:stockId property. If the
ToolButton:stockId property is also Nothing
, button
will not have an icon.
Since: 2.4
setLabel
:: (HasCallStack, MonadIO m, IsToolButton a) | |
=> a |
|
-> Maybe Text |
|
-> m () |
Sets label
as the label used for the tool button. The ToolButton:label
property only has an effect if not overridden by a non-Nothing
ToolButton:labelWidget property. If both the ToolButton:labelWidget
and ToolButton:label properties are Nothing
, the label is determined by the
ToolButton:stockId property. If the ToolButton:stockId property is
also Nothing
, button
will not have a label.
Since: 2.4
setLabelWidget
toolButtonSetLabelWidget Source #
:: (HasCallStack, MonadIO m, IsToolButton a, IsWidget b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets labelWidget
as the widget that will be used as the label
for button
. If labelWidget
is Nothing
the ToolButton:label property is used
as label. If ToolButton:label is also Nothing
, the label in the stock item
determined by the ToolButton:stockId property is used as label. If
ToolButton:stockId is also Nothing
, button
does not have a label.
Since: 2.4
setStockId
:: (HasCallStack, MonadIO m, IsToolButton a) | |
=> a |
|
-> Maybe Text |
|
-> m () |
Deprecated: (Since version 3.10)Use toolButtonSetIconName
instead.
Sets the name of the stock item. See toolButtonNewFromStock
.
The stock_id property only has an effect if not overridden by non-Nothing
ToolButton:labelWidget and ToolButton:iconWidget properties.
Since: 2.4
setUseUnderline
toolButtonSetUseUnderline Source #
:: (HasCallStack, MonadIO m, IsToolButton a) | |
=> a |
|
-> Bool |
|
-> m () |
If set, an underline in the label property indicates that the next character
should be used for the mnemonic accelerator key in the overflow menu. For
example, if the label property is “_Open” and useUnderline
is True
,
the label on the tool button will be “Open” and the item on the overflow
menu will have an underlined “O”.
Labels shown on tool buttons never have mnemonics on them; this property only affects the menu item on the overflow menu.
Since: 2.4
Properties
iconName
The name of the themed icon displayed on the item. This property only has an effect if not overridden by ToolButton:labelWidget, ToolButton:iconWidget or ToolButton:stockId properties.
Since: 2.8
clearToolButtonIconName :: (MonadIO m, IsToolButton o) => o -> m () Source #
Set the value of the “icon-name
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#iconName
constructToolButtonIconName :: (IsToolButton 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
.
getToolButtonIconName :: (MonadIO m, IsToolButton o) => o -> m (Maybe Text) Source #
Get the value of the “icon-name
” property.
When overloading is enabled, this is equivalent to
get
toolButton #iconName
setToolButtonIconName :: (MonadIO m, IsToolButton o) => o -> Text -> m () Source #
Set the value of the “icon-name
” property.
When overloading is enabled, this is equivalent to
set
toolButton [ #iconName:=
value ]
iconWidget
No description available in the introspection data.
clearToolButtonIconWidget :: (MonadIO m, IsToolButton o) => o -> m () Source #
Set the value of the “icon-widget
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#iconWidget
constructToolButtonIconWidget :: (IsToolButton o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “icon-widget
” property. This is rarely needed directly, but it is used by new
.
getToolButtonIconWidget :: (MonadIO m, IsToolButton o) => o -> m (Maybe Widget) Source #
Get the value of the “icon-widget
” property.
When overloading is enabled, this is equivalent to
get
toolButton #iconWidget
setToolButtonIconWidget :: (MonadIO m, IsToolButton o, IsWidget a) => o -> a -> m () Source #
Set the value of the “icon-widget
” property.
When overloading is enabled, this is equivalent to
set
toolButton [ #iconWidget:=
value ]
label
No description available in the introspection data.
clearToolButtonLabel :: (MonadIO m, IsToolButton o) => o -> m () Source #
Set the value of the “label
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#label
constructToolButtonLabel :: (IsToolButton 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
.
getToolButtonLabel :: (MonadIO m, IsToolButton o) => o -> m (Maybe Text) Source #
Get the value of the “label
” property.
When overloading is enabled, this is equivalent to
get
toolButton #label
setToolButtonLabel :: (MonadIO m, IsToolButton o) => o -> Text -> m () Source #
Set the value of the “label
” property.
When overloading is enabled, this is equivalent to
set
toolButton [ #label:=
value ]
labelWidget
No description available in the introspection data.
clearToolButtonLabelWidget :: (MonadIO m, IsToolButton o) => o -> m () Source #
Set the value of the “label-widget
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#labelWidget
constructToolButtonLabelWidget :: (IsToolButton o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “label-widget
” property. This is rarely needed directly, but it is used by new
.
getToolButtonLabelWidget :: (MonadIO m, IsToolButton o) => o -> m (Maybe Widget) Source #
Get the value of the “label-widget
” property.
When overloading is enabled, this is equivalent to
get
toolButton #labelWidget
setToolButtonLabelWidget :: (MonadIO m, IsToolButton o, IsWidget a) => o -> a -> m () Source #
Set the value of the “label-widget
” property.
When overloading is enabled, this is equivalent to
set
toolButton [ #labelWidget:=
value ]
stockId
No description available in the introspection data.
clearToolButtonStockId :: (MonadIO m, IsToolButton o) => o -> m () Source #
Set the value of the “stock-id
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#stockId
constructToolButtonStockId :: (IsToolButton 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
.
getToolButtonStockId :: (MonadIO m, IsToolButton o) => o -> m Text Source #
Get the value of the “stock-id
” property.
When overloading is enabled, this is equivalent to
get
toolButton #stockId
setToolButtonStockId :: (MonadIO m, IsToolButton o) => o -> Text -> m () Source #
Set the value of the “stock-id
” property.
When overloading is enabled, this is equivalent to
set
toolButton [ #stockId:=
value ]
useUnderline
No description available in the introspection data.
constructToolButtonUseUnderline :: (IsToolButton o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “use-underline
” property. This is rarely needed directly, but it is used by new
.
getToolButtonUseUnderline :: (MonadIO m, IsToolButton o) => o -> m Bool Source #
Get the value of the “use-underline
” property.
When overloading is enabled, this is equivalent to
get
toolButton #useUnderline
setToolButtonUseUnderline :: (MonadIO m, IsToolButton o) => o -> Bool -> m () Source #
Set the value of the “use-underline
” property.
When overloading is enabled, this is equivalent to
set
toolButton [ #useUnderline:=
value ]
Signals
clicked
type ToolButtonClickedCallback = IO () Source #
This signal is emitted when the tool button is clicked with the mouse or activated with the keyboard.
afterToolButtonClicked :: (IsToolButton a, MonadIO m) => a -> ((?self :: a) => ToolButtonClickedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the clicked signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
toolButton #clicked callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onToolButtonClicked :: (IsToolButton a, MonadIO m) => a -> ((?self :: a) => ToolButtonClickedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the clicked signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
toolButton #clicked callback