class Peridot::UI::Window
- Peridot::UI::Window
- Reference
- Object
Overview
Represents a termbox container used as a window within the UI
Direct Known Subclasses
- Peridot::UI::AlbumWindow
- Peridot::UI::ArtistWindow
- Peridot::UI::PlaylistWindow
- Peridot::UI::QueueWindow
- Peridot::UI::SongWindow
- Peridot::UI::StatusWindow
Defined in:
ui.crConstructors
- .new(title : String, dimensions : NamedTuple(x: Int32, y: Int32, w: Int32, h: Int32), lines : Array(String))
- .new(title : String, dimensions : NamedTuple(x: Int32, y: Int32, w: Int32, h: Int32))
Instance Method Summary
- #add
- #container : Peridot::TContainer
- #current_line : String
- #deselect
- #draw
- #filter(arg)
- #filtered? : Bool
- #lines : Array(String)
- #lines=(lines : Array(String))
-
#play
Defined Here to be overriden in child classes
- #resize(dimensions)
- #select
- #selected_line : Int32
- #selected_line=(selected_line : Int32)
- #title=(title : String)
- #unfilter
-
#update
Defined Here to be overriden in child classes
-
#write_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
Constructor Detail
def self.new(title : String, dimensions : NamedTuple(x: Int32, y: Int32, w: Int32, h: Int32), lines : Array(String))
#
def self.new(title : String, dimensions : NamedTuple(x: Int32, y: Int32, w: Int32, h: Int32))
#
Instance Method Detail
def write_line(text : String, line : Int32, fg : Int32, bg : Int32)
#
Writes the line using the given colors
def write_line(text : String, line : Int32)
#
Note: This will truncate the lines if they extend beyond the containers boundary
def write_lines(lines : Array(String), selected_index : Int32)
#
Writes lines with the selected line highlighted
def write_lines(lines : Array(String))
#
Note: This will truncate the lines if they extend beyond the containers boundary