[core/output] Add widget drawing

Add basic drawing of widgets. Each module instance returns a list of
widgets using the widgets() method which is then forwarded to the draw()
method of the configured output.

see #23
This commit is contained in:
Tobi-wan Kenobi 2016-12-04 12:53:18 +01:00
parent 6f52825ef0
commit 712d958e18
5 changed files with 41 additions and 1 deletions

View file

@ -48,7 +48,10 @@ class Engine(object):
"""Start the event loop"""
self._output.start()
while self.running():
pass
widgets = []
for module in self._modules:
widgets += module.widgets()
self._output.draw(widgets)
self._output.stop()