class

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))
Source
new(title : String, dimensions : NamedTuple(x: Int32, y: Int32, w: Int32, h: Int32))
Source

Instance methods

container
Source
current_line
Source
deselect
Source
draw
Source
filter(arg)
Source
filtered?
Source
lines
Source
lines=(lines : Array(String))
Source
play

Defined Here to be overriden in child classes

Source
resize(dimensions)
Source
select
Source
selected_line
Source
selected_line=(selected_line : Int32)
Source
title=(title : String)
Source
unfilter
Source
update

Defined Here to be overriden in child classes

Source
write_line(text : String, line : Int32, fg : Int32, bg : Int32)

Writes the line using the given colors

Source
write_line(text : String, line : Int32)

Note: This will truncate the lines if they extend beyond the containers boundary

Source
write_lines(lines : Array(String), selected_index : Int32)

Writes lines with the selected line highlighted

Source
write_lines(lines : Array(String))

Note: This will truncate the lines if they extend beyond the containers boundary

Source