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 |
A ToggleToolButton
is a ToolItem
that contains a toggle
button.
Use toggleToolButtonNew
to create a new GtkToggleToolButton.
CSS nodes
GtkToggleToolButton has a single CSS node with name togglebutton.
Synopsis
- newtype ToggleToolButton = ToggleToolButton (ManagedPtr ToggleToolButton)
- class (GObject o, IsDescendantOf ToggleToolButton o) => IsToggleToolButton o
- toToggleToolButton :: (MonadIO m, IsToggleToolButton o) => o -> m ToggleToolButton
- toggleToolButtonGetActive :: (HasCallStack, MonadIO m, IsToggleToolButton a) => a -> m Bool
- toggleToolButtonNew :: (HasCallStack, MonadIO m) => m ToggleToolButton
- toggleToolButtonNewFromStock :: (HasCallStack, MonadIO m) => Text -> m ToggleToolButton
- toggleToolButtonSetActive :: (HasCallStack, MonadIO m, IsToggleToolButton a) => a -> Bool -> m ()
- constructToggleToolButtonActive :: (IsToggleToolButton o, MonadIO m) => Bool -> m (GValueConstruct o)
- getToggleToolButtonActive :: (MonadIO m, IsToggleToolButton o) => o -> m Bool
- setToggleToolButtonActive :: (MonadIO m, IsToggleToolButton o) => o -> Bool -> m ()
- type ToggleToolButtonToggledCallback = IO ()
- afterToggleToolButtonToggled :: (IsToggleToolButton a, MonadIO m) => a -> ((?self :: a) => ToggleToolButtonToggledCallback) -> m SignalHandlerId
- onToggleToolButtonToggled :: (IsToggleToolButton a, MonadIO m) => a -> ((?self :: a) => ToggleToolButtonToggledCallback) -> m SignalHandlerId
Exported types
newtype ToggleToolButton Source #
Memory-managed wrapper type.
ToggleToolButton (ManagedPtr ToggleToolButton) |
Instances
class (GObject o, IsDescendantOf ToggleToolButton o) => IsToggleToolButton o Source #
Type class for types which can be safely cast to ToggleToolButton
, for instance with toToggleToolButton
.
Instances
(GObject o, IsDescendantOf ToggleToolButton o) => IsToggleToolButton o Source # | |
Defined in GI.Gtk.Objects.ToggleToolButton |
toToggleToolButton :: (MonadIO m, IsToggleToolButton o) => o -> m ToggleToolButton Source #
Cast to ToggleToolButton
, 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, getActive, 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, setActive, 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.
getActive
toggleToolButtonGetActive Source #
:: (HasCallStack, MonadIO m, IsToggleToolButton a) | |
=> a |
|
-> m Bool | Returns: |
Queries a ToggleToolButton
and returns its current state.
Returns True
if the toggle button is pressed in and False
if it is raised.
Since: 2.4
new
:: (HasCallStack, MonadIO m) | |
=> m ToggleToolButton | Returns: a newly created |
Returns a new ToggleToolButton
Since: 2.4
newFromStock
toggleToolButtonNewFromStock Source #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m ToggleToolButton | Returns: A new |
Deprecated: (Since version 3.10)Use toggleToolButtonNew
instead.
Creates a new ToggleToolButton
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
setActive
toggleToolButtonSetActive Source #
:: (HasCallStack, MonadIO m, IsToggleToolButton a) | |
=> a |
|
-> Bool |
|
-> m () |
Properties
active
If the toggle tool button should be pressed in.
Since: 2.8
constructToggleToolButtonActive :: (IsToggleToolButton o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “active
” property. This is rarely needed directly, but it is used by new
.
getToggleToolButtonActive :: (MonadIO m, IsToggleToolButton o) => o -> m Bool Source #
Get the value of the “active
” property.
When overloading is enabled, this is equivalent to
get
toggleToolButton #active
setToggleToolButtonActive :: (MonadIO m, IsToggleToolButton o) => o -> Bool -> m () Source #
Set the value of the “active
” property.
When overloading is enabled, this is equivalent to
set
toggleToolButton [ #active:=
value ]
Signals
toggled
type ToggleToolButtonToggledCallback = IO () Source #
Emitted whenever the toggle tool button changes state.
afterToggleToolButtonToggled :: (IsToggleToolButton a, MonadIO m) => a -> ((?self :: a) => ToggleToolButtonToggledCallback) -> m SignalHandlerId Source #
Connect a signal handler for the toggled signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
toggleToolButton #toggled 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.
onToggleToolButtonToggled :: (IsToggleToolButton a, MonadIO m) => a -> ((?self :: a) => ToggleToolButtonToggledCallback) -> m SignalHandlerId Source #
Connect a signal handler for the toggled signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
toggleToolButton #toggled callback