Peridot::UI::Window
Inherits Reference / Object
Represents a termbox container used as a window within the UI
Constructors
new(title : String, dimensions : NamedTuple(x: Int32, y: Int32, w: Int32, h: Int32), lines : Array(String))
Sourcenew(title : String, dimensions : NamedTuple(x: Int32, y: Int32, w: Int32, h: Int32))
SourceInstance methods
add
Sourcecontainer
Sourcecurrent_line
Sourcedeselect
Sourcedraw
Sourcefilter(arg)
Sourcefiltered?
Sourcelines
Sourcelines=(lines : Array(String))
Sourceresize(dimensions)
Sourceselect
Sourceselected_line
Sourceselected_line=(selected_line : Int32)
Sourcetitle=(title : String)
Sourceunfilter
Sourcewrite_line(text : String, line : Int32, fg : Int32, bg : Int32)
Writes the line using the given colors
write_line(text : String, line : Int32)
Note: This will truncate the lines if they extend beyond the containers boundary
write_lines(lines : Array(String), selected_index : Int32)
Writes lines with the selected line highlighted
write_lines(lines : Array(String))
Note: This will truncate the lines if they extend beyond the containers boundary