This commit is contained in:
Mathias Gumz 2015-01-21 22:16:38 +01:00
parent e2dbdeeb2e
commit 6d749d6f1a
2 changed files with 14 additions and 5 deletions

View file

@ -26,7 +26,15 @@
#include "WindowCmd.hh"
#include "FbTk/AutoReloadHelper.hh"
FluxboxWindow *FbMenu::s_window = 0;
namespace {
FluxboxWindow* s_window = 0;
}
void FbMenu::setWindow(FluxboxWindow* win) { s_window = win; }
FluxboxWindow* FbMenu::window() { return s_window; }
FbMenu::FbMenu(FbTk::ThemeProxy<FbTk::MenuTheme> &tm,
FbTk::ImageControl &imgctrl, FbTk::Layer &layer):

View file

@ -37,6 +37,11 @@ class MenuTheme;
/// a layered and shaped menu
class FbMenu:public FbTk::Menu {
public:
static void setWindow(FluxboxWindow *win);
static FluxboxWindow *window();
FbMenu(FbTk::ThemeProxy<FbTk::MenuTheme> &tm, FbTk::ImageControl &imgctrl,
FbTk::Layer &layer);
virtual ~FbMenu() { }
@ -49,13 +54,9 @@ public:
void setReloadHelper(FbTk::AutoReloadHelper *helper) { m_reloader.reset(helper); }
FbTk::AutoReloadHelper *reloadHelper() { return m_reloader.get(); }
static void setWindow(FluxboxWindow *win) { s_window = win; }
static FluxboxWindow *window() { return s_window; }
private:
FbTk::LayerItem m_layeritem;
std::auto_ptr<FbTk::AutoReloadHelper> m_reloader;
static FluxboxWindow *s_window;
};
#endif // FBMENU_HH