diff options
Diffstat (limited to 'src/Workspace.hh')
-rw-r--r-- | src/Workspace.hh | 57 |
1 files changed, 29 insertions, 28 deletions
diff --git a/src/Workspace.hh b/src/Workspace.hh index 5e4507b..fa7f245 100644 --- a/src/Workspace.hh +++ b/src/Workspace.hh | |||
@@ -25,7 +25,9 @@ | |||
25 | #ifndef WORKSPACE_HH | 25 | #ifndef WORKSPACE_HH |
26 | #define WORKSPACE_HH | 26 | #define WORKSPACE_HH |
27 | 27 | ||
28 | #include "Clientmenu.hh" | ||
28 | #include "Window.hh" | 29 | #include "Window.hh" |
30 | #include "NotCopyable.hh" | ||
29 | 31 | ||
30 | #include <X11/Xlib.h> | 32 | #include <X11/Xlib.h> |
31 | #include <string> | 33 | #include <string> |
@@ -33,46 +35,49 @@ | |||
33 | #include <list> | 35 | #include <list> |
34 | 36 | ||
35 | class BScreen; | 37 | class BScreen; |
36 | class Clientmenu; | ||
37 | class Workspace; | ||
38 | 38 | ||
39 | 39 | ||
40 | 40 | class Workspace:private NotCopyable { | |
41 | class Workspace { | ||
42 | public: | 41 | public: |
43 | typedef std::vector<FluxboxWindow *> Windows; | 42 | typedef std::vector<FluxboxWindow *> Windows; |
44 | 43 | ||
45 | Workspace(BScreen *screen, unsigned int workspaceid= 0); | 44 | Workspace(BScreen *screen, unsigned int workspaceid= 0); |
46 | ~Workspace(void); | 45 | ~Workspace(); |
47 | |||
48 | inline BScreen *getScreen(void) const { return screen; } | ||
49 | inline FluxboxWindow *getLastFocusedWindow(void) const { return lastfocus; } | ||
50 | inline Clientmenu *menu(void) const { return clientmenu; } | ||
51 | inline const std::string &name(void) const { return m_name; } | ||
52 | inline const unsigned int workspaceID(void) const { return m_id; } | ||
53 | inline void setLastFocusedWindow(FluxboxWindow *w) { lastfocus = w; } | 46 | inline void setLastFocusedWindow(FluxboxWindow *w) { lastfocus = w; } |
54 | FluxboxWindow *getWindow(unsigned int id) const; | ||
55 | inline Windows &getWindowList() { return windowList; } | ||
56 | bool isCurrent(void) const; | ||
57 | bool isLastWindow(FluxboxWindow *window) const; | ||
58 | const int addWindow(FluxboxWindow *window, bool place = false); | ||
59 | const int removeWindow(FluxboxWindow *); | ||
60 | const int getCount(void) const; | ||
61 | void setName(const char *name); | 47 | void setName(const char *name); |
62 | void showAll(void); | 48 | void showAll(); |
63 | void hideAll(void); | 49 | void hideAll(); |
64 | void removeAll(void); | 50 | void removeAll(); |
65 | void raiseWindow(FluxboxWindow *); | 51 | void raiseWindow(FluxboxWindow *); |
66 | void lowerWindow(FluxboxWindow *); | 52 | void lowerWindow(FluxboxWindow *); |
67 | void reconfigure(); | 53 | void reconfigure(); |
68 | void update(); | 54 | void update(); |
69 | void setCurrent(void); | 55 | void setCurrent(); |
70 | void shutdown(void); | 56 | void shutdown(); |
57 | const int addWindow(FluxboxWindow *window, bool place = false); | ||
58 | const int removeWindow(FluxboxWindow *); | ||
59 | |||
60 | inline BScreen *getScreen() const { return screen; } | ||
61 | inline FluxboxWindow *getLastFocusedWindow(void) const { return lastfocus; } | ||
62 | inline Clientmenu *menu() { return &m_clientmenu; } | ||
63 | inline const Clientmenu *menu() const { return &m_clientmenu; } | ||
64 | inline const std::string &name() const { return m_name; } | ||
65 | inline const unsigned int workspaceID() const { return m_id; } | ||
66 | |||
67 | FluxboxWindow *getWindow(unsigned int id); | ||
68 | const FluxboxWindow *getWindow(unsigned int id) const; | ||
69 | inline const Windows &getWindowList() const { return windowList; } | ||
70 | bool isCurrent() const; | ||
71 | bool isLastWindow(FluxboxWindow *window) const; | ||
72 | const int getCount() const; | ||
73 | |||
74 | protected: | ||
75 | void placeWindow(FluxboxWindow *); | ||
71 | 76 | ||
72 | private: | 77 | private: |
73 | BScreen *screen; | 78 | BScreen *screen; |
74 | FluxboxWindow *lastfocus; | 79 | FluxboxWindow *lastfocus; |
75 | Clientmenu *clientmenu; | 80 | Clientmenu m_clientmenu; |
76 | 81 | ||
77 | typedef std::list<FluxboxWindow *> WindowStack; | 82 | typedef std::list<FluxboxWindow *> WindowStack; |
78 | 83 | ||
@@ -83,10 +88,6 @@ private: | |||
83 | std::string m_name; | 88 | std::string m_name; |
84 | unsigned int m_id; | 89 | unsigned int m_id; |
85 | int cascade_x, cascade_y; | 90 | int cascade_x, cascade_y; |
86 | |||
87 | |||
88 | protected: | ||
89 | void placeWindow(FluxboxWindow *); | ||
90 | }; | 91 | }; |
91 | 92 | ||
92 | 93 | ||