diff options
author | fluxgen <fluxgen> | 2002-10-25 20:56:12 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2002-10-25 20:56:12 (GMT) |
commit | cc60dc63d69edbd2ab058cca5d4c4108a00148ad (patch) | |
tree | b9d43708676e16965108ece7581fda522517a8d8 /src | |
parent | 527e21377f9afda2f9a7e36276141f9133559eb6 (diff) | |
download | fluxbox_paul-cc60dc63d69edbd2ab058cca5d4c4108a00148ad.zip fluxbox_paul-cc60dc63d69edbd2ab058cca5d4c4108a00148ad.tar.bz2 |
fixed auto_ptr for m_toolbar, rearranged includes, fixed forward declaration, removed
fluxbox from constructor and fixed some minor accessors
Diffstat (limited to 'src')
-rw-r--r-- | src/Screen.hh | 67 |
1 files changed, 32 insertions, 35 deletions
diff --git a/src/Screen.hh b/src/Screen.hh index 60883c1..1713e31 100644 --- a/src/Screen.hh +++ b/src/Screen.hh | |||
@@ -22,21 +22,19 @@ | |||
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.47 2002/10/15 10:54:40 fluxgen Exp $ | 25 | // $Id: Screen.hh,v 1.48 2002/10/25 20:56:12 fluxgen Exp $ |
26 | 26 | ||
27 | #ifndef SCREEN_HH | 27 | #ifndef SCREEN_HH |
28 | #define SCREEN_HH | 28 | #define SCREEN_HH |
29 | 29 | ||
30 | #include "Theme.hh" | 30 | #include "Theme.hh" |
31 | #include "BaseDisplay.hh" | 31 | #include "BaseDisplay.hh" |
32 | #include "Configmenu.hh" | ||
33 | #include "Icon.hh" | ||
34 | #include "Netizen.hh" | 32 | #include "Netizen.hh" |
35 | #include "Rootmenu.hh" | ||
36 | #include "Timer.hh" | 33 | #include "Timer.hh" |
37 | #include "Workspace.hh" | 34 | #include "Workspace.hh" |
38 | #include "Workspacemenu.hh" | 35 | #include "Tab.hh" |
39 | #include "fluxbox.hh" | 36 | #include "Resource.hh" |
37 | #include "Toolbar.hh" | ||
40 | 38 | ||
41 | #ifdef HAVE_CONFIG_H | 39 | #ifdef HAVE_CONFIG_H |
42 | #include "config.h" | 40 | #include "config.h" |
@@ -65,13 +63,19 @@ | |||
65 | #include <list> | 63 | #include <list> |
66 | #include <vector> | 64 | #include <vector> |
67 | #include <fstream> | 65 | #include <fstream> |
66 | #include <memory> | ||
67 | |||
68 | class Configmenu; | ||
69 | class Workspacemenu; | ||
70 | class Iconmenu; | ||
71 | class Rootmenu; | ||
68 | 72 | ||
69 | class BScreen : public ScreenInfo { | 73 | class BScreen : public ScreenInfo { |
70 | public: | 74 | public: |
71 | typedef std::vector<Workspace *> Workspaces; | 75 | typedef std::vector<Workspace *> Workspaces; |
72 | typedef std::vector<std::string> WorkspaceNames; | 76 | typedef std::vector<std::string> WorkspaceNames; |
73 | 77 | ||
74 | BScreen(ResourceManager &rm, Fluxbox *b, | 78 | BScreen(ResourceManager &rm, |
75 | const std::string &screenname, const std::string &altscreenname, | 79 | const std::string &screenname, const std::string &altscreenname, |
76 | int scrn); | 80 | int scrn); |
77 | ~BScreen(); | 81 | ~BScreen(); |
@@ -99,8 +103,10 @@ public: | |||
99 | 103 | ||
100 | inline const FbTk::Color *getBorderColor() const { return &theme->getBorderColor(); } | 104 | inline const FbTk::Color *getBorderColor() const { return &theme->getBorderColor(); } |
101 | inline BImageControl *getImageControl() { return image_control; } | 105 | inline BImageControl *getImageControl() { return image_control; } |
102 | inline Rootmenu *getRootmenu() { return rootmenu; } | 106 | const Rootmenu * const getRootmenu() const { return rootmenu; } |
103 | inline const std::string &getRootCommand(void ) const { return *resource.rootcommand; } | 107 | Rootmenu * const getRootmenu() { return rootmenu; } |
108 | |||
109 | inline const std::string &getRootCommand() const { return *resource.rootcommand; } | ||
104 | #ifdef SLIT | 110 | #ifdef SLIT |
105 | inline bool isSlitOnTop() const { return resource.slit_on_top; } | 111 | inline bool isSlitOnTop() const { return resource.slit_on_top; } |
106 | inline bool doSlitAutoHide() const { return resource.slit_auto_hide; } | 112 | inline bool doSlitAutoHide() const { return resource.slit_auto_hide; } |
@@ -119,12 +125,14 @@ public: | |||
119 | 125 | ||
120 | #endif // SLIT | 126 | #endif // SLIT |
121 | 127 | ||
122 | inline Toolbar *getToolbar() { return toolbar; } | 128 | inline const Toolbar * const getToolbar() const { return m_toolbar.get(); } |
129 | inline Toolbar * const getToolbar() { return m_toolbar.get(); } | ||
123 | 130 | ||
124 | inline Workspace *getWorkspace(unsigned int w) { return ( w < workspacesList.size() ? workspacesList[w] : 0); } | 131 | inline Workspace *getWorkspace(unsigned int w) { return ( w < workspacesList.size() ? workspacesList[w] : 0); } |
125 | inline Workspace *getCurrentWorkspace() { return current_workspace; } | 132 | inline Workspace *getCurrentWorkspace() { return current_workspace; } |
126 | 133 | ||
127 | inline Workspacemenu *getWorkspacemenu() { return workspacemenu; } | 134 | const Workspacemenu * const getWorkspacemenu() const { return workspacemenu; } |
135 | Workspacemenu * const getWorkspacemenu() { return workspacemenu; } | ||
128 | 136 | ||
129 | inline unsigned int getHandleWidth() const { return theme->getHandleWidth(); } | 137 | inline unsigned int getHandleWidth() const { return theme->getHandleWidth(); } |
130 | inline unsigned int getBevelWidth() const { return theme->getBevelWidth(); } | 138 | inline unsigned int getBevelWidth() const { return theme->getBevelWidth(); } |
@@ -201,8 +209,8 @@ public: | |||
201 | inline void saveSloppyWindowGrouping(bool s) { resource.sloppy_window_grouping = s; } | 209 | inline void saveSloppyWindowGrouping(bool s) { resource.sloppy_window_grouping = s; } |
202 | inline void saveWorkspaceWarping(bool s) { resource.workspace_warping = s; } | 210 | inline void saveWorkspaceWarping(bool s) { resource.workspace_warping = s; } |
203 | inline void saveDesktopWheeling(bool s) { resource.desktop_wheeling = s; } | 211 | inline void saveDesktopWheeling(bool s) { resource.desktop_wheeling = s; } |
204 | inline void iconUpdate() { iconmenu->update(); } | 212 | void iconUpdate(); |
205 | inline Iconmenu *getIconmenu() { return iconmenu; } | 213 | inline const Iconmenu *getIconmenu() const { return m_iconmenu; } |
206 | inline void setAutoGroupWindow(Window w = 0) { auto_group_window = w; } | 214 | inline void setAutoGroupWindow(Window w = 0) { auto_group_window = w; } |
207 | void setAntialias(bool value); | 215 | void setAntialias(bool value); |
208 | 216 | ||
@@ -289,6 +297,12 @@ public: | |||
289 | }; | 297 | }; |
290 | 298 | ||
291 | private: | 299 | private: |
300 | void createStyleMenu(Rootmenu *menu, bool newmenu, const char *label, const char *directory); | ||
301 | |||
302 | bool parseMenuFile(std::ifstream &, Rootmenu *, int&); | ||
303 | |||
304 | void initMenu(); | ||
305 | |||
292 | bool doSkipWindow(const FluxboxWindow *w, int options); | 306 | bool doSkipWindow(const FluxboxWindow *w, int options); |
293 | 307 | ||
294 | ScreenSubject | 308 | ScreenSubject |
@@ -297,7 +311,6 @@ private: | |||
297 | m_workspacenames_sig, ///< workspace names signal | 311 | m_workspacenames_sig, ///< workspace names signal |
298 | m_currentworkspace_sig; ///< current workspace signal | 312 | m_currentworkspace_sig; ///< current workspace signal |
299 | 313 | ||
300 | |||
301 | 314 | ||
302 | Theme *theme; | 315 | Theme *theme; |
303 | 316 | ||
@@ -306,10 +319,9 @@ private: | |||
306 | Pixmap geom_pixmap; | 319 | Pixmap geom_pixmap; |
307 | Window geom_window; | 320 | Window geom_window; |
308 | 321 | ||
309 | Fluxbox *fluxbox; | ||
310 | BImageControl *image_control; | 322 | BImageControl *image_control; |
311 | Configmenu *configmenu; | 323 | Configmenu *configmenu; |
312 | Iconmenu *iconmenu; | 324 | Iconmenu *m_iconmenu; |
313 | 325 | ||
314 | Rootmenu *rootmenu; | 326 | Rootmenu *rootmenu; |
315 | 327 | ||
@@ -320,11 +332,11 @@ private: | |||
320 | Netizens netizenList; | 332 | Netizens netizenList; |
321 | Icons iconList; | 333 | Icons iconList; |
322 | 334 | ||
323 | #ifdef SLIT | 335 | #ifdef SLIT |
324 | Slit *slit; | 336 | Slit *slit; |
325 | #endif // SLIT | 337 | #endif // SLIT |
326 | 338 | ||
327 | Toolbar *toolbar; | 339 | std::auto_ptr<Toolbar> m_toolbar; |
328 | Workspace *current_workspace; | 340 | Workspace *current_workspace; |
329 | Workspacemenu *workspacemenu; | 341 | Workspacemenu *workspacemenu; |
330 | 342 | ||
@@ -382,22 +394,7 @@ private: | |||
382 | #endif // HAVE_STRFTIME | 394 | #endif // HAVE_STRFTIME |
383 | 395 | ||
384 | } resource; | 396 | } resource; |
385 | |||
386 | void createStyleMenu(Rootmenu *menu, bool newmenu, const char *label, const char *directory); | ||
387 | protected: | ||
388 | bool parseMenuFile(std::ifstream &, Rootmenu *, int&); | ||
389 | |||
390 | bool readDatabaseTexture(char *, char *, FbTk::Texture *, unsigned long); | ||
391 | bool readDatabaseColor(char *, char *, FbTk::Color *, unsigned long); | ||
392 | |||
393 | void readDatabaseFontSet(char *, char *, XFontSet *); | ||
394 | XFontSet createFontSet(char *); | ||
395 | void readDatabaseFont(char *, char *, XFontStruct **); | ||
396 | |||
397 | void initMenu(); | ||
398 | |||
399 | |||
400 | }; | 397 | }; |
401 | 398 | ||
402 | 399 | ||
403 | #endif // _SCREEN_HH_ | 400 | #endif // SCREEN_HH |