]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/row.h
Support specifying layouts in datafiles
[libs/gltk.git] / source / row.h
index adc2a6e966c963cf4a119d049011ceac1468fc8c..58480db013c16da4e5924f10f57d11beef8b5c74 100644 (file)
@@ -1,24 +1,38 @@
 #ifndef MSP_GLTK_ROW_H_
 #define MSP_GLTK_ROW_H_
 
-#include "layout.h"
+#include <msp/datafile/objectloader.h>
+#include "arrangement.h"
 
 namespace Msp {
 namespace GLtk {
 
-/**
-Arranges widgets in a single row.
-*/
-class Row: public Layout
+class Row: public Arrangement
 {
+public:
+       class Loader: public DataFile::ObjectLoader<Row>
+       {
+       public:
+               Loader(Row &);
+       private:
+               void split();
+       };
+
 private:
-       bool uniform;
+       Edge next_right;
+       bool first;
+       bool split_here;
+       int gravity;
 
 public:
-       Row(bool = false);
+       Row(Layout &);
+
+       void split();
 
 private:
-       virtual Slot *create_slot(Widget &);
+       virtual void process_widget(Widget &, Side, bool);
+       virtual void finish_widget(Widget &);
+       virtual void finish_slot();
 };
 
 } // namespace GLtk