el h / SimpleGUI

Fork of SimpleGUI by Duncan McIntyre

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers GUI.cpp Source File

GUI.cpp

00001 #include "GUI.h"
00002 
00003 GUI::GUI(GraphicsContext* context) : _context(context), _rootWindow(context)
00004 {
00005     _context->eventDispatcher()->attachListener(&_rootWindow);
00006 }
00007 
00008 GraphicsContext* GUI::getGraphicsContext() {
00009     return _context;
00010 }
00011 
00012 Window* GUI::rootWindow() {
00013     return &_rootWindow;
00014 }
00015 
00016 void GUI::run() {
00017     _context->eventDispatcher()->pumpEvents();
00018     _rootWindow.draw();   
00019     
00020 }