Foundation classes for a basic GUI implementing simple widgets and events
Dependents: TouchScreenGUIDemo
Diff: Widgets/Window.cpp
- Revision:
- 17:5184762fda6c
- Parent:
- 15:e69fd74d42e4
- Child:
- 18:d849f3ada858
--- a/Widgets/Window.cpp Sun May 22 14:40:29 2016 +0000 +++ b/Widgets/Window.cpp Sun May 22 16:35:23 2016 +0000 @@ -2,12 +2,14 @@ Window::Window(GraphicsContext* context) : Widget(context) { + setSize(context->display()->width(), context->display()->height()); } void Window::attach(Widget *widget) { _widgets.append(widget); widget->setParent(this); + widget->show(); dirtyAll(); damage(); } @@ -15,7 +17,7 @@ void Window::detach(Widget *widget) { - widget->clear(); + widget->hide(); _widgets.remove(widget); widget->setParent(NULL); dirty();