Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GI.Gtk.Objects.Scrollbar
Description
The tScrollbar
widget is a horizontal or vertical scrollbar,
depending on the value of the tOrientable
:orientation
property.
Its position and movement are controlled by the adjustment that is passed to
or created by scrollbarNew
. See tAdjustment
for more details. The
tAdjustment
:value
field sets the position of the thumb and must be between
tAdjustment
:lower
and tAdjustment
:upper
- tAdjustment
:page-size
. The
tAdjustment
:page-size
represents the size of the visible scrollable area.
The fields tAdjustment
:step-increment
and tAdjustment
:page-increment
fields are added to or subtracted from the tAdjustment
: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 tScrolledWindow
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
- noScrollbar :: Maybe 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 Methods gobjectType :: IO GType | |
IsGValue Scrollbar Source # | Convert |
Defined in GI.Gtk.Objects.Scrollbar | |
HasParentTypes Scrollbar Source # | |
Defined in GI.Gtk.Objects.Scrollbar | |
type ParentTypes Scrollbar Source # | |
Defined in GI.Gtk.Objects.Scrollbar type ParentTypes Scrollbar = Range ': (Widget ': (Object ': (ImplementorIface ': (Buildable ': (Orientable ': ([] :: [Type])))))) |
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 #
noScrollbar :: Maybe Scrollbar Source #
A convenience alias for Nothing
:: Maybe
Scrollbar
.
Methods
Overloaded methods
new
Arguments
:: (HasCallStack, MonadIO m, IsAdjustment a) | |
=> Orientation |
|
-> Maybe a |
|
-> m Scrollbar | Returns: the new t |
Creates a new scrollbar with the given orientation.
Since: 3.0