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, if present, the
stepper buttons) or by a page (using e.g. the Page Down/Up keys).
CSS nodes
plain code
scrollbar[.fine-tune] ╰── contents ├── [button.up] ├── [button.down] ├── trough │ ╰── slider ├── [button.up] ╰── [button.down]
GtkScrollbar has a main CSS node with name scrollbar and a subnode for its contents, with subnodes named trough and slider.
The main node gets the style class .fine-tune added when the scrollbar is in 'fine-tuning' mode.
If steppers are enabled, they are represented by up to four additional subnodes with name button. These get the style classes .up and .down to indicate in which direction they are moving.
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).
Synopsis
- newtype Scrollbar = Scrollbar (ManagedPtr Scrollbar)
- class (GObject o, IsDescendantOf Scrollbar o) => IsScrollbar o
- toScrollbar :: (MonadIO m, IsScrollbar o) => o -> m Scrollbar
- scrollbarNew :: (HasCallStack, MonadIO m, IsAdjustment a) => Orientation -> Maybe a -> m Scrollbar
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
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, getAdjustment, getAllocatedBaseline, getAllocatedHeight, getAllocatedSize, getAllocatedWidth, getAllocation, getAncestor, getAppPaintable, getCanDefault, getCanFocus, getChildRequisition, getChildVisible, getClip, getClipboard, getCompositeName, getData, getDeviceEnabled, getDeviceEvents, getDirection, getDisplay, getDoubleBuffered, getEvents, getFillLevel, getFlippable, getFocusOnClick, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHasWindow, getHexpand, getHexpandSet, getInternalChild, getInverted, getLowerStepperSensitivity, getMapped, getMarginBottom, getMarginEnd, getMarginLeft, getMarginRight, getMarginStart, getMarginTop, getMinSliderSize, getModifierMask, getModifierStyle, getName, getNoShowAll, getOpacity, getOrientation, getPangoContext, getParent, getParentWindow, getPath, getPointer, getPreferredHeight, getPreferredHeightAndBaselineForWidth, getPreferredHeightForWidth, getPreferredSize, getPreferredWidth, getPreferredWidthForHeight, getProperty, getQdata, getRangeRect, getRealized, getReceivesDefault, getRequestMode, getRequisition, getRestrictToFillLevel, getRootWindow, getRoundDigits, getScaleFactor, getScreen, getSensitive, getSettings, getShowFillLevel, getSizeRequest, getSliderRange, getSliderSizeFixed, getState, getStateFlags, getStyle, getStyleContext, getSupportMultidevice, getTemplateChild, getTooltipMarkup, getTooltipText, getTooltipWindow, getToplevel, getUpperStepperSensitivity, getValign, getValignWithBaseline, getValue, getVexpand, getVexpandSet, getVisible, getVisual, getWindow.
Setters
setAccelPath, setAdjustment, setAllocation, setAppPaintable, setBuildableProperty, setCanDefault, setCanFocus, setChildVisible, setClip, setCompositeName, setData, setDataFull, setDeviceEnabled, setDeviceEvents, setDirection, setDoubleBuffered, setEvents, setFillLevel, setFlippable, setFocusOnClick, setFontMap, setFontOptions, setHalign, setHasTooltip, setHasWindow, setHexpand, setHexpandSet, setIncrements, setInverted, setLowerStepperSensitivity, setMapped, setMarginBottom, setMarginEnd, setMarginLeft, setMarginRight, setMarginStart, setMarginTop, setMinSliderSize, setName, setNoShowAll, setOpacity, setOrientation, setParent, setParentWindow, setProperty, setRange, setRealized, setReceivesDefault, setRedrawOnAllocate, setRestrictToFillLevel, setRoundDigits, setSensitive, setShowFillLevel, setSizeRequest, setSliderSizeFixed, setState, setStateFlags, setStyle, setSupportMultidevice, setTooltipMarkup, setTooltipText, setTooltipWindow, setUpperStepperSensitivity, setValign, setValue, setVexpand, setVexpandSet, setVisible, setVisual, setWindow.
new
:: (HasCallStack, MonadIO m, IsAdjustment a) | |
=> Orientation |
|
-> Maybe a |
|
-> m Scrollbar | Returns: the new |
Creates a new scrollbar with the given orientation.
Since: 3.0