~ubuntu-branches/ubuntu/precise/fluxbox/precise

« back to all changes in this revision

Viewing changes to src/FbTk/XLayer.hh

  • Committer: Bazaar Package Importer
  • Author(s): Dmitry E. Oboukhov
  • Date: 2008-07-01 10:38:14 UTC
  • mfrom: (2.1.12 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080701103814-khx2b6il152x9p93
Tags: 1.0.0+deb1-8
* x-dev has been removed from build-depends (out-of-date package).
* Standards-Version bumped to 3.8.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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)
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 3864 2005-01-24 18:02:34Z mathias $
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
 
 
33
 
namespace FbTk {
34
 
 
35
 
class XLayerItem;
36
 
 
37
 
class XLayer : public FbTk::Layer<XLayerItem, std::list<XLayerItem *> > {
38
 
public:
39
 
 
40
 
    XLayer(MultLayers &manager, int layernum);
41
 
    ~XLayer();
42
 
 
43
 
    typedef std::list<XLayerItem *> ItemList;
44
 
    typedef std::list<XLayerItem *>::iterator iterator;
45
 
    
46
 
    //typedef std::list<XLayerItem *>::reverse_iterator reverse_iterator;
47
 
 
48
 
    void setLayerNum(int layernum) { m_layernum = layernum; };
49
 
    int  getLayerNum() { return m_layernum; };
50
 
    void restack();
51
 
    int countWindows();
52
 
    void stackBelowItem(XLayerItem *item, XLayerItem *above);
53
 
    XLayerItem *getLowestItem();
54
 
    XLayerItem *getItemBelow(XLayerItem &item);
55
 
    XLayerItem *getItemAbove(XLayerItem &item);
56
 
 
57
 
    const ItemList &getItemList() const { return itemList(); }
58
 
    ItemList &getItemList() { return itemList(); }
59
 
 
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);
63
 
 
64
 
    // move highest to bottom
65
 
    void cycleUp();
66
 
    void cycleDown();
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);
70
 
 
71
 
    // bring to top of layer
72
 
    void raise(XLayerItem &item);
73
 
    void lower(XLayerItem &item);
74
 
 
75
 
    // raise it, but don't make it permanent (i.e. restack will revert)
76
 
    void tempRaise(XLayerItem &item);
77
 
 
78
 
    // send to next layer up
79
 
    void raiseLayer(XLayerItem &item);
80
 
    void lowerLayer(XLayerItem &item);
81
 
    void moveToLayer(XLayerItem &item, int layernum);
82
 
 
83
 
private:
84
 
    MultLayers &m_manager;
85
 
    int m_layernum;
86
 
 
87
 
};
88
 
 
89
 
} // namespace FbTk
90
 
 
91
 
#endif // FBTK_XLAYER_HH