aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/XLayer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/XLayer.cc')
-rw-r--r--src/FbTk/XLayer.cc25
1 files changed, 0 insertions, 25 deletions
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}