diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2011-02-23 21:49:27 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2011-02-23 21:49:27 (GMT) |
commit | 9616a676d869b8f67742da99d55e9327ea867166 (patch) | |
tree | 32d8daf4d851b4038e7098f88570891c0727bd7b /src/FbTk/MultLayers.cc | |
parent | 813e6c4402b7d13a9e7b1ce3e391bc4c8d894ea3 (diff) | |
download | fluxbox_pavel-9616a676d869b8f67742da99d55e9327ea867166.zip fluxbox_pavel-9616a676d869b8f67742da99d55e9327ea867166.tar.bz2 |
renamed FbTk::XLayer to FbTk::Layer and FbTk::XLayerItem to FbTk::LayerItem
Diffstat (limited to 'src/FbTk/MultLayers.cc')
-rw-r--r-- | src/FbTk/MultLayers.cc | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/FbTk/MultLayers.cc b/src/FbTk/MultLayers.cc index 0f0748f..2027286 100644 --- a/src/FbTk/MultLayers.cc +++ b/src/FbTk/MultLayers.cc | |||
@@ -21,8 +21,8 @@ | |||
21 | // DEALINGS IN THE SOFTWARE. | 21 | // DEALINGS IN THE SOFTWARE. |
22 | 22 | ||
23 | #include "MultLayers.hh" | 23 | #include "MultLayers.hh" |
24 | #include "XLayer.hh" | 24 | #include "Layer.hh" |
25 | #include "XLayerItem.hh" | 25 | #include "LayerItem.hh" |
26 | #include "App.hh" | 26 | #include "App.hh" |
27 | #include "FbWindow.hh" | 27 | #include "FbWindow.hh" |
28 | 28 | ||
@@ -34,7 +34,7 @@ MultLayers::MultLayers(int numlayers) : | |||
34 | m_lock(0) | 34 | m_lock(0) |
35 | { | 35 | { |
36 | for (int i=0; i < numlayers; ++i) | 36 | for (int i=0; i < numlayers; ++i) |
37 | m_layers.push_back(new XLayer(*this, i)); | 37 | m_layers.push_back(new Layer(*this, i)); |
38 | } | 38 | } |
39 | 39 | ||
40 | MultLayers::~MultLayers() { | 40 | MultLayers::~MultLayers() { |
@@ -45,19 +45,19 @@ MultLayers::~MultLayers() { | |||
45 | } | 45 | } |
46 | 46 | ||
47 | 47 | ||
48 | XLayerItem *MultLayers::getLowestItemAboveLayer(int layernum) { | 48 | LayerItem *MultLayers::getLowestItemAboveLayer(int layernum) { |
49 | if (layernum >= static_cast<signed>(m_layers.size()) || layernum <= 0) | 49 | if (layernum >= static_cast<signed>(m_layers.size()) || layernum <= 0) |
50 | return 0; | 50 | return 0; |
51 | 51 | ||
52 | layernum--; // next one up | 52 | layernum--; // next one up |
53 | XLayerItem *item = 0; | 53 | LayerItem *item = 0; |
54 | while (layernum >= 0 && (item = m_layers[layernum]->getLowestItem()) == 0) | 54 | while (layernum >= 0 && (item = m_layers[layernum]->getLowestItem()) == 0) |
55 | layernum--; | 55 | layernum--; |
56 | return item; | 56 | return item; |
57 | 57 | ||
58 | } | 58 | } |
59 | 59 | ||
60 | void MultLayers::addToTop(XLayerItem &item, int layernum) { | 60 | void MultLayers::addToTop(LayerItem &item, int layernum) { |
61 | layernum = FbTk::Util::clamp(layernum, 0, static_cast<signed>(m_layers.size()) - 1); | 61 | layernum = FbTk::Util::clamp(layernum, 0, static_cast<signed>(m_layers.size()) - 1); |
62 | m_layers[layernum]->insert(item); | 62 | m_layers[layernum]->insert(item); |
63 | restack(); | 63 | restack(); |
@@ -65,7 +65,7 @@ void MultLayers::addToTop(XLayerItem &item, int layernum) { | |||
65 | 65 | ||
66 | 66 | ||
67 | // raise the whole layer | 67 | // raise the whole layer |
68 | void MultLayers::raise(XLayer &layer) { | 68 | void MultLayers::raise(Layer &layer) { |
69 | int layernum = layer.getLayerNum(); | 69 | int layernum = layer.getLayerNum(); |
70 | if (layernum >= static_cast<signed>(m_layers.size() - 1)) | 70 | if (layernum >= static_cast<signed>(m_layers.size() - 1)) |
71 | // already on top | 71 | // already on top |
@@ -75,7 +75,7 @@ void MultLayers::raise(XLayer &layer) { | |||
75 | } | 75 | } |
76 | 76 | ||
77 | // lower the whole layer | 77 | // lower the whole layer |
78 | void MultLayers::lower(XLayer &layer) { | 78 | void MultLayers::lower(Layer &layer) { |
79 | int layernum = layer.getLayerNum(); | 79 | int layernum = layer.getLayerNum(); |
80 | if (layernum == 0) | 80 | if (layernum == 0) |
81 | // already on bottom | 81 | // already on bottom |
@@ -85,22 +85,22 @@ void MultLayers::lower(XLayer &layer) { | |||
85 | } | 85 | } |
86 | 86 | ||
87 | /* raise the item one level */ | 87 | /* raise the item one level */ |
88 | void MultLayers::raiseLayer(XLayerItem &item) { | 88 | void MultLayers::raiseLayer(LayerItem &item) { |
89 | // get the layer it is in | 89 | // get the layer it is in |
90 | XLayer &curr_layer = item.getLayer(); | 90 | Layer &curr_layer = item.getLayer(); |
91 | moveToLayer(item, curr_layer.getLayerNum()-1); | 91 | moveToLayer(item, curr_layer.getLayerNum()-1); |
92 | } | 92 | } |
93 | 93 | ||
94 | /* raise the item one level */ | 94 | /* raise the item one level */ |
95 | void MultLayers::lowerLayer(XLayerItem &item) { | 95 | void MultLayers::lowerLayer(LayerItem &item) { |
96 | // get the layer it is in | 96 | // get the layer it is in |
97 | XLayer &curr_layer = item.getLayer(); | 97 | Layer &curr_layer = item.getLayer(); |
98 | moveToLayer(item, curr_layer.getLayerNum()+1); | 98 | moveToLayer(item, curr_layer.getLayerNum()+1); |
99 | } | 99 | } |
100 | 100 | ||
101 | void MultLayers::moveToLayer(XLayerItem &item, int layernum) { | 101 | void MultLayers::moveToLayer(LayerItem &item, int layernum) { |
102 | // get the layer it is in | 102 | // get the layer it is in |
103 | XLayer &curr_layer = item.getLayer(); | 103 | Layer &curr_layer = item.getLayer(); |
104 | 104 | ||
105 | // do nothing if the item already is in the requested layer | 105 | // do nothing if the item already is in the requested layer |
106 | if (curr_layer.getLayerNum() == layernum) | 106 | if (curr_layer.getLayerNum() == layernum) |
@@ -114,7 +114,7 @@ void MultLayers::restack() { | |||
114 | if (!isUpdatable()) | 114 | if (!isUpdatable()) |
115 | return; | 115 | return; |
116 | 116 | ||
117 | XLayer::restack(m_layers); | 117 | Layer::restack(m_layers); |
118 | } | 118 | } |
119 | 119 | ||
120 | int MultLayers::size() { | 120 | int MultLayers::size() { |
@@ -125,13 +125,13 @@ int MultLayers::size() { | |||
125 | return num; | 125 | return num; |
126 | } | 126 | } |
127 | 127 | ||
128 | XLayer *MultLayers::getLayer(size_t num) { | 128 | Layer *MultLayers::getLayer(size_t num) { |
129 | if (num >= m_layers.size()) | 129 | if (num >= m_layers.size()) |
130 | return 0; | 130 | return 0; |
131 | return m_layers[num]; | 131 | return m_layers[num]; |
132 | } | 132 | } |
133 | 133 | ||
134 | const XLayer *MultLayers::getLayer(size_t num) const { | 134 | const Layer *MultLayers::getLayer(size_t num) const { |
135 | if (num >= m_layers.size()) | 135 | if (num >= m_layers.size()) |
136 | return 0; | 136 | return 0; |
137 | return m_layers[num]; | 137 | return m_layers[num]; |