]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/graphic.h
Reorder class members
[libs/gltk.git] / source / graphic.h
index b93111348175874150190c1666c5d6896d6efe61..1647d2f811f49704ca3ce9795fdedaef637ebcb9 100644 (file)
@@ -1,3 +1,10 @@
+/* $Id$
+
+This file is part of libmspgltk
+Copyright © 2007  Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
 #ifndef MSP_GLTK_GRAPHIC_H_
 #define MSP_GLTK_GRAPHIC_H_
 
@@ -10,6 +17,9 @@ namespace GLtk {
 
 class Resources;
 
+/**
+Stores a single graphical element.  Graphics are used as parts of widgets.
+*/
 class Graphic
 {
 public:
@@ -31,6 +41,14 @@ public:
                void shadow();
        };
 
+private:
+       Sides border;
+       Sides shadow;
+       const GL::Texture2D *texture;
+       Geometry slice;
+       bool repeat;
+
+public:
        Graphic();
        const Sides &get_border() const { return border; }
        const Sides &get_shadow() const { return shadow; }
@@ -39,12 +57,6 @@ public:
        unsigned get_height() const { return slice.h; }
        void render(unsigned, unsigned) const;
 private:
-       Sides border;
-       Sides shadow;
-       const GL::Texture2D *texture;
-       Geometry slice;
-       bool repeat;
-
        void create_coords(float, float, float, float, float, std::vector<float> &) const;
        void create_texcoords(float, float, float, float, float, std::vector<float> &) const;
 };