summaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/MenuTheme.cc4
-rw-r--r--src/FbTk/MenuTheme.hh11
2 files changed, 12 insertions, 3 deletions
diff --git a/src/FbTk/MenuTheme.cc b/src/FbTk/MenuTheme.cc
index ecbfb91..fa654f7 100644
--- a/src/FbTk/MenuTheme.cc
+++ b/src/FbTk/MenuTheme.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: MenuTheme.cc,v 1.3 2003/01/10 00:54:12 fluxgen Exp $ 22// $Id: MenuTheme.cc,v 1.4 2003/02/15 01:49:43 fluxgen Exp $
23 23
24#include "MenuTheme.hh" 24#include "MenuTheme.hh"
25 25
@@ -111,6 +111,8 @@ void MenuTheme::reconfigTheme() {
111 XChangeGC(m_display, hilite_gc, 111 XChangeGC(m_display, hilite_gc,
112 gc_value_mask, &gcv); 112 gc_value_mask, &gcv);
113 113
114 // notify any listeners
115 m_theme_change_sig.notify();
114} 116}
115 117
116 118
diff --git a/src/FbTk/MenuTheme.hh b/src/FbTk/MenuTheme.hh
index c029a26..6991602 100644
--- a/src/FbTk/MenuTheme.hh
+++ b/src/FbTk/MenuTheme.hh
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: MenuTheme.hh,v 1.2 2003/01/09 16:47:06 fluxgen Exp $ 22// $Id: MenuTheme.hh,v 1.3 2003/02/15 01:49:18 fluxgen Exp $
23 23
24#ifndef FBTK_MENUTHEME_HH 24#ifndef FBTK_MENUTHEME_HH
25#define FBTK_MENUTHEME_HH 25#define FBTK_MENUTHEME_HH
@@ -29,6 +29,7 @@
29#include "Font.hh" 29#include "Font.hh"
30#include "Texture.hh" 30#include "Texture.hh"
31#include "Text.hh" 31#include "Text.hh"
32#include "Subject.hh"
32 33
33namespace FbTk { 34namespace FbTk {
34 35
@@ -37,7 +38,9 @@ public:
37 enum BulletType { EMPTY, SQUARE, TRIANGLE}; 38 enum BulletType { EMPTY, SQUARE, TRIANGLE};
38 MenuTheme(int screen_num); 39 MenuTheme(int screen_num);
39 virtual ~MenuTheme(); 40 virtual ~MenuTheme();
41
40 void reconfigTheme(); 42 void reconfigTheme();
43
41 /** 44 /**
42 @name text colors 45 @name text colors
43 */ 46 */
@@ -82,6 +85,10 @@ public:
82 unsigned int borderWidth() const { return *m_border_width; } 85 unsigned int borderWidth() const { return *m_border_width; }
83 unsigned int bevelWidth() const { return *m_bevel_width; } 86 unsigned int bevelWidth() const { return *m_bevel_width; }
84 const FbTk::Color &borderColor() const { return *m_border_color; } 87 const FbTk::Color &borderColor() const { return *m_border_color; }
88 /// attach observer
89 void addListener(FbTk::Observer &obs) { m_theme_change_sig.attach(&obs); }
90 /// detach observer
91 void removeListener(FbTk::Observer &obs) { m_theme_change_sig.detach(&obs); }
85private: 92private:
86 FbTk::ThemeItem<FbTk::Color> t_text, f_text, h_text, d_text; 93 FbTk::ThemeItem<FbTk::Color> t_text, f_text, h_text, d_text;
87 FbTk::ThemeItem<FbTk::Texture> title, frame, hilite; 94 FbTk::ThemeItem<FbTk::Texture> title, frame, hilite;
@@ -96,7 +103,7 @@ private:
96 103
97 Display *m_display; 104 Display *m_display;
98 GC t_text_gc, f_text_gc, h_text_gc, d_text_gc, hilite_gc; 105 GC t_text_gc, f_text_gc, h_text_gc, d_text_gc, hilite_gc;
99 106 FbTk::Subject m_theme_change_sig;
100}; 107};
101 108
102}; // end namespace FbTk 109}; // end namespace FbTk