diff options
Diffstat (limited to 'src/Screen.hh')
-rw-r--r-- | src/Screen.hh | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/src/Screen.hh b/src/Screen.hh index 03a96b7..af60665 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.72 2003/02/23 00:55:07 fluxgen Exp $ | 25 | // $Id: Screen.hh,v 1.73 2003/03/03 21:51:06 rathnor Exp $ |
26 | 26 | ||
27 | #ifndef SCREEN_HH | 27 | #ifndef SCREEN_HH |
28 | #define SCREEN_HH | 28 | #define SCREEN_HH |
@@ -36,6 +36,7 @@ | |||
36 | #include "FbWinFrameTheme.hh" | 36 | #include "FbWinFrameTheme.hh" |
37 | #include "MultLayers.hh" | 37 | #include "MultLayers.hh" |
38 | #include "XLayerItem.hh" | 38 | #include "XLayerItem.hh" |
39 | #include "ToolbarHandler.hh" | ||
39 | #include "fluxbox.hh" | 40 | #include "fluxbox.hh" |
40 | 41 | ||
41 | #include <X11/Xlib.h> | 42 | #include <X11/Xlib.h> |
@@ -78,7 +79,7 @@ public: | |||
78 | int scrn, int number_of_layers); | 79 | int scrn, int number_of_layers); |
79 | ~BScreen(); | 80 | ~BScreen(); |
80 | 81 | ||
81 | inline bool doToolbarAutoHide() const { return *resource.toolbar_auto_hide; } | 82 | inline bool &doToolbarAutoHide() { return *resource.toolbar_auto_hide; } |
82 | inline Toolbar::Placement toolbarPlacement() const { return *resource.toolbar_placement; } | 83 | inline Toolbar::Placement toolbarPlacement() const { return *resource.toolbar_placement; } |
83 | inline bool isSloppyFocus() const { return (*resource.focus_model == Fluxbox::SLOPPYFOCUS); } | 84 | inline bool isSloppyFocus() const { return (*resource.focus_model == Fluxbox::SLOPPYFOCUS); } |
84 | inline bool isSemiSloppyFocus() const { return (*resource.focus_model == Fluxbox::SEMISLOPPYFOCUS); } | 85 | inline bool isSemiSloppyFocus() const { return (*resource.focus_model == Fluxbox::SEMISLOPPYFOCUS); } |
@@ -103,6 +104,8 @@ public: | |||
103 | inline FbTk::ImageControl *getImageControl() { return image_control; } | 104 | inline FbTk::ImageControl *getImageControl() { return image_control; } |
104 | const FbTk::Menu * const getRootmenu() const { return m_rootmenu.get(); } | 105 | const FbTk::Menu * const getRootmenu() const { return m_rootmenu.get(); } |
105 | FbTk::Menu * const getRootmenu() { return m_rootmenu.get(); } | 106 | FbTk::Menu * const getRootmenu() { return m_rootmenu.get(); } |
107 | const FbTk::Menu &getToolbarModemenu() const ; | ||
108 | FbTk::Menu &getToolbarModemenu() ; | ||
106 | 109 | ||
107 | inline const std::string &getRootCommand() const { return *resource.rootcommand; } | 110 | inline const std::string &getRootCommand() const { return *resource.rootcommand; } |
108 | inline Fluxbox::FocusModel getFocusModel() const { return *resource.focus_model; } | 111 | inline Fluxbox::FocusModel getFocusModel() const { return *resource.focus_model; } |
@@ -121,8 +124,11 @@ public: | |||
121 | inline unsigned int getSlitOnHead() const { return resource.slit_on_head; } | 124 | inline unsigned int getSlitOnHead() const { return resource.slit_on_head; } |
122 | inline void saveSlitOnHead(unsigned int h) { resource.slit_on_head = h; } | 125 | inline void saveSlitOnHead(unsigned int h) { resource.slit_on_head = h; } |
123 | 126 | ||
124 | inline const Toolbar *getToolbar() const { return m_toolbar.get(); } | 127 | inline const Toolbar *getToolbar() const { return m_toolbarhandler->getToolbar(); } |
125 | inline Toolbar *getToolbar() { return m_toolbar.get(); } | 128 | inline Toolbar *getToolbar() { return m_toolbarhandler->getToolbar(); } |
129 | |||
130 | inline const ToolbarHandler &getToolbarHandler() const { return *m_toolbarhandler; } | ||
131 | inline ToolbarHandler &getToolbarHandler() { return *m_toolbarhandler; } | ||
126 | 132 | ||
127 | inline Workspace *getWorkspace(unsigned int w) { return ( w < workspacesList.size() ? workspacesList[w] : 0); } | 133 | inline Workspace *getWorkspace(unsigned int w) { return ( w < workspacesList.size() ? workspacesList[w] : 0); } |
128 | inline Workspace *getCurrentWorkspace() { return current_workspace; } | 134 | inline Workspace *getCurrentWorkspace() { return current_workspace; } |
@@ -175,6 +181,9 @@ public: | |||
175 | inline int getToolbarOnHead() { return *resource.toolbar_on_head; } | 181 | inline int getToolbarOnHead() { return *resource.toolbar_on_head; } |
176 | 182 | ||
177 | inline int getToolbarWidthPercent() const { return *resource.toolbar_width_percent; } | 183 | inline int getToolbarWidthPercent() const { return *resource.toolbar_width_percent; } |
184 | inline Resource<int> &getToolbarWidthPercentResource() { return resource.toolbar_width_percent; } | ||
185 | inline const Resource<int> &getToolbarWidthPercentResource() const { return resource.toolbar_width_percent; } | ||
186 | inline ToolbarHandler::ToolbarMode getToolbarMode() const { return *resource.toolbar_mode; } | ||
178 | inline int getPlacementPolicy() const { return resource.placement_policy; } | 187 | inline int getPlacementPolicy() const { return resource.placement_policy; } |
179 | inline int getEdgeSnapThreshold() const { return *resource.edge_snap_threshold; } | 188 | inline int getEdgeSnapThreshold() const { return *resource.edge_snap_threshold; } |
180 | inline int getRowPlacementDirection() const { return resource.row_direction; } | 189 | inline int getRowPlacementDirection() const { return resource.row_direction; } |
@@ -191,16 +200,14 @@ public: | |||
191 | inline void setRootColormapInstalled(Bool r) { root_colormap_installed = r; } | 200 | inline void setRootColormapInstalled(Bool r) { root_colormap_installed = r; } |
192 | inline void saveRootCommand(std::string rootcmd) { *resource.rootcommand = rootcmd; } | 201 | inline void saveRootCommand(std::string rootcmd) { *resource.rootcommand = rootcmd; } |
193 | inline void saveFocusModel(Fluxbox::FocusModel model) { resource.focus_model = model; } | 202 | inline void saveFocusModel(Fluxbox::FocusModel model) { resource.focus_model = model; } |
194 | //DEL inline void saveSloppyFocus(bool s) { resource.sloppy_focus = s; } | ||
195 | //DEL inline void saveSemiSloppyFocus(bool s) { resource.semi_sloppy_focus = s; } | ||
196 | //DEL inline void saveAutoRaise(bool a) { resource.auto_raise = a; } | ||
197 | inline void saveWorkspaces(int w) { *resource.workspaces = w; } | 203 | inline void saveWorkspaces(int w) { *resource.workspaces = w; } |
204 | |||
198 | inline void saveToolbarAutoHide(bool r) { *resource.toolbar_auto_hide = r; } | 205 | inline void saveToolbarAutoHide(bool r) { *resource.toolbar_auto_hide = r; } |
199 | inline void saveToolbarWidthPercent(int w) { *resource.toolbar_width_percent = w; } | 206 | inline void saveToolbarWidthPercent(int w) { *resource.toolbar_width_percent = w; } |
207 | inline void saveToolbarMode(ToolbarHandler::ToolbarMode m) { *resource.toolbar_mode = m; } | ||
200 | inline void saveToolbarPlacement(Toolbar::Placement place) { *resource.toolbar_placement = place; } | 208 | inline void saveToolbarPlacement(Toolbar::Placement place) { *resource.toolbar_placement = place; } |
201 | inline void saveToolbarOnHead(int head) { *resource.toolbar_on_head = head; } | 209 | inline void saveToolbarOnHead(int head) { *resource.toolbar_on_head = head; } |
202 | 210 | ||
203 | |||
204 | inline void savePlacementPolicy(int p) { resource.placement_policy = p; } | 211 | inline void savePlacementPolicy(int p) { resource.placement_policy = p; } |
205 | inline void saveRowPlacementDirection(int d) { resource.row_direction = d; } | 212 | inline void saveRowPlacementDirection(int d) { resource.row_direction = d; } |
206 | inline void saveColPlacementDirection(int d) { resource.col_direction = d; } | 213 | inline void saveColPlacementDirection(int d) { resource.col_direction = d; } |
@@ -358,7 +365,7 @@ private: | |||
358 | #ifdef SLIT | 365 | #ifdef SLIT |
359 | std::auto_ptr<Slit> m_slit; | 366 | std::auto_ptr<Slit> m_slit; |
360 | #endif // SLIT | 367 | #endif // SLIT |
361 | std::auto_ptr<Toolbar> m_toolbar; | 368 | |
362 | Workspace *current_workspace; | 369 | Workspace *current_workspace; |
363 | std::auto_ptr<FbTk::Menu> workspacemenu; | 370 | std::auto_ptr<FbTk::Menu> workspacemenu; |
364 | 371 | ||
@@ -394,6 +401,7 @@ private: | |||
394 | 401 | ||
395 | Resource<Tab::Placement> tab_placement; | 402 | Resource<Tab::Placement> tab_placement; |
396 | Resource<Tab::Alignment> tab_alignment; | 403 | Resource<Tab::Alignment> tab_alignment; |
404 | Resource<ToolbarHandler::ToolbarMode> toolbar_mode; | ||
397 | Resource<int> toolbar_on_head; | 405 | Resource<int> toolbar_on_head; |
398 | Resource<Toolbar::Placement> toolbar_placement; | 406 | Resource<Toolbar::Placement> toolbar_placement; |
399 | bool slit_auto_hide; | 407 | bool slit_auto_hide; |
@@ -410,6 +418,7 @@ private: | |||
410 | } resource; | 418 | } resource; |
411 | 419 | ||
412 | std::auto_ptr<RootTheme> m_root_theme; | 420 | std::auto_ptr<RootTheme> m_root_theme; |
421 | ToolbarHandler *m_toolbarhandler; | ||
413 | }; | 422 | }; |
414 | 423 | ||
415 | 424 | ||