aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/XLayerItem.cc
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-01-29 21:42:53 (GMT)
committerrathnor <rathnor>2003-01-29 21:42:53 (GMT)
commit5244fc32447d2649a52a06dc84d96da94e9fd715 (patch)
tree5ead0b2c1609f5d821ad30030a8220d889200216 /src/FbTk/XLayerItem.cc
parent0f5247ccce2d55d36ba823fe4cc6adcd3801c02d (diff)
downloadfluxbox-5244fc32447d2649a52a06dc84d96da94e9fd715.zip
fluxbox-5244fc32447d2649a52a06dc84d96da94e9fd715.tar.bz2
restructured layering a little so that a XLayerItem now contains several
windows that are to remain equivalent in depth (e.g. tabs, or grouped windows) - (Simon)
Diffstat (limited to 'src/FbTk/XLayerItem.cc')
-rw-r--r--src/FbTk/XLayerItem.cc27
1 files changed, 24 insertions, 3 deletions
diff --git a/src/FbTk/XLayerItem.cc b/src/FbTk/XLayerItem.cc
index 1c44638..31940a1 100644
--- a/src/FbTk/XLayerItem.cc
+++ b/src/FbTk/XLayerItem.cc
@@ -20,15 +20,17 @@
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.1 2003/01/16 12:41:27 rathnor Exp $ 23// $Id: XLayerItem.cc,v 1.2 2003/01/29 21:42:53 rathnor Exp $
24 24
25#include "XLayerItem.hh" 25#include "XLayerItem.hh"
26#include "XLayer.hh" 26#include "XLayer.hh"
27 27
28using namespace FbTk; 28using namespace FbTk;
29 29
30XLayerItem::XLayerItem() : 30XLayerItem::XLayerItem(Window win) :
31 m_layer(0), m_layeriterator(0) {} 31 m_layer(0), m_layeriterator(0) {
32 m_windows.push_front(win);
33}
32 34
33/* 35/*
34XLayerItem::XLayerItem(XLayer &layer): 36XLayerItem::XLayerItem(XLayer &layer):
@@ -60,3 +62,22 @@ void XLayerItem::stepUp() {
60void XLayerItem::stepDown() { 62void XLayerItem::stepDown() {
61 m_layer->stepDown(*this); 63 m_layer->stepDown(*this);
62} 64}
65
66void XLayerItem::addWindow(Window win) {
67 // I'd like to think we can trust ourselves that it won't be added twice...
68 // Otherwise we're always scanning through the list.
69 m_windows.push_back(win);
70}
71
72void XLayerItem::removeWindow(Window win) {
73 // I'd like to think we can trust ourselves that it won't be added twice...
74 // Otherwise we're always scanning through the list.
75
76 XLayerItem::Windows::iterator it = std::find(m_windows.begin(), m_windows.end(), win);
77 m_windows.erase(it);
78}
79
80void XLayerItem::bringToTop(Window win) {
81 removeWindow(win);
82 addWindow(win);
83}