class

Opal::UI::Slider

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

Interactive numeric slider control supporting mouse dragging, wheel scrolling, arrow navigation, custom glyphs, and theming.

Constructors

new(value : Number = 0.0, min : Number = 0.0, max : Number = 100.0, step : Number = 1.0, label : String | Nil = nil, show_value : Bool = true, disabled : Bool = false, on_change : Proc(Float64, Nil) | Nil = nil)
Source
new(value : Number = 0.0, min : Number = 0.0, max : Number = 100.0, step : Number = 1.0, label : String | Nil = nil, show_value : Bool = true, disabled : Bool = false, &block : Float64 -> Nil) : Slider
Source

Instance methods

disabled=(disabled : Bool)
Source
disabled?
Source
fill_char
Source
fill_char=(fill_char : Char)
Source
fill_fg
Source
fill_fg=(fill_fg : Color | Nil)
Source
handle_key(event : 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
label
Source
label=(label : String | Nil)
Source
label_fg
Source
label_fg=(label_fg : Color | Nil)
Source
max=(max : Float64)
Source
min=(min : Float64)
Source
on_change
Source
on_change
Source
on_change=(on_change : Proc(Float64, Nil) | Nil)
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
show_value=(show_value : Bool)
Source
show_value?
Source
step
Source
step=(step : Float64)
Source
thumb_char
Source
thumb_char=(thumb_char : Char)
Source
thumb_fg
Source
thumb_fg=(thumb_fg : Color | Nil)
Source
track_char

Customizable theme and styling

Source
track_char=(track_char : Char)

Customizable theme and styling

Source
track_fg
Source
track_fg=(track_fg : Color | Nil)
Source
value
Source
value=(val : Number)
Source
value_fg
Source
value_fg=(value_fg : Color | Nil)
Source