]> git.tdb.fi Git - libs/gltk.git/blobdiff - examples/widgetdemo/widgetdemo.h
Rework how widget ownership works in Container
[libs/gltk.git] / examples / widgetdemo / widgetdemo.h
index f58272428c7e1613f8eaf8293ea64e947a315083..f6ef7f6996d070884f6b917101610da8ca6559e8 100644 (file)
@@ -2,6 +2,8 @@
 #define WIDGETDEMO_H_
 
 #include <msp/core/application.h>
+#include <msp/gl/device.h>
+#include <msp/gl/windowview.h>
 #include <msp/gltk/resources.h>
 #include <msp/gltk/root.h>
 #include <msp/graphics/simplewindow.h>
@@ -10,7 +12,9 @@
 class WidgetDemo: public Msp::RegisteredApplication<WidgetDemo>
 {
 private:
-       Msp::Graphics::SimpleGLWindow window;
+       Msp::Graphics::SimpleWindow window;
+       Msp::GL::Device gl_device;
+       Msp::GL::WindowView view;
        Msp::GLtk::Resources resources;
        Msp::GLtk::Root root;
        DemoSelector selector;
@@ -22,7 +26,8 @@ public:
 private:
        virtual void tick();
 
-       void add_demo(const std::string &, Msp::GLtk::Panel *);
+       template<typename T>
+       void add_demo(const std::string &);
 };
 
 #endif