class Opal::UI::Viewport

Overview

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

Defined in:

opal/ui/components/viewport.cr

Constructors

Instance Method Summary

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) #

[View source]

Instance Method Detail

def content : String #

[View source]
def content=(content : String) #

[View source]
def fg : Color #

[View source]
def fg=(fg : Color) #

[View source]
def offset_y : Int32 #

[View source]
def offset_y=(offset_y : Int32) #

[View source]
def preferred_size(available_w : Int32, available_h : Int32) : Tuple(Int32, Int32) #

[View source]
def render(buffer : Buffer, x : Int32, y : Int32, width : Int32, height : Int32) : Nil #

[View source]
def scroll_down(lines : Int32 = 1) : Nil #

[View source]
def scroll_up(lines : Int32 = 1) : Nil #

[View source]
def show_scrollbar=(show_scrollbar : Bool) #

[View source]
def show_scrollbar? : Bool #

[View source]