]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/grid.h
Style and comment updates
[libs/gltk.git] / source / grid.h
index 0e71748b6a71bdd84da98bdd31c8bfa3957094c9..01cfffaab4e95a96060141e3204e2b7c793eda31 100644 (file)
@@ -1,13 +1,26 @@
 #ifndef MSP_GLTK_GRID_H_
 #define MSP_GLTK_GRID_H_
 
+#include <msp/datafile/objectloader.h>
 #include "arrangement.h"
+#include "mspgltk_api.h"
 
 namespace Msp {
 namespace GLtk {
 
-class Grid: public Arrangement
+class MSPGLTK_API Grid: public Arrangement
 {
+public:
+       class Loader: public DataFile::ObjectLoader<Grid>
+       {
+       public:
+               Loader(Grid &);
+
+       private:
+               void next_row();
+               void skip();
+       };
+
 private:
        struct Column
        {
@@ -18,19 +31,19 @@ private:
        std::vector<Column> columns;
        Edge row_top;
        Edge row_bottom;
-       bool first_row;
-       unsigned column;
+       bool first_row = true;
+       std::size_t column = 0;
 
 public:
-       Grid(Layout &, unsigned);
+       Grid(Layout &, std::size_t);
 
        void skip();
        void next_row();
 
 private:
-       virtual void process_widget(Widget &, Side, bool);
-       virtual void finish_widget(Widget &);
-       virtual void finish_slot();
+       void process_widget(Widget &, Side, bool) override;
+       void finish_widget(Widget &) override;
+       void finish_slot() override;
        void finish_row();
 };