X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgrid.h;h=4ed43d56442f59d0b475ba7b3cf6fd097b676225;hb=d10d1de6d17c285c63d7b3cea549017aaa1ddb01;hp=0e71748b6a71bdd84da98bdd31c8bfa3957094c9;hpb=646af3dd91a6ca981572a5b69a0f0bd205d9af49;p=libs%2Fgltk.git diff --git a/source/grid.h b/source/grid.h index 0e71748..4ed43d5 100644 --- a/source/grid.h +++ b/source/grid.h @@ -1,13 +1,25 @@ #ifndef MSP_GLTK_GRID_H_ #define MSP_GLTK_GRID_H_ +#include #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 + { + public: + Loader(Grid &); + private: + void next_row(); + void skip(); + }; + private: struct Column { @@ -18,8 +30,8 @@ private: std::vector columns; Edge row_top; Edge row_bottom; - bool first_row; - unsigned column; + bool first_row = true; + unsigned column = 0; public: Grid(Layout &, unsigned); @@ -28,9 +40,9 @@ public: 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(); };