Archived
1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
cli-old/lib/widgets/container.rb

24 lines
390 B
Ruby
Raw Normal View History

2017-07-22 11:07:15 -04:00
# frozen_string_literal: true
module Widgets
class Container < Base
2017-07-25 10:44:45 -04:00
def subwin(x, y, width, height)
window.subwin height, width, y, x
end
2017-07-25 10:48:37 -04:00
private
2017-07-22 11:37:22 -04:00
def draw
children.each(&:render)
end
2017-07-24 18:34:50 -04:00
def focus
raise NotImplementedError, "#{self.class}#focus"
2017-07-22 11:37:22 -04:00
end
2017-07-24 18:34:50 -04:00
def children
raise NotImplementedError, "#{self.class}#children"
2017-07-22 11:45:56 -04:00
end
2017-07-22 11:07:15 -04:00
end
end