]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/arrangement.h
Combine common parts of Column and Row into LinearArrangement
[libs/gltk.git] / source / arrangement.h
index 284d3f7edd7079279848ce4f9e1371e29d484b77..fc3ec8226cfed99c59b6676ee3834797fb273409 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GLTK_ARRANGEMENT_H_
 
 #include <list>
+#include <stdexcept>
 #include "layout.h"
 
 namespace Msp {
@@ -9,6 +10,13 @@ namespace GLtk {
 
 class Widget;
 
+class arrangement_error: public std::logic_error
+{
+public:
+       arrangement_error(const std::string &w): std::logic_error(w) { }
+       virtual ~arrangement_error() throw() { }
+};
+
 class Arrangement
 {
 protected:
@@ -50,6 +58,9 @@ protected:
        const Edge &get_edge(Side s) const { return edges[s]; }
        void add_constraint(Widget &, Layout::ConstraintType, Side);
        void add_constraint(Widget &, Layout::ConstraintType, const Edge &);
+
+       static Layout::ConstraintType get_order_constraint(Side, bool);
+       static Layout::ConstraintType get_align_constraint(Side);
 };
 
 } // namespace GLtk