]> git.tdb.fi Git - libs/gltk.git/blob - source/stack.h
Add a Stack arrangement
[libs/gltk.git] / source / stack.h
1 #ifndef MSP_GLTK_STACK_H_
2 #define MSP_GLTK_STACK_H_
3
4 #include <msp/datafile/objectloader.h>
5 #include "arrangement.h"
6
7 namespace Msp {
8 namespace GLtk {
9
10 /**
11 Arranges widgets on top of one another.  This can be useful in implementing a
12 tabbed view where only one tab is visible at a time.
13 */
14 class Stack: public Arrangement
15 {
16 public:
17         class Loader: public DataFile::ObjectLoader<Stack>
18         {
19         public:
20                 Loader(Stack &);
21         };
22
23         Stack(Layout &);
24
25 private:
26         virtual void process_widget(Widget &, Side, bool);
27         virtual void finish_widget(Widget &);
28         virtual void finish_slot() { }
29 };
30
31 } // namespace GLtk
32 } // namespace Msp
33
34 #endif