29 lines
608 B
C++
29 lines
608 B
C++
#ifdef GUIMODULE
|
|
#undef GUIMODULE
|
|
|
|
#include "utils/Module/Module.h"
|
|
#include "utils/Window/Window.h"
|
|
|
|
namespace Archimedes {
|
|
|
|
class GuiModule : public Module {
|
|
|
|
public:
|
|
typedef GuiModule* create_t(void*, App*);
|
|
|
|
GuiModule(void* h, App* a) : Module(h, a) {}
|
|
virtual ~GuiModule() { if(window) delete window; }
|
|
virtual void onLoad() = 0;
|
|
virtual void run() = 0;
|
|
|
|
Window* getWindow() { return window; }
|
|
void createWindow() { window = new Window(); }
|
|
|
|
protected:
|
|
Window* window;
|
|
};
|
|
}
|
|
|
|
|
|
#endif
|