Code Coverage
 
Lines
Covered
100.00% covered (success)
100.00%
19 / 19
1
module TheFox
1
module TermKit
1
class CellTableView < View
1
attr_reader :highlighted
1
def initialize(subview, name = nil)
145
name = "CellTableView_#{object_id}" if name.nil?
145
super(name)
145
@highlighted = false
145
add_subview(subview)
end
1
def highlighted=(highlighted)
69
if @highlighted != highlighted
29
if highlighted
20
foreground_color = :color_white
20
background_color = :color_blue
end
29
@grid_cache.each do |y_pos, row|
29
row.each do |x_pos, content|
104
content.foreground_color = foreground_color
104
content.background_color = background_color
end
end
end
69
@highlighted = highlighted
end
end
end
end