Class: Zgomot::UI::CCWindow
Instance Attribute Summary collapse
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#rows ⇒ Object
readonly
Returns the value of attribute rows.
-
#top ⇒ Object
readonly
Returns the value of attribute top.
-
#widths ⇒ Object
readonly
Returns the value of attribute widths.
Instance Method Summary collapse
- #display ⇒ Object
-
#initialize(height, top) ⇒ CCWindow
constructor
A new instance of CCWindow.
Constructor Details
#initialize(height, top) ⇒ CCWindow
Returns a new instance of CCWindow.
255 256 257 258 259 260 261 |
# File 'lib/zgomot/ui/windows.rb', line 255 def initialize(height, top) @height, @top = height, top @widths = Zgomot::UI::Output::CC_OUTPUT_FORMAT_WIDTHS TitleWindow.new('Input CCs', COLOR_BORDER, top, COLOR_BLUE) TableRowWindow.new(Zgomot::UI::Output::CC_HEADER, widths, COLOR_BORDER, top + 3, COLOR_BORDER) add_ccs(top + 3) end |
Instance Attribute Details
#height ⇒ Object (readonly)
Returns the value of attribute height.
254 255 256 |
# File 'lib/zgomot/ui/windows.rb', line 254 def height @height end |
#rows ⇒ Object (readonly)
Returns the value of attribute rows.
254 255 256 |
# File 'lib/zgomot/ui/windows.rb', line 254 def rows @rows end |
#top ⇒ Object (readonly)
Returns the value of attribute top.
254 255 256 |
# File 'lib/zgomot/ui/windows.rb', line 254 def top @top end |
#widths ⇒ Object (readonly)
Returns the value of attribute widths.
254 255 256 |
# File 'lib/zgomot/ui/windows.rb', line 254 def widths @widths end |
Instance Method Details
#display ⇒ Object
262 263 264 265 266 267 268 269 |
# File 'lib/zgomot/ui/windows.rb', line 262 def display ccs = get_ccs if ccs.length == rows.length (0..ccs.length-1).each{|i| rows[i].display(ccs[i], cc_color(ccs[i]))} else add_ccs(top + 3) end end |