aboutsummaryrefslogtreecommitdiff
path: root/src/Screen.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/Screen.hh')
-rw-r--r--src/Screen.hh35
1 files changed, 21 insertions, 14 deletions
diff --git a/src/Screen.hh b/src/Screen.hh
index 50587d3..147bcef 100644
--- a/src/Screen.hh
+++ b/src/Screen.hh
@@ -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.15 2002/02/07 14:48:56 fluxgen Exp $ 25// $Id: Screen.hh,v 1.16 2002/02/08 13:35:20 fluxgen Exp $
26 26
27#ifndef _SCREEN_HH_ 27#ifndef _SCREEN_HH_
28#define _SCREEN_HH_ 28#define _SCREEN_HH_
@@ -39,9 +39,6 @@
39#ifndef _ICON_HH_ 39#ifndef _ICON_HH_
40#include "Icon.hh" 40#include "Icon.hh"
41#endif 41#endif
42#ifndef _LINKEDLIST_HH_
43#include "LinkedList.hh"
44#endif
45#ifndef _NETIZEN_HH_ 42#ifndef _NETIZEN_HH_
46#include "Netizen.hh" 43#include "Netizen.hh"
47#endif 44#endif
@@ -82,9 +79,10 @@
82 79
83#include <stdio.h> 80#include <stdio.h>
84#include <string> 81#include <string>
82#include <list>
83#include <vector>
85#include <fstream> 84#include <fstream>
86 85
87
88class BScreen : public ScreenInfo { 86class BScreen : public ScreenInfo {
89public: 87public:
90 BScreen(ResourceManager &rm, Fluxbox *b, 88 BScreen(ResourceManager &rm, Fluxbox *b,
@@ -128,7 +126,7 @@ public:
128 126
129 inline Toolbar *getToolbar(void) { return toolbar; } 127 inline Toolbar *getToolbar(void) { return toolbar; }
130 128
131 inline Workspace *getWorkspace(int w) { return workspacesList->find(w); } 129 inline Workspace *getWorkspace(int w) { return workspacesList[w]; }
132 inline Workspace *getCurrentWorkspace(void) { return current_workspace; } 130 inline Workspace *getCurrentWorkspace(void) { return current_workspace; }
133 131
134 inline Workspacemenu *getWorkspacemenu(void) { return workspacemenu; } 132 inline Workspacemenu *getWorkspacemenu(void) { return workspacemenu; }
@@ -139,9 +137,12 @@ public:
139 inline const unsigned int getBorderWidth(void) const { return theme->getBorderWidth(); } 137 inline const unsigned int getBorderWidth(void) const { return theme->getBorderWidth(); }
140 inline const unsigned int getBorderWidth2x(void) const { return theme->getBorderWidth()*2; } 138 inline const unsigned int getBorderWidth2x(void) const { return theme->getBorderWidth()*2; }
141 inline const int getCurrentWorkspaceID() { return current_workspace->getWorkspaceID(); } 139 inline const int getCurrentWorkspaceID() { return current_workspace->getWorkspaceID(); }
142 inline const int getCount(void) { return workspacesList->count(); } 140
143 inline const int getIconCount(void) { return iconList->count(); } 141 typedef std::vector<FluxboxWindow *> Icons;
144 inline LinkedList<FluxboxWindow> *getIconList(void) { return iconList; } 142 inline const int getCount(void) { return workspacesList.size(); }
143 inline const int getIconCount(void) { return iconList.size(); }
144 inline Icons &getIconList(void) { return iconList; }
145
145 inline const int getNumberOfWorkspaces(void) { return *resource.workspaces; } 146 inline const int getNumberOfWorkspaces(void) { return *resource.workspaces; }
146 inline const Toolbar::Placement getToolbarPlacement(void) { return *resource.toolbar_placement; } 147 inline const Toolbar::Placement getToolbarPlacement(void) { return *resource.toolbar_placement; }
147 inline const int getToolbarWidthPercent(void) { return *resource.toolbar_width_percent; } 148 inline const int getToolbarWidthPercent(void) { return *resource.toolbar_width_percent; }
@@ -265,9 +266,12 @@ private:
265 266
266 Rootmenu *rootmenu; 267 Rootmenu *rootmenu;
267 268
268 LinkedList<Rootmenu> *rootmenuList; 269 typedef std::list<Rootmenu *> Rootmenus;
269 LinkedList<Netizen> *netizenList; 270 typedef std::list<Netizen *> Netizens;
270 LinkedList<FluxboxWindow> *iconList; 271
272 Rootmenus rootmenuList;
273 Netizens netizenList;
274 Icons iconList;
271 275
272 #ifdef SLIT 276 #ifdef SLIT
273 Slit *slit; 277 Slit *slit;
@@ -280,8 +284,11 @@ private:
280 unsigned int geom_w, geom_h; 284 unsigned int geom_w, geom_h;
281 unsigned long event_mask; 285 unsigned long event_mask;
282 286
283 LinkedList<char> *workspaceNames; 287 typedef std::vector<std::string> WorkspaceNames;
284 LinkedList<Workspace> *workspacesList; 288 typedef std::vector<Workspace *> Workspaces;
289
290 WorkspaceNames workspaceNames;
291 Workspaces workspacesList;
285 292
286 struct ScreenResource { 293 struct ScreenResource {
287 ScreenResource(ResourceManager &rm, const std::string &scrname, 294 ScreenResource(ResourceManager &rm, const std::string &scrname,