class

Opal::UI::ScrollBar

Inherits Opal::UI::Control < Opal::UI::InputHookable < Opal::UI::Element < Opal::UI::Themable < Reference < Object

Focusable, interactive ScrollBar component supporting Vertical and Horizontal orientations, proportional thumb sizing, arrow stepper buttons, mouse dragging, and keyboard paging navigation.

Constructors

new(orientation : Orientation | Symbol = Orientation::Vertical, min_value : Int32 = 0, max_value : Int32 = 100, value : Int32 = 0, page_size : Int32 = 10, show_arrows : Bool = true, on_change : Proc(Int32, Nil) | Nil = nil)
Source
new(orientation : Orientation = Orientation::Vertical, min_value : Int32 = 0, max_value : Int32 = 100, value : Int32 = 0, page_size : Int32 = 10, show_arrows : Bool = true, &block : Int32 -> Nil) : ScrollBar
Source

Instance methods

arrow_down_char
Source
arrow_down_char=(arrow_down_char : Char | Nil)
Source
arrow_fg
Source
arrow_fg=(arrow_fg : Color | Nil)
Source
arrow_left_char
Source
arrow_left_char=(arrow_left_char : Char | Nil)
Source
arrow_right_char
Source
arrow_right_char=(arrow_right_char : Char | Nil)
Source
arrow_up_char
Source
arrow_up_char=(arrow_up_char : Char | Nil)
Source
handle_key(key : Terminal::KeyEvent) : Bool

Default key event handler. Override in subclasses if not using @default_input_proc.

Source
handle_mouse(event : Terminal::MouseEvent) : Bool

Default mouse event handler. Override in subclasses if not using @default_input_proc.

Source
max_value
Source
max_value=(max_value : Int32)
Source
min_value
Source
min_value=(min_value : Int32)
Source
on_change
Source
on_change
Source
on_change=(on_change : Proc(Int32, Nil) | Nil)
Source
orientation
Source
orientation=(orientation : Orientation)
Source
page_size
Source
page_size=(page_size : Int32)
Source
preferred_size(available_w : Int32, available_h : Int32) : Tuple(Int32, Int32)
Source
render(buffer : Buffer, x : Int32, y : Int32, width : Int32, height : Int32) : Nil
Source
scroll(delta : Int32) : self
Source
set_value(new_val : Int32) : self
Source
show_arrows=(show_arrows : Bool)
Source
show_arrows?
Source
thumb_bg
Source
thumb_bg=(thumb_bg : Color | Nil)
Source
thumb_char
Source
thumb_char=(thumb_char : Char | Nil)
Source
thumb_fg
Source
thumb_fg=(thumb_fg : Color | Nil)
Source
track_bg
Source
track_bg=(track_bg : Color | Nil)
Source
track_char
Source
track_char=(track_char : Char | Nil)
Source
track_fg

Manipulable theme properties and character swaps

Source
track_fg=(track_fg : Color | Nil)

Manipulable theme properties and character swaps

Source
value
Source
value=(value : Int32)
Source

Nested types