gi-gtk-3.0.11: Gtk bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Objects.Scrollbar

Contents

Description

The Scrollbar widget is a horizontal or vertical scrollbar, depending on the value of the Orientable:orientation property.

The position of the thumb in a scrollbar is controlled by the scroll adjustments. See Adjustment for the fields in an adjustment - for Scrollbar, the Adjustment:value field represents the position of the scrollbar, which must be between the Adjustment:lower field and Adjustment:upper - Adjustment:page-size. The Adjustment:page-size field represents the size of the visible scrollable area. The Adjustment:step-increment and Adjustment:page-increment fields are properties when the user asks to step down (using the small stepper arrows) or page down (using for example the Page Down key).

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

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