diff options
author | fluxgen <fluxgen> | 2002-12-13 20:16:17 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-12-13 20:16:17 (GMT) |
commit | 939f13be4fb6b587f92718b3cc00ce45ea92d77e (patch) | |
tree | de2a3eb215c6fc0e9616b036b9d578a355476c9a /src | |
parent | bbc42200c649953474c75ecdd35393b7b5f6fccd (diff) | |
download | fluxbox_paul-939f13be4fb6b587f92718b3cc00ce45ea92d77e.zip fluxbox_paul-939f13be4fb6b587f92718b3cc00ce45ea92d77e.tar.bz2 |
fixed autoptr on rootmenu and next/prev focus/workspace functions so they behave nice with simplecommand
Diffstat (limited to 'src')
-rw-r--r-- | src/Screen.hh | 40 |
1 files changed, 26 insertions, 14 deletions
diff --git a/src/Screen.hh b/src/Screen.hh index cbca6b8..ee541c1 100644 --- a/src/Screen.hh +++ b/src/Screen.hh | |||
@@ -1,8 +1,8 @@ | |||
1 | // Screen.hh for Fluxbox Window Manager | 1 | // Screen.hh for Fluxbox Window Manager |
2 | // Copyright (c) 2001 - 2002 Henrik Kinnunen (fluxgen@linuxmail.org) | 2 | // Copyright (c) 2001 - 2002 Henrik Kinnunen (fluxgen at users.sourceforge.net) |
3 | // | 3 | // |
4 | // Screen.hh for Blackbox - an X11 Window manager | 4 | // Screen.hh for Blackbox - an X11 Window manager |
5 | // Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net) | 5 | // Copyright (c) 1997 - 2000 Brad Hughes (bhughes at tcac.net) |
6 | // | 6 | // |
7 | // Permission is hereby granted, free of charge, to any person obtaining a | 7 | // Permission is hereby granted, free of charge, to any person obtaining a |
8 | // copy of this software and associated documentation files (the "Software"), | 8 | // copy of this software and associated documentation files (the "Software"), |
@@ -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: Screen.hh,v 1.54 2002/12/02 20:05:29 fluxgen Exp $ | 25 | // $Id: Screen.hh,v 1.55 2002/12/13 20:16:17 fluxgen Exp $ |
26 | 26 | ||
27 | #ifndef SCREEN_HH | 27 | #ifndef SCREEN_HH |
28 | #define SCREEN_HH | 28 | #define SCREEN_HH |
@@ -51,6 +51,10 @@ class Rootmenu; | |||
51 | class Netizen; | 51 | class Netizen; |
52 | class Slit; | 52 | class Slit; |
53 | 53 | ||
54 | /// Handles screen connection | ||
55 | /** | ||
56 | Create a toolbar and workspaces, handles switching between workspaces and windows | ||
57 | */ | ||
54 | class BScreen : public ScreenInfo { | 58 | class BScreen : public ScreenInfo { |
55 | public: | 59 | public: |
56 | typedef std::vector<Workspace *> Workspaces; | 60 | typedef std::vector<Workspace *> Workspaces; |
@@ -84,8 +88,8 @@ public: | |||
84 | 88 | ||
85 | inline const FbTk::Color *getBorderColor() const { return &theme->getBorderColor(); } | 89 | inline const FbTk::Color *getBorderColor() const { return &theme->getBorderColor(); } |
86 | inline BImageControl *getImageControl() { return image_control; } | 90 | inline BImageControl *getImageControl() { return image_control; } |
87 | const Rootmenu * const getRootmenu() const { return rootmenu; } | 91 | const Rootmenu * const getRootmenu() const { return m_rootmenu.get(); } |
88 | Rootmenu * const getRootmenu() { return rootmenu; } | 92 | Rootmenu * const getRootmenu() { return m_rootmenu.get(); } |
89 | 93 | ||
90 | inline const std::string &getRootCommand() const { return *resource.rootcommand; } | 94 | inline const std::string &getRootCommand() const { return *resource.rootcommand; } |
91 | 95 | ||
@@ -129,7 +133,10 @@ public: | |||
129 | inline Icons &getIconList() { return iconList; } | 133 | inline Icons &getIconList() { return iconList; } |
130 | const Workspaces &getWorkspacesList() const { return workspacesList; } | 134 | const Workspaces &getWorkspacesList() const { return workspacesList; } |
131 | const WorkspaceNames &getWorkspaceNames() const { return workspaceNames; } | 135 | const WorkspaceNames &getWorkspaceNames() const { return workspaceNames; } |
132 | 136 | /** | |
137 | @name Screen signals | ||
138 | */ | ||
139 | //@{ | ||
133 | /// client list signal | 140 | /// client list signal |
134 | FbTk::Subject &clientListSig() { return m_clientlist_sig; } | 141 | FbTk::Subject &clientListSig() { return m_clientlist_sig; } |
135 | /// workspace count signal | 142 | /// workspace count signal |
@@ -138,7 +145,8 @@ public: | |||
138 | FbTk::Subject &workspaceNamesSig() { return m_workspacenames_sig; } | 145 | FbTk::Subject &workspaceNamesSig() { return m_workspacenames_sig; } |
139 | /// current workspace signal | 146 | /// current workspace signal |
140 | FbTk::Subject ¤tWorkspaceSig() { return m_currentworkspace_sig; } | 147 | FbTk::Subject ¤tWorkspaceSig() { return m_currentworkspace_sig; } |
141 | 148 | //@} | |
149 | |||
142 | /// @return the resource value of number of workspace | 150 | /// @return the resource value of number of workspace |
143 | inline int getNumberOfWorkspaces() const { return *resource.workspaces; } | 151 | inline int getNumberOfWorkspaces() const { return *resource.workspaces; } |
144 | inline Toolbar::Placement getToolbarPlacement() const { return *resource.toolbar_placement; } | 152 | inline Toolbar::Placement getToolbarPlacement() const { return *resource.toolbar_placement; } |
@@ -208,10 +216,12 @@ public: | |||
208 | int addWorkspace(); | 216 | int addWorkspace(); |
209 | int removeLastWorkspace(); | 217 | int removeLastWorkspace(); |
210 | //scroll workspaces | 218 | //scroll workspaces |
211 | void nextWorkspace(const int delta); | 219 | void nextWorkspace() { nextWorkspace(1); } |
212 | void prevWorkspace(const int delta); | 220 | void prevWorkspace() { prevWorkspace(1); } |
213 | void rightWorkspace(const int delta); | 221 | void nextWorkspace(int delta); |
214 | void leftWorkspace(const int delta); | 222 | void prevWorkspace(int delta); |
223 | void rightWorkspace(int delta); | ||
224 | void leftWorkspace(int delta); | ||
215 | 225 | ||
216 | void removeWorkspaceNames(); | 226 | void removeWorkspaceNames(); |
217 | void updateWorkspaceNamesAtom(); | 227 | void updateWorkspaceNamesAtom(); |
@@ -230,8 +240,10 @@ public: | |||
230 | void raiseWindows(const Workspace::Stack &workspace_stack); | 240 | void raiseWindows(const Workspace::Stack &workspace_stack); |
231 | void reassociateGroup(FluxboxWindow *window, unsigned int workspace_id, bool ignore_sticky); | 241 | void reassociateGroup(FluxboxWindow *window, unsigned int workspace_id, bool ignore_sticky); |
232 | void reassociateWindow(FluxboxWindow *window, unsigned int workspace_id, bool ignore_sticky); | 242 | void reassociateWindow(FluxboxWindow *window, unsigned int workspace_id, bool ignore_sticky); |
233 | void prevFocus(int = 0); | 243 | void prevFocus() { prevFocus(0); } |
234 | void nextFocus(int = 0); | 244 | void nextFocus() { nextFocus(0); } |
245 | void prevFocus(int options); | ||
246 | void nextFocus(int options); | ||
235 | void raiseFocus(); | 247 | void raiseFocus(); |
236 | void reconfigure(); | 248 | void reconfigure(); |
237 | void rereadMenu(); | 249 | void rereadMenu(); |
@@ -298,7 +310,7 @@ private: | |||
298 | Configmenu *configmenu; | 310 | Configmenu *configmenu; |
299 | Iconmenu *m_iconmenu; | 311 | Iconmenu *m_iconmenu; |
300 | 312 | ||
301 | Rootmenu *rootmenu; | 313 | std::auto_ptr<Rootmenu> m_rootmenu; |
302 | 314 | ||
303 | typedef std::list<Rootmenu *> Rootmenus; | 315 | typedef std::list<Rootmenu *> Rootmenus; |
304 | typedef std::list<Netizen *> Netizens; | 316 | typedef std::list<Netizen *> Netizens; |