diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2007-12-28 07:16:17 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2007-12-28 07:16:17 (GMT) |
commit | 2940869cd7cc1688be5114451380275c9a85f5d1 (patch) | |
tree | 8200e95524356dfd45cb9ceaef0b4ea4b0816fa9 | |
parent | 62bcfaf0e4fd7d77873343d880fc526ec58cdaa6 (diff) | |
download | fluxbox_pavel-2940869cd7cc1688be5114451380275c9a85f5d1.zip fluxbox_pavel-2940869cd7cc1688be5114451380275c9a85f5d1.tar.bz2 |
merge MenuTheme with FbTk::MenuTheme
-rw-r--r-- | src/AlphaMenu.cc | 2 | ||||
-rw-r--r-- | src/AlphaMenu.hh | 2 | ||||
-rw-r--r-- | src/FbMenu.cc | 6 | ||||
-rw-r--r-- | src/FbMenu.hh | 5 | ||||
-rw-r--r-- | src/FbTk/MenuTheme.cc | 4 | ||||
-rw-r--r-- | src/FbTk/MenuTheme.hh | 75 | ||||
-rw-r--r-- | src/LayerMenu.cc | 2 | ||||
-rw-r--r-- | src/LayerMenu.hh | 2 | ||||
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/MenuTheme.cc | 31 | ||||
-rw-r--r-- | src/MenuTheme.hh | 40 | ||||
-rw-r--r-- | src/Screen.cc | 4 | ||||
-rw-r--r-- | src/Screen.hh | 8 | ||||
-rw-r--r-- | src/ToggleMenu.hh | 2 | ||||
-rw-r--r-- | src/Xinerama.hh | 4 |
15 files changed, 60 insertions, 128 deletions
diff --git a/src/AlphaMenu.cc b/src/AlphaMenu.cc index fdea426..8903fa4 100644 --- a/src/AlphaMenu.cc +++ b/src/AlphaMenu.cc | |||
@@ -36,7 +36,7 @@ | |||
36 | #include "FbTk/I18n.hh" | 36 | #include "FbTk/I18n.hh" |
37 | #include "Window.hh" | 37 | #include "Window.hh" |
38 | 38 | ||
39 | AlphaMenu::AlphaMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl, | 39 | AlphaMenu::AlphaMenu(FbTk::MenuTheme &tm, FbTk::ImageControl &imgctrl, |
40 | FbTk::XLayer &layer): | 40 | FbTk::XLayer &layer): |
41 | ToggleMenu(tm, imgctrl, layer) | 41 | ToggleMenu(tm, imgctrl, layer) |
42 | { | 42 | { |
diff --git a/src/AlphaMenu.hh b/src/AlphaMenu.hh index 19df646..97d0cbe 100644 --- a/src/AlphaMenu.hh +++ b/src/AlphaMenu.hh | |||
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | class AlphaMenu : public ToggleMenu { | 32 | class AlphaMenu : public ToggleMenu { |
33 | public: | 33 | public: |
34 | AlphaMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl, | 34 | AlphaMenu(FbTk::MenuTheme &tm, FbTk::ImageControl &imgctrl, |
35 | FbTk::XLayer &layer); | 35 | FbTk::XLayer &layer); |
36 | 36 | ||
37 | // we override these to update the menu when the active window changes | 37 | // we override these to update the menu when the active window changes |
diff --git a/src/FbMenu.cc b/src/FbMenu.cc index 8065294..65fbecd 100644 --- a/src/FbMenu.cc +++ b/src/FbMenu.cc | |||
@@ -25,12 +25,12 @@ | |||
25 | #include "FbMenu.hh" | 25 | #include "FbMenu.hh" |
26 | 26 | ||
27 | #include "fluxbox.hh" | 27 | #include "fluxbox.hh" |
28 | #include "MenuTheme.hh" | 28 | #include "FbTk/MenuTheme.hh" |
29 | #include "Screen.hh" | 29 | #include "Screen.hh" |
30 | 30 | ||
31 | #include "FbTk/Shape.hh" | 31 | #include "FbTk/Shape.hh" |
32 | 32 | ||
33 | FbMenu::FbMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl, | 33 | FbMenu::FbMenu(FbTk::MenuTheme &tm, FbTk::ImageControl &imgctrl, |
34 | FbTk::XLayer &layer): | 34 | FbTk::XLayer &layer): |
35 | FbTk::Menu(tm, imgctrl), | 35 | FbTk::Menu(tm, imgctrl), |
36 | m_layeritem(fbwindow(), layer), | 36 | m_layeritem(fbwindow(), layer), |
@@ -53,7 +53,7 @@ void FbMenu::clearWindow() { | |||
53 | } | 53 | } |
54 | 54 | ||
55 | void FbMenu::reconfigure() { | 55 | void FbMenu::reconfigure() { |
56 | m_shape->setPlaces(dynamic_cast<const MenuTheme&>(theme()).shapePlaces()); | 56 | m_shape->setPlaces(theme().shapePlaces()); |
57 | FbTk::Menu::reconfigure(); | 57 | FbTk::Menu::reconfigure(); |
58 | } | 58 | } |
59 | 59 | ||
diff --git a/src/FbMenu.hh b/src/FbMenu.hh index 6e43d8f..ef8670d 100644 --- a/src/FbMenu.hh +++ b/src/FbMenu.hh | |||
@@ -28,16 +28,15 @@ | |||
28 | #include "XLayerItem.hh" | 28 | #include "XLayerItem.hh" |
29 | #include <memory> | 29 | #include <memory> |
30 | 30 | ||
31 | class MenuTheme; | ||
32 | |||
33 | namespace FbTk { | 31 | namespace FbTk { |
32 | class MenuTheme; | ||
34 | class Shape; | 33 | class Shape; |
35 | } | 34 | } |
36 | 35 | ||
37 | /// a layered and shaped menu | 36 | /// a layered and shaped menu |
38 | class FbMenu:public FbTk::Menu { | 37 | class FbMenu:public FbTk::Menu { |
39 | public: | 38 | public: |
40 | FbMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl, | 39 | FbMenu(FbTk::MenuTheme &tm, FbTk::ImageControl &imgctrl, |
41 | FbTk::XLayer &layer); | 40 | FbTk::XLayer &layer); |
42 | virtual ~FbMenu(); | 41 | virtual ~FbMenu(); |
43 | void updateMenu(int index = -1); | 42 | void updateMenu(int index = -1); |
diff --git a/src/FbTk/MenuTheme.cc b/src/FbTk/MenuTheme.cc index 18e51aa..239313c 100644 --- a/src/FbTk/MenuTheme.cc +++ b/src/FbTk/MenuTheme.cc | |||
@@ -54,6 +54,7 @@ MenuTheme::MenuTheme(int screen_num): | |||
54 | titlefont_justify(*this, "menu.title.justify", "Menu.Title.Justify"), | 54 | titlefont_justify(*this, "menu.title.justify", "Menu.Title.Justify"), |
55 | bullet_pos(*this, "menu.bullet.position", "Menu.Bullet.Position"), | 55 | bullet_pos(*this, "menu.bullet.position", "Menu.Bullet.Position"), |
56 | m_bullet(*this, "menu.bullet", "Menu.Bullet"), | 56 | m_bullet(*this, "menu.bullet", "Menu.Bullet"), |
57 | m_shapeplace(*this, "menu.roundCorners", "Menu.RoundCorners"), | ||
57 | m_title_height(*this, "menu.titleHeight", "Menu.TitleHeight"), | 58 | m_title_height(*this, "menu.titleHeight", "Menu.TitleHeight"), |
58 | m_item_height(*this, "menu.itemHeight", "Menu.ItemHeight"), | 59 | m_item_height(*this, "menu.itemHeight", "Menu.ItemHeight"), |
59 | m_border_width(*this, "menu.borderWidth", "Menu.BorderWidth"), | 60 | m_border_width(*this, "menu.borderWidth", "Menu.BorderWidth"), |
@@ -78,11 +79,12 @@ MenuTheme::MenuTheme(int screen_num): | |||
78 | m_delayclose(0), // no delay as default | 79 | m_delayclose(0), // no delay as default |
79 | m_real_title_height(*m_title_height), | 80 | m_real_title_height(*m_title_height), |
80 | m_real_item_height(*m_item_height) | 81 | m_real_item_height(*m_item_height) |
81 | { | 82 | { |
82 | // set default values | 83 | // set default values |
83 | *m_border_width = 0; | 84 | *m_border_width = 0; |
84 | *m_bevel_width = 0; | 85 | *m_bevel_width = 0; |
85 | *m_border_width = 0; | 86 | *m_border_width = 0; |
87 | *m_shapeplace = FbTk::Shape::NONE; | ||
86 | 88 | ||
87 | ThemeManager::instance().loadTheme(*this); | 89 | ThemeManager::instance().loadTheme(*this); |
88 | 90 | ||
diff --git a/src/FbTk/MenuTheme.hh b/src/FbTk/MenuTheme.hh index 0bb77ef..d76c2fb 100644 --- a/src/FbTk/MenuTheme.hh +++ b/src/FbTk/MenuTheme.hh | |||
@@ -27,6 +27,7 @@ | |||
27 | #include "Theme.hh" | 27 | #include "Theme.hh" |
28 | #include "Color.hh" | 28 | #include "Color.hh" |
29 | #include "Font.hh" | 29 | #include "Font.hh" |
30 | #include "Shape.hh" | ||
30 | #include "Texture.hh" | 31 | #include "Texture.hh" |
31 | #include "Text.hh" | 32 | #include "Text.hh" |
32 | #include "Subject.hh" | 33 | #include "Subject.hh" |
@@ -35,7 +36,7 @@ | |||
35 | 36 | ||
36 | namespace FbTk { | 37 | namespace FbTk { |
37 | 38 | ||
38 | class MenuTheme:public FbTk::Theme { | 39 | class MenuTheme:public Theme { |
39 | public: | 40 | public: |
40 | //!! TODO | 41 | //!! TODO |
41 | // this isn't actually used with a theme item | 42 | // this isn't actually used with a theme item |
@@ -54,40 +55,40 @@ public: | |||
54 | @name text colors | 55 | @name text colors |
55 | */ | 56 | */ |
56 | ///@{ | 57 | ///@{ |
57 | inline const FbTk::Color &titleTextColor() const { return *t_text; } | 58 | inline const Color &titleTextColor() const { return *t_text; } |
58 | inline const FbTk::Color &frameTextColor() const { return *f_text; } | 59 | inline const Color &frameTextColor() const { return *f_text; } |
59 | inline const FbTk::Color &frameUnderlineColor() const { return *u_text; } | 60 | inline const Color &frameUnderlineColor() const { return *u_text; } |
60 | inline const FbTk::Color &highlightTextColor() const { return *h_text; } | 61 | inline const Color &highlightTextColor() const { return *h_text; } |
61 | inline const FbTk::Color &disableTextColor() const { return *d_text; } | 62 | inline const Color &disableTextColor() const { return *d_text; } |
62 | ///@} | 63 | ///@} |
63 | /** | 64 | /** |
64 | @name textures | 65 | @name textures |
65 | */ | 66 | */ |
66 | ///@{ | 67 | ///@{ |
67 | inline const FbTk::Texture &titleTexture() const { return *title; } | 68 | inline const Texture &titleTexture() const { return *title; } |
68 | inline const FbTk::Texture &frameTexture() const { return *frame; } | 69 | inline const Texture &frameTexture() const { return *frame; } |
69 | inline const FbTk::Texture &hiliteTexture() const { return *hilite; } | 70 | inline const Texture &hiliteTexture() const { return *hilite; } |
70 | ///@} | 71 | ///@} |
71 | 72 | ||
72 | inline const FbTk::PixmapWithMask &bulletPixmap() const { return *m_bullet_pixmap; } | 73 | inline const PixmapWithMask &bulletPixmap() const { return *m_bullet_pixmap; } |
73 | inline const FbTk::PixmapWithMask &selectedPixmap() const { return *m_selected_pixmap; } | 74 | inline const PixmapWithMask &selectedPixmap() const { return *m_selected_pixmap; } |
74 | inline const FbTk::PixmapWithMask &unselectedPixmap() const { return *m_unselected_pixmap; } | 75 | inline const PixmapWithMask &unselectedPixmap() const { return *m_unselected_pixmap; } |
75 | 76 | ||
76 | inline const FbTk::PixmapWithMask &highlightBulletPixmap() const { return *m_hl_bullet_pixmap; } | 77 | inline const PixmapWithMask &highlightBulletPixmap() const { return *m_hl_bullet_pixmap; } |
77 | inline const FbTk::PixmapWithMask &highlightSelectedPixmap() const { return *m_hl_selected_pixmap; } | 78 | inline const PixmapWithMask &highlightSelectedPixmap() const { return *m_hl_selected_pixmap; } |
78 | inline const FbTk::PixmapWithMask &highlightUnselectedPixmap() const { return *m_hl_unselected_pixmap; } | 79 | inline const PixmapWithMask &highlightUnselectedPixmap() const { return *m_hl_unselected_pixmap; } |
79 | /** | 80 | /** |
80 | @name fonts | 81 | @name fonts |
81 | */ | 82 | */ |
82 | ///@{ | 83 | ///@{ |
83 | inline const FbTk::Font &titleFont() const { return *titlefont; } | 84 | inline const Font &titleFont() const { return *titlefont; } |
84 | inline FbTk::Font &titleFont() { return *titlefont; } | 85 | inline Font &titleFont() { return *titlefont; } |
85 | inline const FbTk::Font &frameFont() const { return *framefont; } | 86 | inline const Font &frameFont() const { return *framefont; } |
86 | inline FbTk::Font &frameFont() { return *framefont; } | 87 | inline Font &frameFont() { return *framefont; } |
87 | ///@} | 88 | ///@} |
88 | 89 | ||
89 | inline FbTk::Justify frameFontJustify() const { return *framefont_justify; } | 90 | inline Justify frameFontJustify() const { return *framefont_justify; } |
90 | inline FbTk::Justify titleFontJustify() const { return *titlefont_justify; } | 91 | inline Justify titleFontJustify() const { return *titlefont_justify; } |
91 | 92 | ||
92 | /** | 93 | /** |
93 | @name graphic contexts | 94 | @name graphic contexts |
@@ -107,7 +108,7 @@ public: | |||
107 | inline GContext &hiliteGC() { return hilite_gc; } | 108 | inline GContext &hiliteGC() { return hilite_gc; } |
108 | ///@} | 109 | ///@} |
109 | inline BulletType bullet() const { return *m_bullet; } | 110 | inline BulletType bullet() const { return *m_bullet; } |
110 | inline FbTk::Justify bulletPos() const { return *bullet_pos; } | 111 | inline Justify bulletPos() const { return *bullet_pos; } |
111 | 112 | ||
112 | inline unsigned int titleHeight() const { return m_real_title_height; } | 113 | inline unsigned int titleHeight() const { return m_real_title_height; } |
113 | inline unsigned int itemHeight() const { return m_real_item_height; } | 114 | inline unsigned int itemHeight() const { return m_real_item_height; } |
@@ -126,7 +127,8 @@ public: | |||
126 | inline int delayOpen() const { return m_delayopen; } | 127 | inline int delayOpen() const { return m_delayopen; } |
127 | inline int delayClose() const { return m_delayclose; } | 128 | inline int delayClose() const { return m_delayclose; } |
128 | 129 | ||
129 | inline const FbTk::Color &borderColor() const { return *m_border_color; } | 130 | inline const Color &borderColor() const { return *m_border_color; } |
131 | inline Shape::ShapePlace shapePlaces() const { return *m_shapeplace; } | ||
130 | 132 | ||
131 | // special override | 133 | // special override |
132 | inline void setSelectedPixmap(Pixmap pm, bool is_imagecached) { | 134 | inline void setSelectedPixmap(Pixmap pm, bool is_imagecached) { |
@@ -142,21 +144,22 @@ public: | |||
142 | } | 144 | } |
143 | 145 | ||
144 | private: | 146 | private: |
145 | FbTk::ThemeItem<FbTk::Color> t_text, f_text, h_text, d_text, u_text; | 147 | ThemeItem<Color> t_text, f_text, h_text, d_text, u_text; |
146 | FbTk::ThemeItem<FbTk::Texture> title, frame, hilite; | 148 | ThemeItem<Texture> title, frame, hilite; |
147 | FbTk::ThemeItem<FbTk::Font> titlefont, framefont; | 149 | ThemeItem<Font> titlefont, framefont; |
148 | FbTk::ThemeItem<FbTk::Justify> framefont_justify, titlefont_justify; | 150 | ThemeItem<Justify> framefont_justify, titlefont_justify; |
149 | FbTk::ThemeItem<FbTk::Justify> bullet_pos; | 151 | ThemeItem<Justify> bullet_pos; |
150 | FbTk::ThemeItem<BulletType> m_bullet; | 152 | ThemeItem<BulletType> m_bullet; |
151 | FbTk::ThemeItem<unsigned int> m_title_height, m_item_height; | 153 | ThemeItem<Shape::ShapePlace> m_shapeplace; |
152 | FbTk::ThemeItem<unsigned int> m_border_width; | 154 | ThemeItem<unsigned int> m_title_height, m_item_height; |
153 | FbTk::ThemeItem<unsigned int> m_bevel_width; | 155 | ThemeItem<unsigned int> m_border_width; |
154 | FbTk::ThemeItem<FbTk::Color> m_border_color; | 156 | ThemeItem<unsigned int> m_bevel_width; |
155 | FbTk::ThemeItem<FbTk::PixmapWithMask> m_bullet_pixmap, m_selected_pixmap, m_unselected_pixmap; | 157 | ThemeItem<Color> m_border_color; |
156 | FbTk::ThemeItem<FbTk::PixmapWithMask> m_hl_bullet_pixmap, m_hl_selected_pixmap, m_hl_unselected_pixmap; | 158 | ThemeItem<PixmapWithMask> m_bullet_pixmap, m_selected_pixmap, m_unselected_pixmap; |
159 | ThemeItem<PixmapWithMask> m_hl_bullet_pixmap, m_hl_selected_pixmap, m_hl_unselected_pixmap; | ||
157 | 160 | ||
158 | Display *m_display; | 161 | Display *m_display; |
159 | FbTk::GContext t_text_gc, f_text_gc, u_text_gc, h_text_gc, d_text_gc, hilite_gc; | 162 | GContext t_text_gc, f_text_gc, u_text_gc, h_text_gc, d_text_gc, hilite_gc; |
160 | 163 | ||
161 | unsigned char m_alpha; | 164 | unsigned char m_alpha; |
162 | MenuMode m_menumode; | 165 | MenuMode m_menumode; |
diff --git a/src/LayerMenu.cc b/src/LayerMenu.cc index 4a02214..d8612e5 100644 --- a/src/LayerMenu.cc +++ b/src/LayerMenu.cc | |||
@@ -30,7 +30,7 @@ | |||
30 | #include "FbTk/SimpleCommand.hh" | 30 | #include "FbTk/SimpleCommand.hh" |
31 | #include "FbTk/I18n.hh" | 31 | #include "FbTk/I18n.hh" |
32 | 32 | ||
33 | LayerMenu::LayerMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl, | 33 | LayerMenu::LayerMenu(FbTk::MenuTheme &tm, FbTk::ImageControl &imgctrl, |
34 | FbTk::XLayer &layer, LayerObject *object, bool save_rc): | 34 | FbTk::XLayer &layer, LayerObject *object, bool save_rc): |
35 | ToggleMenu(tm, imgctrl, layer) { | 35 | ToggleMenu(tm, imgctrl, layer) { |
36 | _FB_USES_NLS; | 36 | _FB_USES_NLS; |
diff --git a/src/LayerMenu.hh b/src/LayerMenu.hh index 7882fd7..fa4987b 100644 --- a/src/LayerMenu.hh +++ b/src/LayerMenu.hh | |||
@@ -64,7 +64,7 @@ private: | |||
64 | /// Create a layer menu inside from the given menu | 64 | /// Create a layer menu inside from the given menu |
65 | class LayerMenu : public ToggleMenu { | 65 | class LayerMenu : public ToggleMenu { |
66 | public: | 66 | public: |
67 | LayerMenu(class MenuTheme &tm, FbTk::ImageControl &imgctrl, | 67 | LayerMenu(class FbTk::MenuTheme &tm, FbTk::ImageControl &imgctrl, |
68 | FbTk::XLayer &layer, LayerObject *item, bool save_rc); | 68 | FbTk::XLayer &layer, LayerObject *item, bool save_rc); |
69 | void show(); | 69 | void show(); |
70 | }; | 70 | }; |
diff --git a/src/Makefile.am b/src/Makefile.am index c128f9f..9b0b1aa 100644 --- a/src/Makefile.am +++ b/src/Makefile.am | |||
@@ -116,7 +116,6 @@ fluxbox_SOURCES = AtomHandler.hh ArrowButton.hh ArrowButton.cc \ | |||
116 | Xutil.hh Xutil.cc \ | 116 | Xutil.hh Xutil.cc \ |
117 | CurrentWindowCmd.hh CurrentWindowCmd.cc \ | 117 | CurrentWindowCmd.hh CurrentWindowCmd.cc \ |
118 | WorkspaceCmd.hh WorkspaceCmd.cc \ | 118 | WorkspaceCmd.hh WorkspaceCmd.cc \ |
119 | MenuTheme.hh MenuTheme.cc \ | ||
120 | CommandDialog.hh CommandDialog.cc SendToMenu.hh SendToMenu.cc \ | 119 | CommandDialog.hh CommandDialog.cc SendToMenu.hh SendToMenu.cc \ |
121 | AlphaMenu.hh AlphaMenu.cc ObjectResource.hh \ | 120 | AlphaMenu.hh AlphaMenu.cc ObjectResource.hh \ |
122 | CompareWindow.hh \ | 121 | CompareWindow.hh \ |
diff --git a/src/MenuTheme.cc b/src/MenuTheme.cc deleted file mode 100644 index d7f8388..0000000 --- a/src/MenuTheme.cc +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | // MenuTheme.cc | ||
2 | // Copyright (c) 2003 Henrik Kinnunen (fluxgen at fluxbox dot org) | ||
3 | // | ||
4 | // Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | // copy of this software and associated documentation files (the "Software"), | ||
6 | // to deal in the Software without restriction, including without limitation | ||
7 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | // and/or sell copies of the Software, and to permit persons to whom the | ||
9 | // Software is furnished to do so, subject to the following conditions: | ||
10 | // | ||
11 | // The above copyright notice and this permission notice shall be included in | ||
12 | // all copies or substantial portions of the Software. | ||
13 | // | ||
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
20 | // DEALINGS IN THE SOFTWARE. | ||
21 | |||
22 | // $Id$ | ||
23 | |||
24 | #include "MenuTheme.hh" | ||
25 | #include "StringUtil.hh" | ||
26 | |||
27 | MenuTheme::MenuTheme(int screen_num):FbTk::MenuTheme(screen_num), | ||
28 | m_shapeplace(*this, "menu.roundCorners", "Menu.RoundCorners") { | ||
29 | *m_shapeplace = FbTk::Shape::NONE; | ||
30 | FbTk::ThemeManager::instance().loadTheme(*this); | ||
31 | } | ||
diff --git a/src/MenuTheme.hh b/src/MenuTheme.hh deleted file mode 100644 index d6a870b..0000000 --- a/src/MenuTheme.hh +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | // MenuTheme.hh | ||
2 | // Copyright (c) 2003 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org) | ||
3 | // | ||
4 | // Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | // copy of this software and associated documentation files (the "Software"), | ||
6 | // to deal in the Software without restriction, including without limitation | ||
7 | // the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | // and/or sell copies of the Software, and to permit persons to whom the | ||
9 | // Software is furnished to do so, subject to the following conditions: | ||
10 | // | ||
11 | // The above copyright notice and this permission notice shall be included in | ||
12 | // all copies or substantial portions of the Software. | ||
13 | // | ||
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
20 | // DEALINGS IN THE SOFTWARE. | ||
21 | |||
22 | // $Id$ | ||
23 | |||
24 | #ifndef MENUTHEME_HH | ||
25 | #define MENUTHEME_HH | ||
26 | |||
27 | #include "FbTk/MenuTheme.hh" | ||
28 | #include "FbTk/Shape.hh" | ||
29 | |||
30 | /// this class extends FbTk MenuTheme and adds shape item | ||
31 | class MenuTheme:public FbTk::MenuTheme { | ||
32 | public: | ||
33 | explicit MenuTheme(int screen_num); | ||
34 | FbTk::Shape::ShapePlace shapePlaces() const { return *m_shapeplace; } | ||
35 | private: | ||
36 | FbTk::ThemeItem<FbTk::Shape::ShapePlace> m_shapeplace; | ||
37 | }; | ||
38 | |||
39 | #endif // MENUTHEME_HH | ||
40 | |||
diff --git a/src/Screen.cc b/src/Screen.cc index 03d8fd2..a09f4d1 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -39,7 +39,7 @@ | |||
39 | 39 | ||
40 | // themes | 40 | // themes |
41 | #include "FbWinFrameTheme.hh" | 41 | #include "FbWinFrameTheme.hh" |
42 | #include "MenuTheme.hh" | 42 | #include "FbTk/MenuTheme.hh" |
43 | #include "RootTheme.hh" | 43 | #include "RootTheme.hh" |
44 | #include "WinButtonTheme.hh" | 44 | #include "WinButtonTheme.hh" |
45 | #include "SlitTheme.hh" | 45 | #include "SlitTheme.hh" |
@@ -357,7 +357,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm, | |||
357 | // because winbutton need to rescale the pixmaps in winbutton theme | 357 | // because winbutton need to rescale the pixmaps in winbutton theme |
358 | // after fbwinframe have resized them | 358 | // after fbwinframe have resized them |
359 | m_winbutton_theme(new WinButtonTheme(scrn, *m_windowtheme)), | 359 | m_winbutton_theme(new WinButtonTheme(scrn, *m_windowtheme)), |
360 | m_menutheme(new MenuTheme(scrn)), | 360 | m_menutheme(new FbTk::MenuTheme(scrn)), |
361 | m_root_window(scrn), | 361 | m_root_window(scrn), |
362 | m_geom_window(m_root_window, | 362 | m_geom_window(m_root_window, |
363 | 0, 0, 10, 10, | 363 | 0, 0, 10, 10, |
diff --git a/src/Screen.hh b/src/Screen.hh index 41a7b90..689150c 100644 --- a/src/Screen.hh +++ b/src/Screen.hh | |||
@@ -29,8 +29,8 @@ | |||
29 | 29 | ||
30 | #include "FbWinFrame.hh" | 30 | #include "FbWinFrame.hh" |
31 | #include "FbRootWindow.hh" | 31 | #include "FbRootWindow.hh" |
32 | #include "MenuTheme.hh" | ||
33 | 32 | ||
33 | #include "FbTk/MenuTheme.hh" | ||
34 | #include "FbTk/EventHandler.hh" | 34 | #include "FbTk/EventHandler.hh" |
35 | #include "FbTk/Resource.hh" | 35 | #include "FbTk/Resource.hh" |
36 | #include "FbTk/Subject.hh" | 36 | #include "FbTk/Subject.hh" |
@@ -279,8 +279,8 @@ public: | |||
279 | 279 | ||
280 | FbWinFrameTheme &winFrameTheme() { return *m_windowtheme.get(); } | 280 | FbWinFrameTheme &winFrameTheme() { return *m_windowtheme.get(); } |
281 | const FbWinFrameTheme &winFrameTheme() const { return *m_windowtheme.get(); } | 281 | const FbWinFrameTheme &winFrameTheme() const { return *m_windowtheme.get(); } |
282 | MenuTheme &menuTheme() { return *m_menutheme.get(); } | 282 | FbTk::MenuTheme &menuTheme() { return *m_menutheme.get(); } |
283 | const MenuTheme &menuTheme() const { return *m_menutheme.get(); } | 283 | const FbTk::MenuTheme &menuTheme() const { return *m_menutheme.get(); } |
284 | const RootTheme &rootTheme() const { return *m_root_theme.get(); } | 284 | const RootTheme &rootTheme() const { return *m_root_theme.get(); } |
285 | WinButtonTheme &winButtonTheme() { return *m_winbutton_theme.get(); } | 285 | WinButtonTheme &winButtonTheme() { return *m_winbutton_theme.get(); } |
286 | const WinButtonTheme &winButtonTheme() const { return *m_winbutton_theme.get(); } | 286 | const WinButtonTheme &winButtonTheme() const { return *m_winbutton_theme.get(); } |
@@ -520,7 +520,7 @@ private: | |||
520 | 520 | ||
521 | std::auto_ptr<FbWinFrameTheme> m_windowtheme; | 521 | std::auto_ptr<FbWinFrameTheme> m_windowtheme; |
522 | std::auto_ptr<WinButtonTheme> m_winbutton_theme; | 522 | std::auto_ptr<WinButtonTheme> m_winbutton_theme; |
523 | std::auto_ptr<MenuTheme> m_menutheme; | 523 | std::auto_ptr<FbTk::MenuTheme> m_menutheme; |
524 | std::auto_ptr<RootTheme> m_root_theme; | 524 | std::auto_ptr<RootTheme> m_root_theme; |
525 | 525 | ||
526 | FbRootWindow m_root_window; | 526 | FbRootWindow m_root_window; |
diff --git a/src/ToggleMenu.hh b/src/ToggleMenu.hh index 66f33c4..cb33667 100644 --- a/src/ToggleMenu.hh +++ b/src/ToggleMenu.hh | |||
@@ -32,7 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | class ToggleMenu: public FbMenu { | 33 | class ToggleMenu: public FbMenu { |
34 | public: | 34 | public: |
35 | ToggleMenu(class MenuTheme &tm, FbTk::ImageControl &imgctrl, | 35 | ToggleMenu(class FbTk::MenuTheme &tm, FbTk::ImageControl &imgctrl, |
36 | FbTk::XLayer &layer):FbMenu(tm, imgctrl, layer) | 36 | FbTk::XLayer &layer):FbMenu(tm, imgctrl, layer) |
37 | {} | 37 | {} |
38 | virtual ~ToggleMenu() {} | 38 | virtual ~ToggleMenu() {} |
diff --git a/src/Xinerama.hh b/src/Xinerama.hh index f57c584..24b4ca1 100644 --- a/src/Xinerama.hh +++ b/src/Xinerama.hh | |||
@@ -63,7 +63,7 @@ private: | |||
63 | template <typename ItemType> | 63 | template <typename ItemType> |
64 | class XineramaHeadMenu : public FbMenu { | 64 | class XineramaHeadMenu : public FbMenu { |
65 | public: | 65 | public: |
66 | XineramaHeadMenu(MenuTheme &tm, BScreen &screen, FbTk::ImageControl &imgctrl, | 66 | XineramaHeadMenu(FbTk::MenuTheme &tm, BScreen &screen, FbTk::ImageControl &imgctrl, |
67 | FbTk::XLayer &layer, ItemType &item, const FbTk::FbString & title = ""); | 67 | FbTk::XLayer &layer, ItemType &item, const FbTk::FbString & title = ""); |
68 | 68 | ||
69 | private: | 69 | private: |
@@ -72,7 +72,7 @@ private: | |||
72 | 72 | ||
73 | 73 | ||
74 | template <typename ItemType> | 74 | template <typename ItemType> |
75 | XineramaHeadMenu<ItemType>::XineramaHeadMenu(MenuTheme &tm, BScreen &screen, FbTk::ImageControl &imgctrl, | 75 | XineramaHeadMenu<ItemType>::XineramaHeadMenu(FbTk::MenuTheme &tm, BScreen &screen, FbTk::ImageControl &imgctrl, |
76 | FbTk::XLayer &layer, ItemType &item, const FbTk::FbString & title): | 76 | FbTk::XLayer &layer, ItemType &item, const FbTk::FbString & title): |
77 | FbMenu(tm, imgctrl, layer), | 77 | FbMenu(tm, imgctrl, layer), |
78 | m_object(item) | 78 | m_object(item) |