class
Opal::UI::Viewport
- Opal::UI::Viewport
- Opal::UI::Element
- Reference
- Object
Overview
Scrollable viewport element displaying a subset of content with an optional scroll indicator.
Defined in:
opal/ui/components/viewport.crConstructors
Instance Method Summary
- #content : String
- #content=(content : String)
- #fg : Color
- #fg=(fg : Color)
- #offset_y : Int32
- #offset_y=(offset_y : Int32)
- #preferred_size(available_w : Int32, available_h : Int32) : Tuple(Int32, Int32)
- #render(buffer : Buffer, x : Int32, y : Int32, width : Int32, height : Int32) : Nil
- #scroll_down(lines : Int32 = 1) : Nil
- #scroll_up(lines : Int32 = 1) : Nil
- #show_scrollbar=(show_scrollbar : Bool)
- #show_scrollbar? : Bool
Instance methods inherited from class Opal::UI::Element
preferred_size(available_w : Int32, available_h : Int32) : Tuple(Int32, Int32)
preferred_size,
render(buffer : Buffer, x : Int32, y : Int32, width : Int32, height : Int32) : Nil
render
Constructor Detail
def self.new(content : String = "", offset_y : Int32 = 0, fg : Color | Symbol | String = Color.none, show_scrollbar : Bool = true)
#