Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
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).
- newtype Scrollbar = Scrollbar (ManagedPtr Scrollbar)
- class GObject o => IsScrollbar o
- toScrollbar :: IsScrollbar o => o -> IO Scrollbar
- noScrollbar :: Maybe Scrollbar
- scrollbarNew :: (HasCallStack, MonadIO m, IsAdjustment a) => Orientation -> Maybe a -> m Scrollbar
Exported types
GObject Scrollbar Source # | |
IsImplementorIface Scrollbar Source # | |
IsObject Scrollbar Source # | |
IsWidget Scrollbar Source # | |
IsScrollbar Scrollbar Source # | |
IsRange Scrollbar Source # | |
IsOrientable Scrollbar Source # | |
IsBuildable Scrollbar Source # | |
((~) * info (ResolveScrollbarMethod t Scrollbar), MethodInfo * info Scrollbar p) => IsLabel t (Scrollbar -> p) Source # | |
((~) * info (ResolveScrollbarMethod t Scrollbar), MethodInfo * info Scrollbar p) => IsLabelProxy t (Scrollbar -> p) Source # | |
HasAttributeList * Scrollbar Source # | |
type AttributeList Scrollbar Source # | |
type SignalList Scrollbar Source # | |
class GObject o => IsScrollbar o Source #
toScrollbar :: IsScrollbar o => o -> IO Scrollbar Source #
Methods
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