]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/graphic.h
Add API declarations
[libs/gltk.git] / source / graphic.h
index f457d3690b297a91d989dc92ed9ce5fa634268d4..4fed368938016e8613e4a6132155d932889d48a0 100644 (file)
@@ -3,8 +3,9 @@
 
 #include <msp/gl/primitivebuilder.h>
 #include <msp/gl/texture2d.h>
-#include <msp/datafile/loader.h>
+#include <msp/datafile/objectloader.h>
 #include "geometry.h"
+#include "mspgltk_api.h"
 
 namespace Msp {
 namespace GLtk {
@@ -14,20 +15,14 @@ class Resources;
 /**
 Stores a single graphical element.  Graphics are used as parts of widgets.
 */
-class Graphic
+class MSPGLTK_API 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);