aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/XLayerItem.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/XLayerItem.cc')
-rw-r--r--src/FbTk/XLayerItem.cc35
1 files changed, 33 insertions, 2 deletions
diff --git a/src/FbTk/XLayerItem.cc b/src/FbTk/XLayerItem.cc
index f959c5e..abbbd61 100644
--- a/src/FbTk/XLayerItem.cc
+++ b/src/FbTk/XLayerItem.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: XLayerItem.cc,v 1.4 2003/02/03 13:43:46 fluxgen Exp $ 23// $Id: XLayerItem.cc,v 1.5 2003/02/09 14:11:14 rathnor Exp $
24 24
25#include "XLayerItem.hh" 25#include "XLayerItem.hh"
26#include "XLayer.hh" 26#include "XLayer.hh"
@@ -29,7 +29,8 @@ using namespace FbTk;
29 29
30XLayerItem::XLayerItem(Window win, XLayer &layer) : 30XLayerItem::XLayerItem(Window win, XLayer &layer) :
31 m_layer(&layer), m_layeriterator(0) { 31 m_layer(&layer), m_layeriterator(0) {
32 m_window = win; 32 m_windows.push_front(win);
33 m_layer->insert(*this);
33} 34}
34 35
35 36
@@ -63,3 +64,33 @@ void XLayerItem::stepDown() {
63 m_layer->stepDown(*this); 64 m_layer->stepDown(*this);
64} 65}
65 66
67void XLayerItem::raiseLayer() {
68 m_layer->raiseLayer(*this);
69}
70
71void XLayerItem::lowerLayer() {
72 m_layer->lowerLayer(*this);
73}
74
75void XLayerItem::moveToLayer(int layernum) {
76 m_layer->moveToLayer(*this, layernum);
77}
78
79void XLayerItem::addWindow(Window win) {
80 // I'd like to think we can trust ourselves that it won't be added twice...
81 // Otherwise we're always scanning through the list.
82 m_windows.push_back(win);
83}
84
85void XLayerItem::removeWindow(Window win) {
86 // I'd like to think we can trust ourselves that it won't be added twice...
87 // Otherwise we're always scanning through the list.
88
89 XLayerItem::Windows::iterator it = std::find(m_windows.begin(), m_windows.end(), win);
90 m_windows.erase(it);
91}
92
93void XLayerItem::bringToTop(Window win) {
94 removeWindow(win);
95 addWindow(win);
96}