class

Opal::UI::Viewport

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

Scrollable viewport element displaying a subset of content with an optional scroll indicator.

Constructors

new(content : String = "", offset_y : Int32 = 0, fg : Color | Symbol | String = Color.none, show_scrollbar : Bool = true)
Source

Instance methods

content
Source
content=(content : String)
Source
fg=(fg : Color)
Source
offset_y
Source
offset_y=(offset_y : 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_down(lines : Int32 = 1) : Nil
Source
scroll_up(lines : Int32 = 1) : Nil
Source
show_scrollbar=(show_scrollbar : Bool)
Source
show_scrollbar?
Source