diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2008-08-14 05:52:39 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2008-08-14 05:52:39 (GMT) |
commit | e169d33552c8e7070aa6e13da0187f2013b4cfc3 (patch) | |
tree | ae9e92c7e885791c7f47645184070cbcd441ab94 /src/Screen.hh | |
parent | c82e7c0080f8a5c14dcf95ec92dc42f59ea9dd8b (diff) | |
parent | 91ca3bc5c8e2b892a9a81b18246f72aba7deebfd (diff) | |
download | fluxbox_lack-e169d33552c8e7070aa6e13da0187f2013b4cfc3.zip fluxbox_lack-e169d33552c8e7070aa6e13da0187f2013b4cfc3.tar.bz2 |
Merge branch 'master' into to_push
Diffstat (limited to 'src/Screen.hh')
-rw-r--r-- | src/Screen.hh | 54 |
1 files changed, 31 insertions, 23 deletions
diff --git a/src/Screen.hh b/src/Screen.hh index d42fea0..bfdfd69 100644 --- a/src/Screen.hh +++ b/src/Screen.hh | |||
@@ -30,7 +30,7 @@ | |||
30 | #include "RootTheme.hh" | 30 | #include "RootTheme.hh" |
31 | #include "WinButtonTheme.hh" | 31 | #include "WinButtonTheme.hh" |
32 | #include "FbWinFrameTheme.hh" | 32 | #include "FbWinFrameTheme.hh" |
33 | #include "OSDWindow.hh" | 33 | #include "TooltipWindow.hh" |
34 | 34 | ||
35 | #include "FbTk/MenuTheme.hh" | 35 | #include "FbTk/MenuTheme.hh" |
36 | #include "FbTk/EventHandler.hh" | 36 | #include "FbTk/EventHandler.hh" |
@@ -54,6 +54,7 @@ | |||
54 | #include <map> | 54 | #include <map> |
55 | 55 | ||
56 | class ClientPattern; | 56 | class ClientPattern; |
57 | class FbMenu; | ||
57 | class Focusable; | 58 | class Focusable; |
58 | class FluxboxWindow; | 59 | class FluxboxWindow; |
59 | class WinClient; | 60 | class WinClient; |
@@ -64,6 +65,8 @@ class Toolbar; | |||
64 | class HeadArea; | 65 | class HeadArea; |
65 | class FocusControl; | 66 | class FocusControl; |
66 | class ScreenPlacement; | 67 | class ScreenPlacement; |
68 | class TooltipWindow; | ||
69 | class OSDWindow; | ||
67 | 70 | ||
68 | namespace FbTk { | 71 | namespace FbTk { |
69 | class Menu; | 72 | class Menu; |
@@ -73,6 +76,7 @@ class FbWindow; | |||
73 | class Subject; | 76 | class Subject; |
74 | } | 77 | } |
75 | 78 | ||
79 | |||
76 | /// Handles screen connection, screen clients and workspaces | 80 | /// Handles screen connection, screen clients and workspaces |
77 | /** | 81 | /** |
78 | Create workspaces, handles switching between workspaces and windows | 82 | Create workspaces, handles switching between workspaces and windows |
@@ -116,15 +120,15 @@ public: | |||
116 | bool doShowWindowPos() const { return *resource.show_window_pos; } | 120 | bool doShowWindowPos() const { return *resource.show_window_pos; } |
117 | bool decorateTransient() const { return *resource.decorate_transient; } | 121 | bool decorateTransient() const { return *resource.decorate_transient; } |
118 | const std::string &defaultDeco() const { return *resource.default_deco; } | 122 | const std::string &defaultDeco() const { return *resource.default_deco; } |
119 | const std::string &windowMenuFilename() const { return *resource.windowmenufile; } | 123 | const std::string windowMenuFilename() const; |
120 | FbTk::ImageControl &imageControl() { return *m_image_control.get(); } | 124 | FbTk::ImageControl &imageControl() { return *m_image_control.get(); } |
121 | // menus | 125 | // menus |
122 | const FbTk::Menu &rootMenu() const { return *m_rootmenu.get(); } | 126 | const FbMenu &rootMenu() const { return *m_rootmenu.get(); } |
123 | FbTk::Menu &rootMenu() { return *m_rootmenu.get(); } | 127 | FbMenu &rootMenu() { return *m_rootmenu.get(); } |
124 | const FbTk::Menu &configMenu() const { return *m_configmenu.get(); } | 128 | const FbMenu &configMenu() const { return *m_configmenu.get(); } |
125 | FbTk::Menu &configMenu() { return *m_configmenu.get(); } | 129 | FbMenu &configMenu() { return *m_configmenu.get(); } |
126 | const FbTk::Menu &windowMenu() const { return *m_windowmenu.get(); } | 130 | const FbMenu &windowMenu() const { return *m_windowmenu.get(); } |
127 | FbTk::Menu &windowMenu() { return *m_windowmenu.get(); } | 131 | FbMenu &windowMenu() { return *m_windowmenu.get(); } |
128 | ExtraMenus &extraWindowMenus() { return m_extramenus; } | 132 | ExtraMenus &extraWindowMenus() { return m_extramenus; } |
129 | const ExtraMenus &extraWindowMenus() const { return m_extramenus; } | 133 | const ExtraMenus &extraWindowMenus() const { return m_extramenus; } |
130 | 134 | ||
@@ -163,9 +167,9 @@ public: | |||
163 | Workspace *currentWorkspace() { return m_current_workspace; } | 167 | Workspace *currentWorkspace() { return m_current_workspace; } |
164 | const Workspace *currentWorkspace() const { return m_current_workspace; } | 168 | const Workspace *currentWorkspace() const { return m_current_workspace; } |
165 | /// @return the workspace menu | 169 | /// @return the workspace menu |
166 | const FbTk::Menu &workspaceMenu() const { return *m_workspacemenu.get(); } | 170 | const FbMenu &workspaceMenu() const { return *m_workspacemenu.get(); } |
167 | /// @return the workspace menu | 171 | /// @return the workspace menu |
168 | FbTk::Menu &workspaceMenu() { return *m_workspacemenu.get(); } | 172 | FbMenu &workspaceMenu() { return *m_workspacemenu.get(); } |
169 | /// @return focus control handler | 173 | /// @return focus control handler |
170 | const FocusControl &focusControl() const { return *m_focus_control; } | 174 | const FocusControl &focusControl() const { return *m_focus_control; } |
171 | /// @return focus control handler | 175 | /// @return focus control handler |
@@ -248,15 +252,15 @@ public: | |||
248 | /** | 252 | /** |
249 | * Creates an empty menu with specified label | 253 | * Creates an empty menu with specified label |
250 | * @param label for the menu | 254 | * @param label for the menu |
251 | * @return create menu | 255 | * @return created menu |
252 | */ | 256 | */ |
253 | FbTk::Menu *createMenu(const std::string &label); | 257 | FbMenu *createMenu(const std::string &label); |
254 | /** | 258 | /** |
255 | * Creates an empty toggle menu with a specific label | 259 | * Creates an empty toggle menu with a specific label |
256 | * @param label | 260 | * @param label |
257 | * @return created menu | 261 | * @return created menu |
258 | */ | 262 | */ |
259 | FbTk::Menu *createToggleMenu(const std::string &label); | 263 | FbMenu *createToggleMenu(const std::string &label); |
260 | 264 | ||
261 | /** | 265 | /** |
262 | * For extras to add menus. | 266 | * For extras to add menus. |
@@ -273,8 +277,6 @@ public: | |||
273 | 277 | ||
274 | void saveWorkspaces(int w) { *resource.workspaces = w; } | 278 | void saveWorkspaces(int w) { *resource.workspaces = w; } |
275 | 279 | ||
276 | void saveMenu(FbTk::Menu &menu) { m_rootmenu_list.push_back(&menu); } | ||
277 | |||
278 | FbTk::ThemeProxy<FbWinFrameTheme> &focusedWinFrameTheme() { return *m_focused_windowtheme.get(); } | 280 | FbTk::ThemeProxy<FbWinFrameTheme> &focusedWinFrameTheme() { return *m_focused_windowtheme.get(); } |
279 | const FbTk::ThemeProxy<FbWinFrameTheme> &focusedWinFrameTheme() const { return *m_focused_windowtheme.get(); } | 281 | const FbTk::ThemeProxy<FbWinFrameTheme> &focusedWinFrameTheme() const { return *m_focused_windowtheme.get(); } |
280 | FbTk::ThemeProxy<FbWinFrameTheme> &unfocusedWinFrameTheme() { return *m_unfocused_windowtheme.get(); } | 282 | FbTk::ThemeProxy<FbWinFrameTheme> &unfocusedWinFrameTheme() { return *m_unfocused_windowtheme.get(); } |
@@ -382,6 +384,7 @@ public: | |||
382 | void reconfigure(); | 384 | void reconfigure(); |
383 | void reconfigureTabs(); | 385 | void reconfigureTabs(); |
384 | void rereadMenu(); | 386 | void rereadMenu(); |
387 | void rereadWindowMenu(); | ||
385 | void shutdown(); | 388 | void shutdown(); |
386 | /// show position window centered on the screen with "X x Y" text | 389 | /// show position window centered on the screen with "X x Y" text |
387 | void showPosition(int x, int y); | 390 | void showPosition(int x, int y); |
@@ -390,6 +393,13 @@ public: | |||
390 | void showGeometry(int width, int height); | 393 | void showGeometry(int width, int height); |
391 | void hideGeometry(); | 394 | void hideGeometry(); |
392 | 395 | ||
396 | /// @param text the text to be displayed in the tooltip window | ||
397 | void showTooltip(const std::string &text); | ||
398 | /// Hides the tooltip window | ||
399 | void hideTooltip(); | ||
400 | |||
401 | TooltipWindow& tooltipWindow() { return *m_tooltip_window; } | ||
402 | |||
393 | void setLayer(FbTk::XLayerItem &item, int layernum); | 403 | void setLayer(FbTk::XLayerItem &item, int layernum); |
394 | // remove? no, items are never removed from their layer until they die | 404 | // remove? no, items are never removed from their layer until they die |
395 | 405 | ||
@@ -481,7 +491,6 @@ public: | |||
481 | 491 | ||
482 | private: | 492 | private: |
483 | void setupConfigmenu(FbTk::Menu &menu); | 493 | void setupConfigmenu(FbTk::Menu &menu); |
484 | void initMenu(); | ||
485 | void renderGeomWindow(); | 494 | void renderGeomWindow(); |
486 | void renderPosWindow(); | 495 | void renderPosWindow(); |
487 | 496 | ||
@@ -507,15 +516,13 @@ private: | |||
507 | 516 | ||
508 | 517 | ||
509 | std::auto_ptr<FbTk::ImageControl> m_image_control; | 518 | std::auto_ptr<FbTk::ImageControl> m_image_control; |
510 | std::auto_ptr<FbTk::Menu> m_configmenu, m_rootmenu, m_workspacemenu, m_windowmenu; | 519 | std::auto_ptr<FbMenu> m_configmenu, m_rootmenu, m_workspacemenu, m_windowmenu; |
511 | 520 | ||
512 | ExtraMenus m_extramenus; | 521 | ExtraMenus m_extramenus; |
513 | 522 | ||
514 | typedef std::list<FbTk::Menu *> Rootmenus; | ||
515 | typedef std::list<std::pair<FbTk::FbString, FbTk::Menu *> > Configmenus; | 523 | typedef std::list<std::pair<FbTk::FbString, FbTk::Menu *> > Configmenus; |
516 | 524 | ||
517 | 525 | ||
518 | Rootmenus m_rootmenu_list; | ||
519 | Configmenus m_configmenu_list; | 526 | Configmenus m_configmenu_list; |
520 | Icons m_icon_list; | 527 | Icons m_icon_list; |
521 | 528 | ||
@@ -535,14 +542,15 @@ private: | |||
535 | std::auto_ptr<RootTheme> m_root_theme; | 542 | std::auto_ptr<RootTheme> m_root_theme; |
536 | 543 | ||
537 | FbRootWindow m_root_window; | 544 | FbRootWindow m_root_window; |
538 | OSDWindow m_geom_window, m_pos_window; | 545 | std::auto_ptr<OSDWindow> m_geom_window, m_pos_window; |
546 | std::auto_ptr<TooltipWindow> m_tooltip_window; | ||
539 | FbTk::FbWindow m_dummy_window; | 547 | FbTk::FbWindow m_dummy_window; |
540 | 548 | ||
541 | struct ScreenResource { | 549 | struct ScreenResource { |
542 | ScreenResource(FbTk::ResourceManager &rm, const std::string &scrname, | 550 | ScreenResource(FbTk::ResourceManager &rm, const std::string &scrname, |
543 | const std::string &altscrname); | 551 | const std::string &altscrname); |
544 | 552 | ||
545 | FbTk::Resource<bool> image_dither, opaque_move, full_max, | 553 | FbTk::Resource<bool> opaque_move, full_max, |
546 | max_ignore_inc, max_disable_move, max_disable_resize, | 554 | max_ignore_inc, max_disable_move, max_disable_resize, |
547 | workspace_warping, show_window_pos, auto_raise, click_raises, | 555 | workspace_warping, show_window_pos, auto_raise, click_raises, |
548 | decorate_transient; | 556 | decorate_transient; |
@@ -552,9 +560,9 @@ private: | |||
552 | FbTk::Resource<std::string> windowmenufile; | 560 | FbTk::Resource<std::string> windowmenufile; |
553 | FbTk::Resource<unsigned int> typing_delay; | 561 | FbTk::Resource<unsigned int> typing_delay; |
554 | FbTk::Resource<FollowModel> follow_model, user_follow_model; | 562 | FbTk::Resource<FollowModel> follow_model, user_follow_model; |
555 | bool ordered_dither; | ||
556 | FbTk::Resource<int> workspaces, edge_snap_threshold, focused_alpha, | 563 | FbTk::Resource<int> workspaces, edge_snap_threshold, focused_alpha, |
557 | unfocused_alpha, menu_alpha, menu_delay, menu_delay_close, tab_width; | 564 | unfocused_alpha, menu_alpha, menu_delay, menu_delay_close, |
565 | tab_width, tooltip_delay; | ||
558 | FbTk::Resource<FbTk::MenuTheme::MenuMode> menu_mode; | 566 | FbTk::Resource<FbTk::MenuTheme::MenuMode> menu_mode; |
559 | 567 | ||
560 | FbTk::Resource<int> gc_line_width; | 568 | FbTk::Resource<int> gc_line_width; |