aboutsummaryrefslogtreecommitdiff
path: root/src/Window.hh
diff options
context:
space:
mode:
authorrathnor <rathnor>2003-02-18 15:11:12 (GMT)
committerrathnor <rathnor>2003-02-18 15:11:12 (GMT)
commitb4ffe4fe21699c7123728aeeb99576a540b3694e (patch)
treef8a133be750f844f3c48f5a631fb8bf088544549 /src/Window.hh
parentaa602770fbbd4e84154028d3181d275b81ea914d (diff)
downloadfluxbox_pavel-b4ffe4fe21699c7123728aeeb99576a540b3694e.zip
fluxbox_pavel-b4ffe4fe21699c7123728aeeb99576a540b3694e.tar.bz2
Added layer menus for windows, toolbar, and slit, plus associated
resources. Cleaned up some cruft from the previous layering setup.
Diffstat (limited to 'src/Window.hh')
-rw-r--r--src/Window.hh19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/Window.hh b/src/Window.hh
index 0f6c75b..f55b307 100644
--- a/src/Window.hh
+++ b/src/Window.hh
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Window.hh,v 1.49 2003/02/17 22:41:24 fluxgen Exp $ 25// $Id: Window.hh,v 1.50 2003/02/18 15:11:11 rathnor Exp $
26 26
27#ifndef WINDOW_HH 27#ifndef WINDOW_HH
28#define WINDOW_HH 28#define WINDOW_HH
@@ -34,6 +34,7 @@
34#include "FbWinFrame.hh" 34#include "FbWinFrame.hh"
35#include "EventHandler.hh" 35#include "EventHandler.hh"
36#include "XLayerItem.hh" 36#include "XLayerItem.hh"
37#include "LayerMenu.hh"
37 38
38#include <X11/Xlib.h> 39#include <X11/Xlib.h>
39#include <X11/Xutil.h> 40#include <X11/Xutil.h>
@@ -58,6 +59,7 @@ class ImageControl;
58class XLayer; 59class XLayer;
59}; 60};
60 61
62
61/// Creates the window frame and handles any window event for it 63/// Creates the window frame and handles any window event for it
62class FluxboxWindow : public FbTk::TimeoutHandler, public FbTk::EventHandler { 64class FluxboxWindow : public FbTk::TimeoutHandler, public FbTk::EventHandler {
63public: 65public:
@@ -223,11 +225,14 @@ public:
223 Window getFrameWindow() const { return m_frame.window().window(); } 225 Window getFrameWindow() const { return m_frame.window().window(); }
224 Window getClientWindow() const { return client.window; } 226 Window getClientWindow() const { return client.window; }
225 227
228 FbTk::FbWindow &getFbWindow() { return m_frame.window(); }
229 const FbTk::FbWindow &getFbWindow() const { return m_frame.window(); }
230
226 FbTk::Menu &getWindowmenu() { return m_windowmenu; } 231 FbTk::Menu &getWindowmenu() { return m_windowmenu; }
227 const FbTk::Menu &getWindowmenu() const { return m_windowmenu; } 232 const FbTk::Menu &getWindowmenu() const { return m_windowmenu; }
228 233
229 FbTk::Menu &getLayermenu() { return m_layermenu; } 234 FbTk::Menu *getLayermenu() { return m_layermenu; }
230 const FbTk::Menu &getLayermenu() const { return m_layermenu; } 235 const FbTk::Menu *getLayermenu() const { return m_layermenu; }
231 236
232 const std::string &getTitle() const { return client.title; } 237 const std::string &getTitle() const { return client.title; }
233 const std::string &getIconTitle() const { return client.icon_title; } 238 const std::string &getIconTitle() const { return client.icon_title; }
@@ -341,7 +346,8 @@ private:
341 BaseDisplay::BlackboxAttributes blackbox_attrib; 346 BaseDisplay::BlackboxAttributes blackbox_attrib;
342 347
343 Time lastButtonPressTime; 348 Time lastButtonPressTime;
344 FbTk::Menu m_windowmenu, m_layermenu; 349 FbTk::Menu m_windowmenu;
350 LayerMenu<FluxboxWindow> *m_layermenu;
345 351
346 timeval lastFocusTime; 352 timeval lastFocusTime;
347 353
@@ -403,5 +409,10 @@ private:
403 409
404}; 410};
405 411
412template <>
413void LayerMenuItem<FluxboxWindow>::click(int button, int time) {
414 m_object->moveToLayer(m_layernum);
415}
416
406 417
407#endif // WINDOW_HH 418#endif // WINDOW_HH