]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/row.h
Support specifying layouts in datafiles
[libs/gltk.git] / source / row.h
index f8ebe6cc732ffd4c574380d8fbb899dec7f31fb5..58480db013c16da4e5924f10f57d11beef8b5c74 100644 (file)
@@ -1,31 +1,38 @@
-/* $Id$
-
-This file is part of libmspgltk
-Copyright © 2011  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #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