diff options
Diffstat (limited to 'src/Workspace.hh')
-rw-r--r-- | src/Workspace.hh | 96 |
1 files changed, 50 insertions, 46 deletions
diff --git a/src/Workspace.hh b/src/Workspace.hh index 17de03c..dd41281 100644 --- a/src/Workspace.hh +++ b/src/Workspace.hh | |||
@@ -19,70 +19,74 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | #ifndef _WORKSPACE_HH_ | 22 | #ifndef WORKSPACE_HH |
23 | #define _WORKSPACE_HH_ | 23 | #define WORKSPACE_HH |
24 | |||
25 | #include "Window.hh" | ||
24 | 26 | ||
25 | #include <X11/Xlib.h> | 27 | #include <X11/Xlib.h> |
28 | #include <string> | ||
29 | #include <vector> | ||
30 | #include <list> | ||
26 | 31 | ||
27 | class BScreen; | 32 | class BScreen; |
28 | class Clientmenu; | 33 | class Clientmenu; |
29 | class Workspace; | 34 | class Workspace; |
30 | class FluxboxWindow; | ||
31 | 35 | ||
32 | #include "LinkedList.hh" | ||
33 | 36 | ||
34 | 37 | ||
35 | class Workspace { | 38 | class Workspace { |
39 | public: | ||
40 | typedef std::vector<FluxboxWindow *> Windows; | ||
41 | |||
42 | Workspace(BScreen *, int = 0); | ||
43 | ~Workspace(void); | ||
44 | |||
45 | inline BScreen *getScreen(void) { return screen; } | ||
46 | inline FluxboxWindow *getLastFocusedWindow(void) { return lastfocus; } | ||
47 | inline Clientmenu *getMenu(void) { return clientmenu; } | ||
48 | inline const char *getName(void) const { return name.c_str(); } | ||
49 | inline const int &getWorkspaceID(void) const { return id; } | ||
50 | inline void setLastFocusedWindow(FluxboxWindow *w) { lastfocus = w; } | ||
51 | FluxboxWindow *getWindow(int); | ||
52 | inline Windows &getWindowList() { return windowList; } | ||
53 | bool isCurrent(void); | ||
54 | bool isLastWindow(FluxboxWindow *); | ||
55 | const int addWindow(FluxboxWindow *, Bool = False); | ||
56 | const int removeWindow(FluxboxWindow *); | ||
57 | const int getCount(void); | ||
58 | |||
59 | void showAll(void); | ||
60 | void hideAll(void); | ||
61 | void removeAll(void); | ||
62 | void raiseWindow(FluxboxWindow *); | ||
63 | void lowerWindow(FluxboxWindow *); | ||
64 | void reconfigure(); | ||
65 | void update(); | ||
66 | void setCurrent(void); | ||
67 | void setName(char *); | ||
68 | void shutdown(void); | ||
69 | |||
36 | private: | 70 | private: |
37 | BScreen *screen; | 71 | BScreen *screen; |
38 | FluxboxWindow *lastfocus; | 72 | FluxboxWindow *lastfocus; |
39 | Clientmenu *clientmenu; | 73 | Clientmenu *clientmenu; |
40 | 74 | ||
41 | LinkedList<FluxboxWindow> *stackingList, *windowList; | 75 | typedef std::list<FluxboxWindow *> WindowStack; |
76 | |||
42 | 77 | ||
43 | char *name; | 78 | WindowStack stackingList; |
44 | int id, cascade_x, cascade_y; | 79 | Windows windowList; |
80 | |||
81 | std::string name; | ||
82 | int id, cascade_x, cascade_y; | ||
45 | 83 | ||
46 | 84 | ||
47 | protected: | 85 | protected: |
48 | void placeWindow(FluxboxWindow *); | 86 | void placeWindow(FluxboxWindow *); |
87 | |||
49 | 88 | ||
50 | 89 | ||
51 | public: | ||
52 | Workspace(BScreen *, int = 0); | ||
53 | ~Workspace(void); | ||
54 | |||
55 | inline BScreen *getScreen(void) { return screen; } | ||
56 | |||
57 | inline FluxboxWindow *getLastFocusedWindow(void) { return lastfocus; } | ||
58 | |||
59 | inline Clientmenu *getMenu(void) { return clientmenu; } | ||
60 | |||
61 | inline const char *getName(void) const { return name; } | ||
62 | |||
63 | inline const int &getWorkspaceID(void) const { return id; } | ||
64 | |||
65 | inline void setLastFocusedWindow(FluxboxWindow *w) { lastfocus = w; } | ||
66 | |||
67 | FluxboxWindow *getWindow(int); | ||
68 | |||
69 | Bool isCurrent(void); | ||
70 | Bool isLastWindow(FluxboxWindow *); | ||
71 | |||
72 | const int addWindow(FluxboxWindow *, Bool = False); | ||
73 | const int removeWindow(FluxboxWindow *); | ||
74 | const int getCount(void); | ||
75 | |||
76 | void showAll(void); | ||
77 | void hideAll(void); | ||
78 | void removeAll(void); | ||
79 | void raiseWindow(FluxboxWindow *); | ||
80 | void lowerWindow(FluxboxWindow *); | ||
81 | void reconfigure(); | ||
82 | void update(); | ||
83 | void setCurrent(void); | ||
84 | void setName(char *); | ||
85 | void shutdown(void); | ||
86 | }; | 90 | }; |
87 | 91 | ||
88 | 92 | ||