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

GI.Gtk.Objects.Scrollbar

Description

The GtkScrollbar widget is a horizontal or vertical scrollbar.

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:pageSize. The Adjustment:pageSize represents the size of the visible scrollable area.

The fields Adjustment:stepIncrement and Adjustment:pageIncrement 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

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 AccessibleRoleScrollbar role.

Synopsis

Exported types

newtype Scrollbar Source #

Memory-managed wrapper type.

Constructors

Scrollbar (ManagedPtr Scrollbar) 

Instances

Instances details
Eq Scrollbar Source # 
Instance details

Defined in GI.Gtk.Objects.Scrollbar

GObject Scrollbar Source # 
Instance details

Defined in GI.Gtk.Objects.Scrollbar

ManagedPtrNewtype Scrollbar Source # 
Instance details

Defined in GI.Gtk.Objects.Scrollbar

Methods

toManagedPtr :: Scrollbar -> ManagedPtr Scrollbar

TypedObject Scrollbar Source # 
Instance details

Defined in GI.Gtk.Objects.Scrollbar

Methods

glibType :: IO GType

HasParentTypes Scrollbar Source # 
Instance details

Defined in GI.Gtk.Objects.Scrollbar

IsGValue (Maybe Scrollbar) Source #

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

Instance details

Defined in GI.Gtk.Objects.Scrollbar

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes Scrollbar Source # 
Instance details

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

Instances details
(GObject o, IsDescendantOf Scrollbar o) => IsScrollbar o Source # 
Instance details

Defined in GI.Gtk.Objects.Scrollbar

toScrollbar :: (MonadIO m, IsScrollbar o) => o -> m Scrollbar Source #

Cast to Scrollbar, 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

actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, announce, bindProperty, bindPropertyFull, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, 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, updateNextAccessibleSibling, updateProperty, updateRelation, updateState, watchClosure.

Getters

getAccessibleParent, getAccessibleRole, getAdjustment, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getBaseline, getBounds, getBuildableId, getCanFocus, getCanTarget, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOrientation, getOverflow, getPangoContext, getParent, getPlatformState, 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

setAccessibleParent, 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 #

Arguments

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

self: a GtkScrollbar

-> m Adjustment

Returns: the scrollbar's adjustment

Returns the scrollbar's adjustment.

new

scrollbarNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsAdjustment a) 
=> Orientation

orientation: the scrollbar’s orientation.

-> Maybe a

adjustment: the Adjustment to use, or Nothing to create a new adjustment.

-> m Scrollbar

Returns: the new GtkScrollbar.

Creates a new scrollbar with the given orientation.

setAdjustment

scrollbarSetAdjustment Source #

Arguments

:: (HasCallStack, MonadIO m, IsScrollbar a, IsAdjustment b) 
=> a

self: a GtkScrollbar

-> Maybe b

adjustment: the adjustment to set

-> m () 

Makes the scrollbar use the given adjustment.

Properties

adjustment

The GtkAdjustment controlled by this scrollbar.

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 ]