From 4eeac74a3dbb1b23a9c5a6936965e9d5acb3df48 Mon Sep 17 00:00:00 2001 From: Mathias Gumz Date: Thu, 1 Oct 2009 08:58:56 +0200 Subject: removed unused code --- src/FbTk/Layer.hh | 15 --------------- src/FbTk/MultLayers.cc | 30 ------------------------------ src/FbTk/XLayer.cc | 25 ------------------------- src/FbTk/XLayer.hh | 3 --- 4 files changed, 73 deletions(-) diff --git a/src/FbTk/Layer.hh b/src/FbTk/Layer.hh index b9257c3..aabbe08 100644 --- a/src/FbTk/Layer.hh +++ b/src/FbTk/Layer.hh @@ -43,8 +43,6 @@ public: virtual void raise(ItemType &item); /// move item to bottom virtual void lower(ItemType &item); - /// @return layer item on specific position, on failure 0 - ItemType *getItem(unsigned int position); /// @return number of elements in layer size_t size() const { return m_list.size(); } /// @return layer list @@ -103,19 +101,6 @@ void Layer::lower(ItemType &item) { } template -ItemType *Layer::getItem(unsigned int position) { - if (position >= m_list.size()) - return 0; - iterator it = m_list.begin(); - iterator it_end = m_list.end(); - for (unsigned int i=0; i < position && it != it_end; i++); - - if (it == it_end) return 0; - else - return *it; -} - -template void Layer::restack() { } diff --git a/src/FbTk/MultLayers.cc b/src/FbTk/MultLayers.cc index 79dab59..a9135e3 100644 --- a/src/FbTk/MultLayers.cc +++ b/src/FbTk/MultLayers.cc @@ -55,36 +55,6 @@ XLayerItem *MultLayers::getLowestItemAboveLayer(int layernum) { } -XLayerItem *MultLayers::getItemBelow(XLayerItem &item) { - XLayer &curr_layer = item.getLayer(); - - // assume that the LayerItem does exist in a layer. - XLayerItem *ret = curr_layer.getItemBelow(item); - - if (ret == 0) { - int num = curr_layer.getLayerNum()-1; - while (num >= 0 && !ret) { - ret = m_layers[num]->getItemBelow(item); - num--; - } - } - - return ret; -} - -XLayerItem *MultLayers::getItemAbove(XLayerItem &item) { - XLayer &curr_layer = item.getLayer(); - - // assume that the LayerItem does exist in a layer. - XLayerItem *ret = curr_layer.getItemAbove(item); - - if (!ret) { - ret = getLowestItemAboveLayer(curr_layer.getLayerNum()); - } - - return ret; -} - void MultLayers::addToTop(XLayerItem &item, int layernum) { if (layernum < 0) layernum = 0; diff --git a/src/FbTk/XLayer.cc b/src/FbTk/XLayer.cc index ddc6395..b1bc14c 100644 --- a/src/FbTk/XLayer.cc +++ b/src/FbTk/XLayer.cc @@ -314,28 +314,3 @@ XLayerItem *XLayer::getLowestItem() { return itemList().back(); } -XLayerItem *XLayer::getItemBelow(XLayerItem &item) { - // get our iterator - iterator it = find(itemList().begin(), itemList().end(), &item); - - // go one lower - it++; - - // if one lower is the end, there is no item below, otherwise we've got it - if (it == itemList().end()) - return 0; - else - return *it; -} - -XLayerItem *XLayer::getItemAbove(XLayerItem &item) { - // get our iterator - iterator it = find(itemList().begin(), itemList().end(), &item); - - // if this is the beginning (top-most item), do nothing, otherwise give the next one up - // the list (which must be there since we aren't the beginning) - if (it == itemList().begin()) - return 0; - else - return *(--it); -} diff --git a/src/FbTk/XLayer.hh b/src/FbTk/XLayer.hh index ae29310..6018b8a 100644 --- a/src/FbTk/XLayer.hh +++ b/src/FbTk/XLayer.hh @@ -49,9 +49,6 @@ public: int countWindows(); void stackBelowItem(XLayerItem &item, XLayerItem *above); XLayerItem *getLowestItem(); - XLayerItem *getItemBelow(XLayerItem &item); - XLayerItem *getItemAbove(XLayerItem &item); - const ItemList &getItemList() const { return itemList(); } ItemList &getItemList() { return itemList(); } -- cgit v0.11.2