aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/XLayer.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/XLayer.hh')
-rw-r--r--src/FbTk/XLayer.hh70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/FbTk/XLayer.hh b/src/FbTk/XLayer.hh
new file mode 100644
index 0000000..94f30c8
--- /dev/null
+++ b/src/FbTk/XLayer.hh
@@ -0,0 +1,70 @@
1// XLayer.hh for FbTk - fluxbox toolkit
2// Copyright (c) 2003 Henrik Kinnunen (fluxgen at users.sourceforge.net)
3// and Simon Bowden (rathnor at users.sourceforge.net)
4//
5// Permission is hereby granted, free of charge, to any person obtaining a
6// copy of this software and associated documentation files (the "Software"),
7// to deal in the Software without restriction, including without limitation
8// the rights to use, copy, modify, merge, publish, distribute, sublicense,
9// and/or sell copies of the Software, and to permit persons to whom the
10// Software is furnished to do so, subject to the following conditions:
11//
12// The above copyright notice and this permission notice shall be included in
13// all copies or substantial portions of the Software.
14//
15// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21// DEALINGS IN THE SOFTWARE.
22
23// $Id: XLayer.hh,v 1.1 2003/01/16 12:41:27 rathnor Exp $
24
25
26#ifndef FBTK_XLAYER_HH
27#define FBTK_XLAYER_HH
28
29#include <list>
30#include "Layer.hh"
31#include "MultLayers.hh"
32
33namespace FbTk {
34
35class XLayerItem;
36
37class XLayer : public FbTk::Layer<XLayerItem, std::list<XLayerItem *> > {
38public:
39 XLayer(MultLayers &manager, int layernum);
40 ~XLayer();
41
42 //typedef std::list<XLayerItem *>::iterator iterator;
43 //typedef std::list<XLayerItem *>::reverse_iterator reverse_iterator;
44
45 void setLayerNum(int layernum) { m_layernum = layernum; };
46 int getLayerNum() { return m_layernum; };
47 void restack();
48 void stackBelowItem(XLayerItem *item, XLayerItem *above);
49 XLayerItem *getLowestItem();
50
51 // we redefine these as XLayer has special optimisations, and X restacking needs
52 iterator insert(XLayerItem &item, unsigned int pos=0);
53 void remove(XLayerItem &item);
54
55 void cycleUp();
56 void cycleDown();
57 void raise(XLayerItem &item);
58 void lower(XLayerItem &item);
59 void stepUp(XLayerItem &item);
60 void stepDown(XLayerItem &item);
61
62private:
63 MultLayers &m_manager;
64 int m_layernum;
65
66};
67
68};
69
70#endif // FBTK_XLAYER_HH