]> git.tdb.fi Git - libs/gltk.git/blob - source/lineararrangement.h
Support widget expansion in linear layouts
[libs/gltk.git] / source / lineararrangement.h
1 #ifndef MSP_GLTK_LINEARARRANGEMENT_H_
2 #define MSP_GLTK_LINEARARRANGEMENT_H_
3
4 #include <msp/datafile/objectloader.h>
5 #include "arrangement.h"
6
7 namespace Msp {
8 namespace GLtk {
9
10 class LinearArrangement: public Arrangement
11 {
12 public:
13         class Loader: public DataFile::ObjectLoader<LinearArrangement>
14         {
15         public:
16                 Loader(LinearArrangement &);
17         private:
18                 void expand();
19                 void split();
20         };
21
22 protected:
23         Side primary;
24         Side opposite;
25         Edge next;
26         bool first;
27         bool split_here;
28         Side gravity;
29
30         LinearArrangement(Layout &, Side);
31
32 public:
33         void split();
34         void expand();
35
36 protected:
37         virtual void process_widget(Widget &, Side, bool);
38         virtual void finish_slot();
39 };
40
41 } // namespace GLtk
42 } // namespace Msp
43
44 #endif