]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/graphic.h
Implement mouse wheel scrolling in List
[libs/gltk.git] / source / graphic.h
index f457d3690b297a91d989dc92ed9ce5fa634268d4..1ae0d5e22d8766a718bbd828329be7bb334663dd 100644 (file)
@@ -3,7 +3,7 @@
 
 #include <msp/gl/primitivebuilder.h>
 #include <msp/gl/texture2d.h>
-#include <msp/datafile/loader.h>
+#include <msp/datafile/objectloader.h>
 #include "geometry.h"
 
 namespace Msp {
@@ -17,17 +17,11 @@ Stores a single graphical element.  Graphics are used as parts of widgets.
 class Graphic
 {
 public:
-       class Loader: public DataFile::Loader
+       class Loader: public DataFile::CollectionObjectLoader<Graphic, Resources>
        {
-       private:
-               Graphic &graph;
-               Resources &res;
-
        public:
-               typedef Resources Collection;
-
                Loader(Graphic &, Resources &);
-               Graphic &get_object() const { return graph; }
+
        private:
                void texture(const std::string &);
                void slice(unsigned, unsigned, unsigned, unsigned);