1
// XLayer.hh for FbTk - fluxbox toolkit
2
// Copyright (c) 2003 Henrik Kinnunen (fluxgen at fluxbox dot org)
3
// and Simon Bowden (rathnor at users.sourceforge.net)
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:
12
// The above copyright notice and this permission notice shall be included in
13
// all copies or substantial portions of the Software.
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.
23
// $Id: XLayer.hh 3864 2005-01-24 18:02:34Z mathias $
26
#ifndef FBTK_XLAYER_HH
27
#define FBTK_XLAYER_HH
31
#include "MultLayers.hh"
37
class XLayer : public FbTk::Layer<XLayerItem, std::list<XLayerItem *> > {
40
XLayer(MultLayers &manager, int layernum);
43
typedef std::list<XLayerItem *> ItemList;
44
typedef std::list<XLayerItem *>::iterator iterator;
46
//typedef std::list<XLayerItem *>::reverse_iterator reverse_iterator;
48
void setLayerNum(int layernum) { m_layernum = layernum; };
49
int getLayerNum() { return m_layernum; };
52
void stackBelowItem(XLayerItem *item, XLayerItem *above);
53
XLayerItem *getLowestItem();
54
XLayerItem *getItemBelow(XLayerItem &item);
55
XLayerItem *getItemAbove(XLayerItem &item);
57
const ItemList &getItemList() const { return itemList(); }
58
ItemList &getItemList() { return itemList(); }
60
// we redefine these as XLayer has special optimisations, and X restacking needs
61
iterator insert(XLayerItem &item, unsigned int pos=0);
62
void remove(XLayerItem &item);
64
// move highest to bottom
67
// just go above the next window up in the current layer (not all the way to the top)
68
void stepUp(XLayerItem &item);
69
void stepDown(XLayerItem &item);
71
// bring to top of layer
72
void raise(XLayerItem &item);
73
void lower(XLayerItem &item);
75
// raise it, but don't make it permanent (i.e. restack will revert)
76
void tempRaise(XLayerItem &item);
78
// send to next layer up
79
void raiseLayer(XLayerItem &item);
80
void lowerLayer(XLayerItem &item);
81
void moveToLayer(XLayerItem &item, int layernum);
84
MultLayers &m_manager;
91
#endif // FBTK_XLAYER_HH