]> git.tdb.fi Git - libs/gltk.git/blob - source/lineararrangement.h
ce49b34edf38c99d9618a2f424cbcc73bafb2adb
[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 spacing(unsigned);
20                 void split();
21                 void uniform(bool);
22         };
23
24 protected:
25         Side primary;
26         Side opposite;
27         Edge next;
28         bool first;
29         bool split_here;
30         Side gravity;
31         bool internal_aligned;
32         bool uniform;
33         Widget *uniform_ref;
34         int next_spacing;
35
36         LinearArrangement(Layout &, Side);
37
38 public:
39         void set_uniform(bool);
40         void split();
41         void expand();
42         void spacing(unsigned);
43
44 protected:
45         virtual void process_widget(Widget &, Side, bool);
46         virtual void finish_widget(Widget &);
47         virtual void finish_slot();
48 };
49
50 } // namespace GLtk
51 } // namespace Msp
52
53 #endif