1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
19 typedef std::list<BlackboxWindow*> BlackboxWindowList;
20 typedef std::vector<Window> StackVector;
25 BlackboxWindow *lastfocus;
28 BlackboxWindowList stackingList, windowList;
32 unsigned int cascade_x, cascade_y;
34 unsigned int cascade_region;
37 Workspace(const Workspace&);
38 Workspace& operator=(const Workspace&);
40 void raiseTransients(const BlackboxWindow * const win,
41 StackVector::iterator &stack);
42 void lowerTransients(const BlackboxWindow * const win,
43 StackVector::iterator &stack);
45 typedef std::vector<Rect> rectList;
46 rectList calcSpace(const Rect &win, const rectList &spaces) const;
48 void placeWindow(BlackboxWindow *win);
49 bool cascadePlacement(Rect& win, const int offset);
50 bool smartPlacement(Rect& win);
51 bool underMousePlacement(Rect& win);
54 Workspace(BScreen *scrn, unsigned int i = 0);
56 inline BScreen *getScreen(void) { return screen; }
58 inline BlackboxWindow *getLastFocusedWindow(void) { return lastfocus; }
60 inline const std::string& getName(void) const { return name; }
62 inline unsigned int getID(void) const { return id; }
64 inline void setLastFocusedWindow(BlackboxWindow *w) { lastfocus = w; }
66 inline const BlackboxWindowList& getStackingList() const
67 { return stackingList; }
69 BlackboxWindow* getWindow(unsigned int index);
70 BlackboxWindow* getNextWindowInList(BlackboxWindow *w);
71 BlackboxWindow* getPrevWindowInList(BlackboxWindow *w);
72 BlackboxWindow* getTopWindowOnStack(void) const;
73 void focusFallback(const BlackboxWindow *old_window);
75 bool isCurrent(void) const;
76 bool isLastWindow(const BlackboxWindow* w) const;
78 void addWindow(BlackboxWindow *w, bool place = False, bool sticky = False);
79 void removeWindow(BlackboxWindow *w, bool sticky = False);
80 unsigned int getCount(void) const;
81 void appendStackOrder(BlackboxWindowList &stack_order) const;
86 void raiseWindow(BlackboxWindow *w);
87 void lowerWindow(BlackboxWindow *w);
88 void reconfigure(void);
89 void setCurrent(void);
91 void setName(const std::string& new_name);
95 #endif // __Workspace_hh