aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Container.cc
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2008-01-15 07:45:57 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2008-01-15 07:45:57 (GMT)
commitf6c292a406f183a12b2e327716aad5de4c0abcca (patch)
treea90b80a7a1ec95ce7ab0b66447b7528f64e03eae /src/FbTk/Container.cc
parente1db89e2d7d56afca5335550ee1c9ff87fd54ba4 (diff)
downloadfluxbox-f6c292a406f183a12b2e327716aad5de4c0abcca.zip
fluxbox-f6c292a406f183a12b2e327716aad5de4c0abcca.tar.bz2
split Text.hh into Orientation.hh and TextUtils.{cc,hh}
Diffstat (limited to 'src/FbTk/Container.cc')
-rw-r--r--src/FbTk/Container.cc32
1 files changed, 1 insertions, 31 deletions
diff --git a/src/FbTk/Container.cc b/src/FbTk/Container.cc
index 9da25c6..0c9b6ac 100644
--- a/src/FbTk/Container.cc
+++ b/src/FbTk/Container.cc
@@ -23,6 +23,7 @@
23#include "Container.hh" 23#include "Container.hh"
24 24
25#include "Button.hh" 25#include "Button.hh"
26#include "TextUtils.hh"
26#include "EventManager.hh" 27#include "EventManager.hh"
27#include "CompareEqual.hh" 28#include "CompareEqual.hh"
28 29
@@ -62,37 +63,6 @@ void Container::moveResize(int x, int y,
62 repositionItems(); 63 repositionItems();
63} 64}
64 65
65#ifdef NOT_USED
66void Container::insertItems(ItemList &item_list, int pos) {
67
68 // make sure all items have parent == this
69 ItemList::iterator it = m_item_list.begin();
70 ItemList::iterator it_end = m_item_list.end();
71 for (; it != it_end; ++it) {
72 if ((*it)->parent() != this)
73 return;
74 }
75
76 if (pos > size() || pos < 0) {
77 // insert last
78 m_item_list.splice(m_item_list.end(), item_list);
79 } else if (pos == 0) {
80 // insert first
81 m_item_list.splice(m_item_list.begin(), item_list);
82 } else {
83 // find insert point
84 for (it = m_item_list.begin(); pos != 0; ++it, --pos)
85 continue;
86 m_item_list.splice(it, item_list);
87 }
88
89 m_item_list.unique();
90
91 // update position
92 repositionItems();
93}
94#endif
95
96void Container::insertItem(Item item, int pos) { 66void Container::insertItem(Item item, int pos) {
97 if (find(item) != -1) 67 if (find(item) != -1)
98 return; 68 return;