aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.hh
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2005-06-23 03:07:25 (GMT)
committerfluxgen <fluxgen>2005-06-23 03:07:25 (GMT)
commit5373f6d840abaa49685c15fee2f411e77472a7da (patch)
tree46da25845eac32769bad85c264e4edf335cc1783 /src/Screen.hh
parent18cf5862495aa6f37110c90286bb6c315a145526 (diff)
downloadfluxbox_pavel-5373f6d840abaa49685c15fee2f411e77472a7da.zip
fluxbox_pavel-5373f6d840abaa49685c15fee2f411e77472a7da.tar.bz2
moved window menu from FluxboxWindow to BScreen
Diffstat (limited to 'src/Screen.hh')
-rw-r--r--src/Screen.hh16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/Screen.hh b/src/Screen.hh
index cb18cdd..abebd02 100644
--- a/src/Screen.hh
+++ b/src/Screen.hh
@@ -97,6 +97,7 @@ public:
97 typedef std::list<WinClient *> FocusedWindows; 97 typedef std::list<WinClient *> FocusedWindows;
98 typedef std::vector<Workspace *> Workspaces; 98 typedef std::vector<Workspace *> Workspaces;
99 typedef std::vector<std::string> WorkspaceNames; 99 typedef std::vector<std::string> WorkspaceNames;
100 typedef std::list<std::pair<const char *, FbTk::Menu *> > ExtraMenus;
100 101
101 BScreen(FbTk::ResourceManager &rm, 102 BScreen(FbTk::ResourceManager &rm,
102 const std::string &screenname, const std::string &altscreenname, 103 const std::string &screenname, const std::string &altscreenname,
@@ -123,10 +124,16 @@ public:
123 inline bool decorateTransient() const { return *resource.decorate_transient; } 124 inline bool decorateTransient() const { return *resource.decorate_transient; }
124 inline const std::string &windowMenuFilename() const { return *resource.windowmenufile; } 125 inline const std::string &windowMenuFilename() const { return *resource.windowmenufile; }
125 inline FbTk::ImageControl &imageControl() { return *m_image_control.get(); } 126 inline FbTk::ImageControl &imageControl() { return *m_image_control.get(); }
127 // menus
126 const FbTk::Menu &getRootmenu() const { return *m_rootmenu.get(); } 128 const FbTk::Menu &getRootmenu() const { return *m_rootmenu.get(); }
127 FbTk::Menu &getRootmenu() { return *m_rootmenu.get(); } 129 FbTk::Menu &getRootmenu() { return *m_rootmenu.get(); }
128 const FbTk::Menu &configMenu() const { return *m_configmenu.get(); } 130 const FbTk::Menu &configMenu() const { return *m_configmenu.get(); }
129 FbTk::Menu &configMenu() { return *m_configmenu.get(); } 131 FbTk::Menu &configMenu() { return *m_configmenu.get(); }
132 const FbTk::Menu &windowMenu() const { return *m_windowmenu.get(); }
133 FbTk::Menu &windowMenu() { return *m_windowmenu.get(); }
134
135 ExtraMenus &extraWindowMenus() { return m_extramenus; }
136 const ExtraMenus &extraWindowMenus() const { return m_extramenus; }
130 137
131 inline const std::string &getRootCommand() const { return *resource.rootcommand; } 138 inline const std::string &getRootCommand() const { return *resource.rootcommand; }
132 inline ResizeModel getResizeModel() const { return *resource.resize_model; } 139 inline ResizeModel getResizeModel() const { return *resource.resize_model; }
@@ -199,6 +206,11 @@ public:
199 206
200 FbTk::Menu *createMenu(const std::string &label); 207 FbTk::Menu *createMenu(const std::string &label);
201 void hideMenus(); 208 void hideMenus();
209 // for extras to add menus.
210 // These menus will be marked internal,
211 // and deleted when the window dies (as opposed to Screen
212 void addExtraWindowMenu(const char *label, FbTk::Menu *menu);
213 void removeExtraWindowMenu(FbTk::Menu *menu);
202 214
203 /// hide all windowmenus except the given one (if given) 215 /// hide all windowmenus except the given one (if given)
204 void hideWindowMenus(const FluxboxWindow* except= 0); 216 void hideWindowMenus(const FluxboxWindow* except= 0);
@@ -393,7 +405,9 @@ private:
393 405
394 406
395 std::auto_ptr<FbTk::ImageControl> m_image_control; 407 std::auto_ptr<FbTk::ImageControl> m_image_control;
396 std::auto_ptr<FbTk::Menu> m_configmenu, m_rootmenu, m_workspacemenu; 408 std::auto_ptr<FbTk::Menu> m_configmenu, m_rootmenu, m_workspacemenu, m_windowmenu;
409
410 ExtraMenus m_extramenus;
397 411
398 typedef std::list<FbTk::Menu *> Rootmenus; 412 typedef std::list<FbTk::Menu *> Rootmenus;
399 typedef std::list<Netizen *> Netizens; 413 typedef std::list<Netizen *> Netizens;