]> git.tdb.fi Git - libs/gltk.git/blob - source/lineararrangement.h
Combine common parts of Column and Row into LinearArrangement
[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 split();
19         };
20
21 protected:
22         Side primary;
23         Side opposite;
24         Edge next;
25         bool first;
26         bool split_here;
27         Side gravity;
28
29         LinearArrangement(Layout &, Side);
30
31 public:
32         void split();
33         void expand();
34
35 protected:
36         virtual void process_widget(Widget &, Side, bool);
37         virtual void finish_slot();
38 };
39
40 } // namespace GLtk
41 } // namespace Msp
42
43 #endif