]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/widget.h
Loader improvements
[libs/gltk.git] / source / widget.h
index bc9b90a69696a8e944af0d88042ad318ab481ec1..64db74e85a15d4b7f4a06fe5577a29140048966d 100644 (file)
@@ -9,6 +9,7 @@ Distributed under the LGPL
 #define MSP_GLTK_WIDGET_H_
 
 #include <string>
+#include <msp/datafile/objectloader.h>
 #include "geometry.h"
 #include "state.h"
 
@@ -29,14 +30,10 @@ class Widget
        friend class Container;
 
 public:
-       class Loader: public Msp::DataFile::Loader
+       class Loader: public DataFile::ObjectLoader<Widget>
        {
-       protected:
-               Widget &wdg;
-
        public:
                Loader(Widget &);
-               Widget &get_object() const { return wdg; }
        private:
                void position(int, int);
                void size(unsigned, unsigned);