aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.hh
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2008-05-12 00:22:40 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2008-05-12 00:22:40 (GMT)
commit93b0c5322a7482d83e38657b36e9814f8415e47b (patch)
tree0e7bfe2e975e0b9bd88334975c691e98513c1c14 /src/Screen.hh
parent72a45fae3c39323206e7d19913bb3ab17a691691 (diff)
downloadfluxbox-93b0c5322a7482d83e38657b36e9814f8415e47b.zip
fluxbox-93b0c5322a7482d83e38657b36e9814f8415e47b.tar.bz2
refactor menu reloading, added FbTk::AutoReloadHelper
Diffstat (limited to 'src/Screen.hh')
-rw-r--r--src/Screen.hh27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/Screen.hh b/src/Screen.hh
index 7758c90..57c41b6 100644
--- a/src/Screen.hh
+++ b/src/Screen.hh
@@ -54,6 +54,7 @@
54#include <map> 54#include <map>
55 55
56class ClientPattern; 56class ClientPattern;
57class FbMenu;
57class Focusable; 58class Focusable;
58class FluxboxWindow; 59class FluxboxWindow;
59class WinClient; 60class WinClient;
@@ -122,12 +123,12 @@ public:
122 const std::string &windowMenuFilename() const { return *resource.windowmenufile; } 123 const std::string &windowMenuFilename() const { return *resource.windowmenufile; }
123 FbTk::ImageControl &imageControl() { return *m_image_control.get(); } 124 FbTk::ImageControl &imageControl() { return *m_image_control.get(); }
124 // menus 125 // menus
125 const FbTk::Menu &rootMenu() const { return *m_rootmenu.get(); } 126 const FbMenu &rootMenu() const { return *m_rootmenu.get(); }
126 FbTk::Menu &rootMenu() { return *m_rootmenu.get(); } 127 FbMenu &rootMenu() { return *m_rootmenu.get(); }
127 const FbTk::Menu &configMenu() const { return *m_configmenu.get(); } 128 const FbMenu &configMenu() const { return *m_configmenu.get(); }
128 FbTk::Menu &configMenu() { return *m_configmenu.get(); } 129 FbMenu &configMenu() { return *m_configmenu.get(); }
129 const FbTk::Menu &windowMenu() const { return *m_windowmenu.get(); } 130 const FbMenu &windowMenu() const { return *m_windowmenu.get(); }
130 FbTk::Menu &windowMenu() { return *m_windowmenu.get(); } 131 FbMenu &windowMenu() { return *m_windowmenu.get(); }
131 ExtraMenus &extraWindowMenus() { return m_extramenus; } 132 ExtraMenus &extraWindowMenus() { return m_extramenus; }
132 const ExtraMenus &extraWindowMenus() const { return m_extramenus; } 133 const ExtraMenus &extraWindowMenus() const { return m_extramenus; }
133 134
@@ -166,9 +167,9 @@ public:
166 Workspace *currentWorkspace() { return m_current_workspace; } 167 Workspace *currentWorkspace() { return m_current_workspace; }
167 const Workspace *currentWorkspace() const { return m_current_workspace; } 168 const Workspace *currentWorkspace() const { return m_current_workspace; }
168 /// @return the workspace menu 169 /// @return the workspace menu
169 const FbTk::Menu &workspaceMenu() const { return *m_workspacemenu.get(); } 170 const FbMenu &workspaceMenu() const { return *m_workspacemenu.get(); }
170 /// @return the workspace menu 171 /// @return the workspace menu
171 FbTk::Menu &workspaceMenu() { return *m_workspacemenu.get(); } 172 FbMenu &workspaceMenu() { return *m_workspacemenu.get(); }
172 /// @return focus control handler 173 /// @return focus control handler
173 const FocusControl &focusControl() const { return *m_focus_control; } 174 const FocusControl &focusControl() const { return *m_focus_control; }
174 /// @return focus control handler 175 /// @return focus control handler
@@ -251,15 +252,15 @@ public:
251 /** 252 /**
252 * Creates an empty menu with specified label 253 * Creates an empty menu with specified label
253 * @param label for the menu 254 * @param label for the menu
254 * @return create menu 255 * @return created menu
255 */ 256 */
256 FbTk::Menu *createMenu(const std::string &label); 257 FbMenu *createMenu(const std::string &label);
257 /** 258 /**
258 * Creates an empty toggle menu with a specific label 259 * Creates an empty toggle menu with a specific label
259 * @param label 260 * @param label
260 * @return created menu 261 * @return created menu
261 */ 262 */
262 FbTk::Menu *createToggleMenu(const std::string &label); 263 FbMenu *createToggleMenu(const std::string &label);
263 264
264 /** 265 /**
265 * For extras to add menus. 266 * For extras to add menus.
@@ -383,6 +384,7 @@ public:
383 void reconfigure(); 384 void reconfigure();
384 void reconfigureTabs(); 385 void reconfigureTabs();
385 void rereadMenu(); 386 void rereadMenu();
387 void rereadWindowMenu();
386 void shutdown(); 388 void shutdown();
387 /// show position window centered on the screen with "X x Y" text 389 /// show position window centered on the screen with "X x Y" text
388 void showPosition(int x, int y); 390 void showPosition(int x, int y);
@@ -489,7 +491,6 @@ public:
489 491
490private: 492private:
491 void setupConfigmenu(FbTk::Menu &menu); 493 void setupConfigmenu(FbTk::Menu &menu);
492 void initMenu();
493 void renderGeomWindow(); 494 void renderGeomWindow();
494 void renderPosWindow(); 495 void renderPosWindow();
495 496
@@ -515,7 +516,7 @@ private:
515 516
516 517
517 std::auto_ptr<FbTk::ImageControl> m_image_control; 518 std::auto_ptr<FbTk::ImageControl> m_image_control;
518 std::auto_ptr<FbTk::Menu> m_configmenu, m_rootmenu, m_workspacemenu, m_windowmenu; 519 std::auto_ptr<FbMenu> m_configmenu, m_rootmenu, m_workspacemenu, m_windowmenu;
519 520
520 ExtraMenus m_extramenus; 521 ExtraMenus m_extramenus;
521 522