summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2009-10-01 06:58:56 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2009-10-01 06:58:56 (GMT)
commit4eeac74a3dbb1b23a9c5a6936965e9d5acb3df48 (patch)
tree9f658c46e0a150e2c53323233078a127fc158795
parent65a45dc65f359f3300d980cfd8981a98f3afe4fc (diff)
downloadfluxbox_lack-4eeac74a3dbb1b23a9c5a6936965e9d5acb3df48.zip
fluxbox_lack-4eeac74a3dbb1b23a9c5a6936965e9d5acb3df48.tar.bz2
removed unused code
-rw-r--r--src/FbTk/Layer.hh15
-rw-r--r--src/FbTk/MultLayers.cc30
-rw-r--r--src/FbTk/XLayer.cc25
-rw-r--r--src/FbTk/XLayer.hh3
4 files changed, 0 insertions, 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:
43 virtual void raise(ItemType &item); 43 virtual void raise(ItemType &item);
44 /// move item to bottom 44 /// move item to bottom
45 virtual void lower(ItemType &item); 45 virtual void lower(ItemType &item);
46 /// @return layer item on specific position, on failure 0
47 ItemType *getItem(unsigned int position);
48 /// @return number of elements in layer 46 /// @return number of elements in layer
49 size_t size() const { return m_list.size(); } 47 size_t size() const { return m_list.size(); }
50 /// @return layer list 48 /// @return layer list
@@ -103,19 +101,6 @@ void Layer<ItemType, Container>::lower(ItemType &item) {
103} 101}
104 102
105template <typename ItemType, typename Container> 103template <typename ItemType, typename Container>
106ItemType *Layer<ItemType, Container>::getItem(unsigned int position) {
107 if (position >= m_list.size())
108 return 0;
109 iterator it = m_list.begin();
110 iterator it_end = m_list.end();
111 for (unsigned int i=0; i < position && it != it_end; i++);
112
113 if (it == it_end) return 0;
114 else
115 return *it;
116}
117
118template <typename ItemType, typename Container>
119void Layer<ItemType, Container>::restack() { 104void Layer<ItemType, Container>::restack() {
120} 105}
121 106
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) {
55 55
56} 56}
57 57
58XLayerItem *MultLayers::getItemBelow(XLayerItem &item) {
59 XLayer &curr_layer = item.getLayer();
60
61 // assume that the LayerItem does exist in a layer.
62 XLayerItem *ret = curr_layer.getItemBelow(item);
63
64 if (ret == 0) {
65 int num = curr_layer.getLayerNum()-1;
66 while (num >= 0 && !ret) {
67 ret = m_layers[num]->getItemBelow(item);
68 num--;
69 }
70 }
71
72 return ret;
73}
74
75XLayerItem *MultLayers::getItemAbove(XLayerItem &item) {
76 XLayer &curr_layer = item.getLayer();
77
78 // assume that the LayerItem does exist in a layer.
79 XLayerItem *ret = curr_layer.getItemAbove(item);
80
81 if (!ret) {
82 ret = getLowestItemAboveLayer(curr_layer.getLayerNum());
83 }
84
85 return ret;
86}
87
88void MultLayers::addToTop(XLayerItem &item, int layernum) { 58void MultLayers::addToTop(XLayerItem &item, int layernum) {
89 if (layernum < 0) 59 if (layernum < 0)
90 layernum = 0; 60 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() {
314 return itemList().back(); 314 return itemList().back();
315} 315}
316 316
317XLayerItem *XLayer::getItemBelow(XLayerItem &item) {
318 // get our iterator
319 iterator it = find(itemList().begin(), itemList().end(), &item);
320
321 // go one lower
322 it++;
323
324 // if one lower is the end, there is no item below, otherwise we've got it
325 if (it == itemList().end())
326 return 0;
327 else
328 return *it;
329}
330
331XLayerItem *XLayer::getItemAbove(XLayerItem &item) {
332 // get our iterator
333 iterator it = find(itemList().begin(), itemList().end(), &item);
334
335 // if this is the beginning (top-most item), do nothing, otherwise give the next one up
336 // the list (which must be there since we aren't the beginning)
337 if (it == itemList().begin())
338 return 0;
339 else
340 return *(--it);
341}
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:
49 int countWindows(); 49 int countWindows();
50 void stackBelowItem(XLayerItem &item, XLayerItem *above); 50 void stackBelowItem(XLayerItem &item, XLayerItem *above);
51 XLayerItem *getLowestItem(); 51 XLayerItem *getLowestItem();
52 XLayerItem *getItemBelow(XLayerItem &item);
53 XLayerItem *getItemAbove(XLayerItem &item);
54
55 const ItemList &getItemList() const { return itemList(); } 52 const ItemList &getItemList() const { return itemList(); }
56 ItemList &getItemList() { return itemList(); } 53 ItemList &getItemList() { return itemList(); }
57 54