aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/XLayerItem.cc
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-02-09 14:11:14 (GMT)
committerrathnor <rathnor>2003-02-09 14:11:14 (GMT)
commite3b99d4e485591df52b2398fce9adbcece2b9917 (patch)
tree44c14c5160e07e1af0671e141ae99cc1f2e66609 /src/FbTk/XLayerItem.cc
parent1a04cf1ce2649400d41c43024bd163a059cc426d (diff)
downloadfluxbox_pavel-e3b99d4e485591df52b2398fce9adbcece2b9917.zip
fluxbox_pavel-e3b99d4e485591df52b2398fce9adbcece2b9917.tar.bz2
fixing up of layer code
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}