--- /dev/null
+/* $Id$
+
+This file is part of libmspgltk
+Copyright © 2011 Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
+#ifndef MSP_GLTK_GRID_H_
+#define MSP_GLTK_GRID_H_
+
+#include "layout.h"
+
+namespace Msp {
+namespace GLtk {
+
+/**
+Arranges widgets in a grid.
+
+This layout class places widgets in a grid, lining up their edges in rows and
+columns. Widgets are placed on rows left-to-right and rows are placed top-to-
+bottom.
+
+The start of each row must be indicated manually. Individual cells can be
+skipped to leave them empty.
+*/
+class Grid: public Layout
+{
+private:
+ bool uniform;
+ std::vector<Slot *> columns;
+ unsigned cur_column;
+ bool first;
+ bool skipped;
+
+public:
+ Grid(bool = false);
+
+ void start_row();
+ void skip_cell();
+
+private:
+ Slot *create_slot(Widget &);
+};
+
+} // namespace GLtk
+} // namespace Msp
+
+#endif