summaryrefslogtreecommitdiff
path: root/src/Screen.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/Screen.hh')
-rw-r--r--src/Screen.hh23
1 files changed, 7 insertions, 16 deletions
diff --git a/src/Screen.hh b/src/Screen.hh
index bb5db3a..4f91d9c 100644
--- a/src/Screen.hh
+++ b/src/Screen.hh
@@ -30,6 +30,7 @@
30 30
31#include "FbRootWindow.hh" 31#include "FbRootWindow.hh"
32#include "MenuTheme.hh" 32#include "MenuTheme.hh"
33#include "PlacementStrategy.hh"
33 34
34#include "FbTk/Resource.hh" 35#include "FbTk/Resource.hh"
35#include "FbTk/Subject.hh" 36#include "FbTk/Subject.hh"
@@ -63,6 +64,7 @@ class Strut;
63class Slit; 64class Slit;
64class HeadArea; 65class HeadArea;
65class FocusControl; 66class FocusControl;
67class PlacementStrategy;
66 68
67namespace FbTk { 69namespace FbTk {
68class Menu; 70class Menu;
@@ -90,15 +92,6 @@ public:
90 QUADRANTRESIZE, 92 QUADRANTRESIZE,
91 DEFAULTRESIZE = BOTTOMRESIZE }; 93 DEFAULTRESIZE = BOTTOMRESIZE };
92 94
93 enum PlacementPolicy {
94 ROWSMARTPLACEMENT,
95 COLSMARTPLACEMENT,
96 CASCADEPLACEMENT,
97 UNDERMOUSEPLACEMENT
98 };
99
100 enum RowDirection { LEFTRIGHT, RIGHTLEFT};
101 enum ColumnDirection { TOPBOTTOM, BOTTOMTOP};
102 95
103 typedef std::vector<FluxboxWindow *> Icons; 96 typedef std::vector<FluxboxWindow *> Icons;
104 97
@@ -218,10 +211,7 @@ public:
218 /// hide all windowmenus except the given one (if given) 211 /// hide all windowmenus except the given one (if given)
219 void hideWindowMenus(const FluxboxWindow* except= 0); 212 void hideWindowMenus(const FluxboxWindow* except= 0);
220 213
221 inline PlacementPolicy getPlacementPolicy() const { return *resource.placement_policy; }
222 inline int getEdgeSnapThreshold() const { return *resource.edge_snap_threshold; } 214 inline int getEdgeSnapThreshold() const { return *resource.edge_snap_threshold; }
223 inline RowDirection getRowPlacementDirection() const { return *resource.row_direction; }
224 inline ColumnDirection getColPlacementDirection() const { return *resource.col_direction; }
225 215
226 void setRootColormapInstalled(bool r) { root_colormap_installed = r; } 216 void setRootColormapInstalled(bool r) { root_colormap_installed = r; }
227 void saveRootCommand(std::string rootcmd) { *resource.rootcommand = rootcmd; } 217 void saveRootCommand(std::string rootcmd) { *resource.rootcommand = rootcmd; }
@@ -249,7 +239,9 @@ public:
249 const std::string &altName() const { return m_altname; } 239 const std::string &altName() const { return m_altname; }
250 bool isShuttingdown() const { return m_shutdown; } 240 bool isShuttingdown() const { return m_shutdown; }
251 241
252 242 PlacementStrategy &placementStrategy() { return *m_placement_strategy; }
243 const PlacementStrategy &placementStrategy() const { return *m_placement_strategy; }
244
253 int addWorkspace(); 245 int addWorkspace();
254 int removeLastWorkspace(); 246 int removeLastWorkspace();
255 // scroll workspaces 247 // scroll workspaces
@@ -442,9 +434,7 @@ private:
442 FbTk::Resource<int> workspaces, edge_snap_threshold, focused_alpha, 434 FbTk::Resource<int> workspaces, edge_snap_threshold, focused_alpha,
443 unfocused_alpha, menu_alpha, menu_delay, menu_delay_close; 435 unfocused_alpha, menu_alpha, menu_delay, menu_delay_close;
444 FbTk::Resource<FbTk::MenuTheme::MenuMode> menu_mode; 436 FbTk::Resource<FbTk::MenuTheme::MenuMode> menu_mode;
445 FbTk::Resource<PlacementPolicy> placement_policy; 437
446 FbTk::Resource<RowDirection> row_direction;
447 FbTk::Resource<ColumnDirection> col_direction;
448 FbTk::Resource<int> gc_line_width; 438 FbTk::Resource<int> gc_line_width;
449 FbTk::Resource<FbTk::GContext::LineStyle> gc_line_style; 439 FbTk::Resource<FbTk::GContext::LineStyle> gc_line_style;
450 FbTk::Resource<FbTk::GContext::JoinStyle> gc_join_style; 440 FbTk::Resource<FbTk::GContext::JoinStyle> gc_join_style;
@@ -458,6 +448,7 @@ private:
458 const std::string m_name, m_altname; 448 const std::string m_name, m_altname;
459 449
460 FocusControl *m_focus_control; 450 FocusControl *m_focus_control;
451 PlacementStrategy *m_placement_strategy;
461 452
462 // This is a map of windows to clients for clients that had a left 453 // This is a map of windows to clients for clients that had a left
463 // window set, but that window wasn't present at the time 454 // window set, but that window wasn't present at the time