class

Tui::ScrollBar

Inherits Tui::Widget / Tui::Reactive / Reference / Object

Constructors

new(id : String | Nil = nil, orientation : Orientation = Orientation::Vertical)
Source

Instance methods

arrow_color
Source
arrow_color=(arrow_color : Color)
Source
click_tolerance
Source
click_tolerance=(click_tolerance : Int32)
Source
dragging?

Dragging state (for parent to know)

Source
hit_test?(x : Int32, y : Int32) : Bool

Check if coordinates are on the scrollbar (with tolerance)

Source
max_offset

Maximum scroll offset

Source
needed?

Check if scrollbar is needed

Source
offset
Source
offset=(offset : Int32)
Source
on_event(event : Event) : Bool

Override to handle events for this widget (target/bubble phase) Called after children have had a chance to handle the event

Source
on_scroll

Register scroll callback - called when user interacts with scrollbar

Source
orientation
Source
orientation=(orientation : Orientation)
Source
render(buffer : Buffer, clip : Rect) : Nil

Override to render widget content

Source
scroll_by(delta : Int32) : Nil

Public scroll methods

Source
scroll_to(new_offset : Int32) : Nil
Source
scroll_to_end
Source
scroll_to_start
Source
show_arrows=(show_arrows : Bool)

Settings

Source
show_arrows?

Settings

Source
thumb_active_color
Source
thumb_active_color=(thumb_active_color : Color)
Source
thumb_char
Source
thumb_char=(thumb_char : Char)
Source
thumb_color
Source
thumb_color=(thumb_color : Color)
Source
thumb_info

Get thumb info for external use

Source
total
Source
total=(total : Int32)
Source
track_char_h
Source
track_char_h=(track_char_h : Char)
Source
track_char_v

Characters

Source
track_char_v=(track_char_v : Char)

Characters

Source
track_color

Colors

Source
track_color=(track_color : Color)

Colors

Source
update(total : Int32, visible : Int32, offset : Int32) : Nil

Update scrollbar state (called by parent widget)

Source
use_overlay=(use_overlay : Bool)
Source
use_overlay?
Source
viewport
Source
viewport=(viewport : Int32)
Source

Nested types