]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/part.h
Rework exceptions and use maputils
[libs/gltk.git] / source / part.h
index edc8f77a5b84230d883d277f5bf29c2e77fe6ef9..b4ada58e96bdcc8862b3b76495cdcf231fedbd32 100644 (file)
@@ -1,17 +1,8 @@
-/* $Id$
-
-This file is part of libmspgltk
-Copyright © 2007  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #ifndef MSP_GLTK_PART_H_
 #define MSP_GLTK_PART_H_
 
-#include <map>
 #include <string>
-#include <msp/datafile/loader.h>
-//#include "alignment.h"
+#include <msp/datafile/objectloader.h>
 #include "geometry.h"
 #include "state.h"
 
@@ -27,12 +18,8 @@ Defines a single graphical element of a widget style.
 class Part
 {
 public:
-       class Loader: public DataFile::Loader
+       class Loader: public DataFile::CollectionObjectLoader<Part>
        {
-       private:
-               Part &part;
-               Resources &res;
-
        public:
                Loader(Part &, Resources &);
                ~Loader();
@@ -41,6 +28,7 @@ public:
                void align(float, float);
                void fill(float, float);
                void margin();
+               void size(unsigned, unsigned);
        };
 
 private:
@@ -59,7 +47,6 @@ public:
        const Alignment &get_alignment() const { return align; }
        void render(const Geometry &, State) const;
 };
-typedef std::list<Part> PartSeq;
 
 } // namespace GLtk
 } // namespace Msp