aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/MultLayers.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/MultLayers.cc')
-rw-r--r--src/FbTk/MultLayers.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/FbTk/MultLayers.cc b/src/FbTk/MultLayers.cc
index a7a2e60..fbe8bfe 100644
--- a/src/FbTk/MultLayers.cc
+++ b/src/FbTk/MultLayers.cc
@@ -20,7 +20,7 @@
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// $Id: MultLayers.cc,v 1.1 2003/01/16 12:41:27 rathnor Exp $ 23// $Id: MultLayers.cc,v 1.2 2003/01/29 21:42:52 rathnor Exp $
24 24
25#include "MultLayers.hh" 25#include "MultLayers.hh"
26#include "XLayer.hh" 26#include "XLayer.hh"
@@ -51,11 +51,21 @@ XLayerItem *MultLayers::getLowestItemAboveLayer(int layernum) {
51 51
52} 52}
53 53
54
54void MultLayers::addToTop(XLayerItem &item, int layernum) { 55void MultLayers::addToTop(XLayerItem &item, int layernum) {
55 if (layernum < 0 || layernum >= m_numlayers) return; 56 if (layernum < 0 || layernum >= m_numlayers) return;
56 m_layers[layernum]->insert(item); 57 m_layers[layernum]->insert(item);
57} 58}
58 59
60void MultLayers::remove(XLayerItem &item) {
61 XLayer *curr_layer = item.getLayer();
62 if (!curr_layer || curr_layer->getLayerNum() < 0 || curr_layer->getLayerNum() >= m_numlayers) {
63 // do nothing
64 return;
65 }
66 curr_layer->remove(item);
67}
68
59/* raise the item one level */ 69/* raise the item one level */
60void MultLayers::raise(XLayerItem &item) { 70void MultLayers::raise(XLayerItem &item) {
61 // get the layer it is in 71 // get the layer it is in