aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Menu.hh
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-02-15 01:48:16 (GMT)
committerfluxgen <fluxgen>2003-02-15 01:48:16 (GMT)
commit80a8703272f3b7c872279634add72218209ac64c (patch)
tree6de5155be74213e50c905c4241028f74353ded66 /src/FbTk/Menu.hh
parent483f82fbb8be0d2d9101b71dd3f31122f1c29cb3 (diff)
downloadfluxbox-80a8703272f3b7c872279634add72218209ac64c.zip
fluxbox-80a8703272f3b7c872279634add72218209ac64c.tar.bz2
added theme observer
Diffstat (limited to 'src/FbTk/Menu.hh')
-rw-r--r--src/FbTk/Menu.hh16
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
40namespace FbTk { 41namespace 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
154private: 155private:
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