Class: Zgomot::UI::CCWindow

Inherits:
Object show all
Defined in:
lib/zgomot/ui/windows.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(height, top) ⇒ CCWindow

Returns a new instance of CCWindow.



216
217
218
219
220
221
222
# File 'lib/zgomot/ui/windows.rb', line 216

def initialize(height, top)
  @height = height
  @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

#heightObject (readonly)

Returns the value of attribute height.



215
216
217
# File 'lib/zgomot/ui/windows.rb', line 215

def height
  @height
end

#rowsObject (readonly)

Returns the value of attribute rows.



215
216
217
# File 'lib/zgomot/ui/windows.rb', line 215

def rows
  @rows
end

#widthsObject (readonly)

Returns the value of attribute widths.



215
216
217
# File 'lib/zgomot/ui/windows.rb', line 215

def widths
  @widths
end

Instance Method Details

#displayObject



223
224
225
226
# File 'lib/zgomot/ui/windows.rb', line 223

def display
  ccs = get_ccs
  (0..ccs.length-1).each{|i| rows[i].display(ccs[i], cc_color(ccs[i]))}
end