aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/FbMenu.cc10
-rw-r--r--src/FbMenu.hh9
2 files changed, 14 insertions, 5 deletions
diff --git a/src/FbMenu.cc b/src/FbMenu.cc
index 2871042..4cc2b06 100644
--- a/src/FbMenu.cc
+++ b/src/FbMenu.cc
@@ -26,7 +26,15 @@
26#include "WindowCmd.hh" 26#include "WindowCmd.hh"
27#include "FbTk/AutoReloadHelper.hh" 27#include "FbTk/AutoReloadHelper.hh"
28 28
29FluxboxWindow *FbMenu::s_window = 0; 29namespace {
30
31FluxboxWindow* s_window = 0;
32
33}
34
35void FbMenu::setWindow(FluxboxWindow* win) { s_window = win; }
36FluxboxWindow* FbMenu::window() { return s_window; }
37
30 38
31FbMenu::FbMenu(FbTk::ThemeProxy<FbTk::MenuTheme> &tm, 39FbMenu::FbMenu(FbTk::ThemeProxy<FbTk::MenuTheme> &tm,
32 FbTk::ImageControl &imgctrl, FbTk::Layer &layer): 40 FbTk::ImageControl &imgctrl, FbTk::Layer &layer):
diff --git a/src/FbMenu.hh b/src/FbMenu.hh
index 23c2ad5..193149f 100644
--- a/src/FbMenu.hh
+++ b/src/FbMenu.hh
@@ -37,6 +37,11 @@ class MenuTheme;
37/// a layered and shaped menu 37/// a layered and shaped menu
38class FbMenu:public FbTk::Menu { 38class FbMenu:public FbTk::Menu {
39public: 39public:
40
41 static void setWindow(FluxboxWindow *win);
42 static FluxboxWindow *window();
43
44
40 FbMenu(FbTk::ThemeProxy<FbTk::MenuTheme> &tm, FbTk::ImageControl &imgctrl, 45 FbMenu(FbTk::ThemeProxy<FbTk::MenuTheme> &tm, FbTk::ImageControl &imgctrl,
41 FbTk::Layer &layer); 46 FbTk::Layer &layer);
42 virtual ~FbMenu() { } 47 virtual ~FbMenu() { }
@@ -49,13 +54,9 @@ public:
49 void setReloadHelper(FbTk::AutoReloadHelper *helper) { m_reloader.reset(helper); } 54 void setReloadHelper(FbTk::AutoReloadHelper *helper) { m_reloader.reset(helper); }
50 FbTk::AutoReloadHelper *reloadHelper() { return m_reloader.get(); } 55 FbTk::AutoReloadHelper *reloadHelper() { return m_reloader.get(); }
51 56
52 static void setWindow(FluxboxWindow *win) { s_window = win; }
53 static FluxboxWindow *window() { return s_window; }
54
55private: 57private:
56 FbTk::LayerItem m_layeritem; 58 FbTk::LayerItem m_layeritem;
57 std::auto_ptr<FbTk::AutoReloadHelper> m_reloader; 59 std::auto_ptr<FbTk::AutoReloadHelper> m_reloader;
58 static FluxboxWindow *s_window;
59}; 60};
60 61
61#endif // FBMENU_HH 62#endif // FBMENU_HH