Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
The Scrollbar
widget is a horizontal or vertical scrollbar,
depending on the value of the Orientable
:orientation
property.
Its position and movement are controlled by the adjustment that is passed to
or created by scrollbarNew
. See Adjustment
for more details. The
Adjustment
:value
field sets the position of the thumb and must be between
Adjustment
:lower
and Adjustment
:upper
- Adjustment
:page-size
. The
Adjustment
:page-size
represents the size of the visible scrollable area.
The fields Adjustment
:step-increment
and Adjustment
:page-increment
fields are added to or subtracted from the Adjustment
:value
when the user
asks to move by a step (using e.g. the cursor arrow keys) or by a page (using
e.g. the Page Down/Up keys).
CSS nodes
plain code
scrollbar ╰── range[.fine-tune] ╰── trough ╰── slider
GtkScrollbar has a main CSS node with name scrollbar and a subnode for its contents. The main node gets the .horizontal or .vertical style classes applied, depending on the scrollbar's orientation.
The range node gets the style class .fine-tune added when the scrollbar is in 'fine-tuning' mode.
Other style classes that may be added to scrollbars inside ScrolledWindow
include the positional classes (.left, .right, .top, .bottom) and style
classes related to overlay scrolling (.overlay-indicator, .dragging, .hovering).
Accessibility
GtkScrollbar uses the GTK_ACCESSIBLE_ROLE_SCROLLBAR
role.
Synopsis
- newtype Scrollbar = Scrollbar (ManagedPtr Scrollbar)
- class (GObject o, IsDescendantOf Scrollbar o) => IsScrollbar o
- toScrollbar :: (MonadIO m, IsScrollbar o) => o -> m Scrollbar
- scrollbarGetAdjustment :: (HasCallStack, MonadIO m, IsScrollbar a) => a -> m Adjustment
- scrollbarNew :: (HasCallStack, MonadIO m, IsAdjustment a) => Orientation -> Maybe a -> m Scrollbar
- scrollbarSetAdjustment :: (HasCallStack, MonadIO m, IsScrollbar a, IsAdjustment b) => a -> Maybe b -> m ()
- clearScrollbarAdjustment :: (MonadIO m, IsScrollbar o) => o -> m ()
- constructScrollbarAdjustment :: (IsScrollbar o, MonadIO m, IsAdjustment a) => a -> m (GValueConstruct o)
- getScrollbarAdjustment :: (MonadIO m, IsScrollbar o) => o -> m Adjustment
- setScrollbarAdjustment :: (MonadIO m, IsScrollbar o, IsAdjustment a) => o -> a -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq Scrollbar Source # | |
GObject Scrollbar Source # | |
Defined in GI.Gtk.Objects.Scrollbar | |
ManagedPtrNewtype Scrollbar Source # | |
Defined in GI.Gtk.Objects.Scrollbar toManagedPtr :: Scrollbar -> ManagedPtr Scrollbar | |
TypedObject Scrollbar Source # | |
Defined in GI.Gtk.Objects.Scrollbar | |
HasParentTypes Scrollbar Source # | |
Defined in GI.Gtk.Objects.Scrollbar | |
IsGValue (Maybe Scrollbar) Source # | Convert |
Defined in GI.Gtk.Objects.Scrollbar gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Scrollbar -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Scrollbar) | |
type ParentTypes Scrollbar Source # | |
Defined in GI.Gtk.Objects.Scrollbar |
class (GObject o, IsDescendantOf Scrollbar o) => IsScrollbar o Source #
Type class for types which can be safely cast to Scrollbar
, for instance with toScrollbar
.
Instances
(GObject o, IsDescendantOf Scrollbar o) => IsScrollbar o Source # | |
Defined in GI.Gtk.Objects.Scrollbar |
toScrollbar :: (MonadIO m, IsScrollbar o) => o -> m Scrollbar Source #
Methods
Click to display all available methods, including inherited ones
Methods
actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, bindProperty, bindPropertyFull, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, dragCheckThreshold, errorBell, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateProperty, updateRelation, updateState, watchClosure.
Getters
getAccessibleRole, getAdjustment, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getBuildableId, getCanFocus, getCanTarget, getChildVisible, getClipboard, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getName, getNative, getNextSibling, getOpacity, getOrientation, getOverflow, getPangoContext, getParent, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth.
Setters
setAdjustment, setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDirection, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setLayoutManager, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOrientation, setOverflow, setParent, setProperty, setReceivesDefault, setSensitive, setSizeRequest, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.
getAdjustment
scrollbarGetAdjustment Source #
:: (HasCallStack, MonadIO m, IsScrollbar a) | |
=> a |
|
-> m Adjustment | Returns: the scrollbar's adjustment |
Returns the scrollbar's adjustment.
new
:: (HasCallStack, MonadIO m, IsAdjustment a) | |
=> Orientation |
|
-> Maybe a |
|
-> m Scrollbar | Returns: the new |
Creates a new scrollbar with the given orientation.
setAdjustment
scrollbarSetAdjustment Source #
:: (HasCallStack, MonadIO m, IsScrollbar a, IsAdjustment b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Makes the scrollbar use the given adjustment.
Properties
adjustment
No description available in the introspection data.
clearScrollbarAdjustment :: (MonadIO m, IsScrollbar o) => o -> m () Source #
Set the value of the “adjustment
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#adjustment
constructScrollbarAdjustment :: (IsScrollbar o, MonadIO m, IsAdjustment a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “adjustment
” property. This is rarely needed directly, but it is used by new
.
getScrollbarAdjustment :: (MonadIO m, IsScrollbar o) => o -> m Adjustment Source #
Get the value of the “adjustment
” property.
When overloading is enabled, this is equivalent to
get
scrollbar #adjustment
setScrollbarAdjustment :: (MonadIO m, IsScrollbar o, IsAdjustment a) => o -> a -> m () Source #
Set the value of the “adjustment
” property.
When overloading is enabled, this is equivalent to
set
scrollbar [ #adjustment:=
value ]