gi-gtk-3.0.32: Gtk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.Scrollbar

Description

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

Exported types

newtype Scrollbar Source #

Memory-managed wrapper type.

Instances

Instances details
Eq Scrollbar Source # 
Instance details

Defined in GI.Gtk.Objects.Scrollbar

IsGValue Scrollbar Source #

Convert Scrollbar to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.Scrollbar

GObject Scrollbar Source # 
Instance details

Defined in GI.Gtk.Objects.Scrollbar

Methods

gobjectType :: IO GType #

HasParentTypes Scrollbar Source # 
Instance details

Defined in GI.Gtk.Objects.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.

noScrollbar :: Maybe Scrollbar Source #

A convenience alias for Nothing :: Maybe Scrollbar.

Methods

Overloaded methods

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 Scrollbar.

Creates a new scrollbar with the given orientation.

Since: 3.0