summaryrefslogtreecommitdiff
path: root/src/Workspace.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/Workspace.hh')
-rw-r--r--src/Workspace.hh48
1 files changed, 34 insertions, 14 deletions
diff --git a/src/Workspace.hh b/src/Workspace.hh
index 379c30b..dc640ac 100644
--- a/src/Workspace.hh
+++ b/src/Workspace.hh
@@ -36,34 +36,54 @@
36 36
37class BScreen; 37class BScreen;
38 38
39 39/**
40 Handles a single workspace
41*/
40class Workspace:private NotCopyable { 42class Workspace:private NotCopyable {
41public: 43public:
42 typedef std::vector<FluxboxWindow *> Windows; 44 typedef std::vector<FluxboxWindow *> Windows;
43 45
44 Workspace(BScreen *screen, unsigned int workspaceid= 0); 46 Workspace(BScreen *screen, unsigned int workspaceid = 0);
45 ~Workspace(); 47 ~Workspace();
48
46 inline void setLastFocusedWindow(FluxboxWindow *w) { lastfocus = w; } 49 inline void setLastFocusedWindow(FluxboxWindow *w) { lastfocus = w; }
50 /**
51 Set workspace name
52 */
47 void setName(const char *name); 53 void setName(const char *name);
48 void showAll(); 54 void showAll();
49 void hideAll(); 55 void hideAll();
50 void removeAll(); 56 void removeAll();
51 void raiseWindow(FluxboxWindow *); 57 void raiseWindow(FluxboxWindow *win);
52 void lowerWindow(FluxboxWindow *); 58 void lowerWindow(FluxboxWindow *win);
53 void reconfigure(); 59 void reconfigure();
54 void update(); 60 void update();
55 void setCurrent(); 61 void setCurrent();
56 void shutdown(); 62 void shutdown();
57 int addWindow(FluxboxWindow *window, bool place = false); 63 int addWindow(FluxboxWindow *win, bool place = false);
58 int removeWindow(FluxboxWindow *); 64 int removeWindow(FluxboxWindow *win);
65 BScreen *getScreen() { return screen; }
66 FluxboxWindow *getLastFocusedWindow() { return lastfocus; }
59 67
60 inline BScreen *getScreen() const { return screen; } 68 const BScreen *getScreen() const { return screen; }
61 inline FluxboxWindow *getLastFocusedWindow(void) const { return lastfocus; } 69 const FluxboxWindow *getLastFocusedWindow() const { return lastfocus; }
62 inline Clientmenu *menu() { return &m_clientmenu; } 70 Clientmenu *menu() { return &m_clientmenu; }
71 /**
72 @return client menu
73 */
63 inline const Clientmenu *menu() const { return &m_clientmenu; } 74 inline const Clientmenu *menu() const { return &m_clientmenu; }
75 /**
76 @return name of this workspace
77 */
64 inline const std::string &name() const { return m_name; } 78 inline const std::string &name() const { return m_name; }
79 /**
80 @return the number of this workspace, note: obsolete, should be in BScreen
81 */
65 inline unsigned int workspaceID() const { return m_id; } 82 inline unsigned int workspaceID() const { return m_id; }
66 83 /**
84 @param id the window id number
85 @return window that match the id, else 0
86 */
67 FluxboxWindow *getWindow(unsigned int id); 87 FluxboxWindow *getWindow(unsigned int id);
68 const FluxboxWindow *getWindow(unsigned int id) const; 88 const FluxboxWindow *getWindow(unsigned int id) const;
69 inline const Windows &getWindowList() const { return windowList; } 89 inline const Windows &getWindowList() const { return windowList; }
@@ -72,7 +92,7 @@ public:
72 int getCount() const; 92 int getCount() const;
73 93
74protected: 94protected:
75 void placeWindow(FluxboxWindow *); 95 void placeWindow(FluxboxWindow *win);
76 96
77private: 97private:
78 BScreen *screen; 98 BScreen *screen;
@@ -85,11 +105,11 @@ private:
85 WindowStack stackingList; 105 WindowStack stackingList;
86 Windows windowList; 106 Windows windowList;
87 107
88 std::string m_name; 108 std::string m_name; ///< name of this workspace
89 unsigned int m_id; 109 unsigned int m_id; ///< id, obsolete, this should be in BScreen
90 int cascade_x, cascade_y; 110 int cascade_x, cascade_y;
91}; 111};
92 112
93 113
94#endif // _WORKSPACE_HH_ 114#endif // WORKSPACE_HH
95 115