diff options
Diffstat (limited to 'src/FbTk/Menu.hh')
-rw-r--r-- | src/FbTk/Menu.hh | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/FbTk/Menu.hh b/src/FbTk/Menu.hh index 1360528..1ae9b8f 100644 --- a/src/FbTk/Menu.hh +++ b/src/FbTk/Menu.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: Menu.hh,v 1.7 2003/02/03 13:40:52 fluxgen Exp $ | 25 | // $Id: Menu.hh,v 1.8 2003/02/15 01:47:43 fluxgen Exp $ |
26 | 26 | ||
27 | #ifndef FBTK_MENU_HH | 27 | #ifndef FBTK_MENU_HH |
28 | #define FBTK_MENU_HH | 28 | #define FBTK_MENU_HH |
@@ -35,6 +35,7 @@ | |||
35 | #include "EventHandler.hh" | 35 | #include "EventHandler.hh" |
36 | #include "RefCount.hh" | 36 | #include "RefCount.hh" |
37 | #include "Command.hh" | 37 | #include "Command.hh" |
38 | #include "Observer.hh" | ||
38 | #include "XLayerItem.hh" | 39 | #include "XLayerItem.hh" |
39 | 40 | ||
40 | namespace FbTk { | 41 | namespace FbTk { |
@@ -151,7 +152,7 @@ protected: | |||
151 | inline Menu *parent() { return m_parent; } | 152 | inline Menu *parent() { return m_parent; } |
152 | inline const Menu *parent() const { return m_parent; } | 153 | inline const Menu *parent() const { return m_parent; } |
153 | 154 | ||
154 | private: | 155 | private: |
155 | typedef std::vector<MenuItem *> Menuitems; | 156 | typedef std::vector<MenuItem *> Menuitems; |
156 | const MenuTheme &m_theme; | 157 | const MenuTheme &m_theme; |
157 | Display *m_display; | 158 | Display *m_display; |
@@ -178,6 +179,17 @@ private: | |||
178 | bevel_h; | 179 | bevel_h; |
179 | } menu; | 180 | } menu; |
180 | 181 | ||
182 | class ThemeObserver:public Observer { | ||
183 | public: | ||
184 | ThemeObserver(FbTk::Menu &menu):m_menu(menu) { } | ||
185 | void update(FbTk::Subject *subj) { | ||
186 | m_menu.reconfigure(); | ||
187 | } | ||
188 | private: | ||
189 | Menu &m_menu; | ||
190 | }; | ||
191 | |||
192 | ThemeObserver m_themeobserver; | ||
181 | }; | 193 | }; |
182 | 194 | ||
183 | }; // end namespace FbTk | 195 | }; // end namespace FbTk |