aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/LayerItem.hh
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2011-02-23 21:49:27 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2011-02-23 21:49:27 (GMT)
commit9616a676d869b8f67742da99d55e9327ea867166 (patch)
tree32d8daf4d851b4038e7098f88570891c0727bd7b /src/FbTk/LayerItem.hh
parent813e6c4402b7d13a9e7b1ce3e391bc4c8d894ea3 (diff)
downloadfluxbox-9616a676d869b8f67742da99d55e9327ea867166.zip
fluxbox-9616a676d869b8f67742da99d55e9327ea867166.tar.bz2
renamed FbTk::XLayer to FbTk::Layer and FbTk::XLayerItem to FbTk::LayerItem
Diffstat (limited to 'src/FbTk/LayerItem.hh')
-rw-r--r--src/FbTk/LayerItem.hh62
1 files changed, 51 insertions, 11 deletions
diff --git a/src/FbTk/LayerItem.hh b/src/FbTk/LayerItem.hh
index 945bb9a..5d1035e 100644
--- a/src/FbTk/LayerItem.hh
+++ b/src/FbTk/LayerItem.hh
@@ -1,7 +1,7 @@
1// LayerItem.hh for fluxbox 1// LayerItem.hh for FbTk - fluxbox toolkit
2// Copyright (c) 2003 Henrik Kinnunen (fluxgen at fluxbox dot org) 2// Copyright (c) 2003 Henrik Kinnunen (fluxgen at fluxbox dot org)
3// and Simon Bowden (rathnor at users.sourceforge.net) 3// and Simon Bowden (rathnor at users.sourceforge.net)
4// 4//
5// Permission is hereby granted, free of charge, to any person obtaining a 5// Permission is hereby granted, free of charge, to any person obtaining a
6// copy of this software and associated documentation files (the "Software"), 6// copy of this software and associated documentation files (the "Software"),
7// to deal in the Software without restriction, including without limitation 7// to deal in the Software without restriction, including without limitation
@@ -20,20 +20,60 @@
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE. 21// DEALINGS IN THE SOFTWARE.
22 22
23#ifndef FBTK_LAYERITEM_HH 23#ifndef FBTK_XLAYERITEM_HH
24#define FBTK_LAYERITEM_HH 24#define FBTK_XLAYERITEM_HH
25
26#include "Layer.hh"
27#include "NotCopyable.hh"
28#include <vector>
25 29
26namespace FbTk { 30namespace FbTk {
27 31
28/// pure interface class, an item in layer 32class FbWindow;
29class LayerItem { 33
34class LayerItem : private NotCopyable {
30public: 35public:
31 virtual ~LayerItem() { } 36 typedef std::vector<FbWindow *> Windows;
37
38 LayerItem(FbWindow &win, Layer &layer);
39 ~LayerItem();
40
41 void setLayer(Layer &layer);
42
43 void raise();
44 void lower();
45 void tempRaise(); // this raise gets reverted by a restack()
46
47 // send to next layer up
48 void raiseLayer();
49 void lowerLayer();
50 void moveToLayer(int layernum);
51
52 // this is needed for step and cycle functions
53 // (you need to know the next one visible, otherwise nothing may appear to happen)
54 // not yet implemented
55 bool visible() const { return true; }
56
57 const Layer &getLayer() const { return *m_layer; }
58 Layer &getLayer() { return *m_layer; }
59 int getLayerNum() { return m_layer->getLayerNum(); }
60
61 // an LayerItem holds several windows that are equivalent in a layer
62 // (i.e. if one is raised, then they should all be).
63 void addWindow(FbWindow &win);
64 void removeWindow(FbWindow &win);
65
66 // using this you can bring one window to the top of this item (equivalent to add then remove)
67 void bringToTop(FbWindow &win);
68
69 Windows &getWindows() { return m_windows; }
70 size_t numWindows() const { return m_windows.size(); }
32 71
33 virtual void raise() = 0; 72private:
34 virtual void lower() = 0; 73 Layer *m_layer;
74 Windows m_windows;
35}; 75};
36 76
37} // end namespace FbTk 77}
38 78
39#endif // FBTK_LAYERITEM_HH 79#endif // FBTK_XLAYERITEM_HH