diff options
author | rathnor <rathnor> | 2003-01-29 21:42:53 (GMT) |
---|---|---|
committer | rathnor <rathnor> | 2003-01-29 21:42:53 (GMT) |
commit | 5244fc32447d2649a52a06dc84d96da94e9fd715 (patch) | |
tree | 5ead0b2c1609f5d821ad30030a8220d889200216 /src/FbTk/XLayerItem.cc | |
parent | 0f5247ccce2d55d36ba823fe4cc6adcd3801c02d (diff) | |
download | fluxbox_pavel-5244fc32447d2649a52a06dc84d96da94e9fd715.zip fluxbox_pavel-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.cc | 27 |
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 | ||
28 | using namespace FbTk; | 28 | using namespace FbTk; |
29 | 29 | ||
30 | XLayerItem::XLayerItem() : | 30 | XLayerItem::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 | /* |
34 | XLayerItem::XLayerItem(XLayer &layer): | 36 | XLayerItem::XLayerItem(XLayer &layer): |
@@ -60,3 +62,22 @@ void XLayerItem::stepUp() { | |||
60 | void XLayerItem::stepDown() { | 62 | void XLayerItem::stepDown() { |
61 | m_layer->stepDown(*this); | 63 | m_layer->stepDown(*this); |
62 | } | 64 | } |
65 | |||
66 | void 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 | |||
72 | void 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 | |||
80 | void XLayerItem::bringToTop(Window win) { | ||
81 | removeWindow(win); | ||
82 | addWindow(win); | ||
83 | } | ||