]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/grid.h
Clear saved input focus if the widget is removed from the container
[libs/gltk.git] / source / grid.h
index 621a29435318317be9aa7d00ea930b9efb93d3c2..4ed43d56442f59d0b475ba7b3cf6fd097b676225 100644 (file)
@@ -3,11 +3,12 @@
 
 #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>
@@ -29,8 +30,8 @@ private:
        std::vector<Column> columns;
        Edge row_top;
        Edge row_bottom;
-       bool first_row;
-       unsigned column;
+       bool first_row = true;
+       unsigned column = 0;
 
 public:
        Grid(Layout &, unsigned);
@@ -39,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();
 };