#define MSP_GLTK_ARRANGEMENT_H_
#include <list>
+#include <stdexcept>
#include "layout.h"
namespace Msp {
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:
bool empty() { return widgets.empty(); }
void clear();
void add(Widget &, bool);
+ void align();
};
Layout &layout;
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