summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/FbTk/MenuTheme.cc20
-rw-r--r--src/FbTk/MenuTheme.hh9
2 files changed, 27 insertions, 2 deletions
diff --git a/src/FbTk/MenuTheme.cc b/src/FbTk/MenuTheme.cc
index 1b7a187..12c1231 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.1 2002/12/25 11:42:05 fluxgen Exp $ 22// $Id: MenuTheme.cc,v 1.2 2003/01/09 16:51:52 fluxgen Exp $
23 23
24#include "MenuTheme.hh" 24#include "MenuTheme.hh"
25 25
@@ -47,6 +47,9 @@ MenuTheme::MenuTheme(int screen_num):
47 titlefont_justify(*this, "menu.title.justify", "Menu.Title.Justify"), 47 titlefont_justify(*this, "menu.title.justify", "Menu.Title.Justify"),
48 bullet_pos(*this, "menu.bulletPos", "Menu.BulletPos"), 48 bullet_pos(*this, "menu.bulletPos", "Menu.BulletPos"),
49 m_bullet(*this, "menu.bullet", "Menu.Bullet"), 49 m_bullet(*this, "menu.bullet", "Menu.Bullet"),
50 m_border_width(*this, "borderWidth", "BorderWidth"),
51 m_bevel_width(*this, "bevelWidth", "BevelWidth"),
52 m_border_color(*this, "borderColor", "BorderColor"),
50 m_display(FbTk::App::instance()->display()) { 53 m_display(FbTk::App::instance()->display()) {
51 54
52 Window rootwindow = RootWindow(m_display, screen_num); 55 Window rootwindow = RootWindow(m_display, screen_num);
@@ -132,4 +135,19 @@ void ThemeItem<MenuTheme::BulletType>::load() {
132 // do nothing, we don't have anything extra to load 135 // do nothing, we don't have anything extra to load
133} 136}
134 137
138template <>
139void ThemeItem<unsigned int>::setDefaultValue() {
140 m_value = 0;
141}
142
143template <>
144void ThemeItem<unsigned int>::setFromString(const char *str) {
145 sscanf(str, "%d", &m_value);
146}
147
148template <>
149void ThemeItem<unsigned int>::load() {
150}
151
152
135}; // end namespace FbTk 153}; // end namespace FbTk
diff --git a/src/FbTk/MenuTheme.hh b/src/FbTk/MenuTheme.hh
index c0ac490..c029a26 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.1 2002/12/25 11:41:53 fluxgen Exp $ 22// $Id: MenuTheme.hh,v 1.2 2003/01/09 16:47:06 fluxgen Exp $
23 23
24#ifndef FBTK_MENUTHEME_HH 24#ifndef FBTK_MENUTHEME_HH
25#define FBTK_MENUTHEME_HH 25#define FBTK_MENUTHEME_HH
@@ -79,6 +79,9 @@ public:
79 BulletType bullet() const { return *m_bullet; } 79 BulletType bullet() const { return *m_bullet; }
80 FbTk::Justify bulletPos() const { return *bullet_pos; } 80 FbTk::Justify bulletPos() const { return *bullet_pos; }
81 81
82 unsigned int borderWidth() const { return *m_border_width; }
83 unsigned int bevelWidth() const { return *m_bevel_width; }
84 const FbTk::Color &borderColor() const { return *m_border_color; }
82private: 85private:
83 FbTk::ThemeItem<FbTk::Color> t_text, f_text, h_text, d_text; 86 FbTk::ThemeItem<FbTk::Color> t_text, f_text, h_text, d_text;
84 FbTk::ThemeItem<FbTk::Texture> title, frame, hilite; 87 FbTk::ThemeItem<FbTk::Texture> title, frame, hilite;
@@ -86,6 +89,10 @@ private:
86 FbTk::ThemeItem<FbTk::Justify> framefont_justify, titlefont_justify; 89 FbTk::ThemeItem<FbTk::Justify> framefont_justify, titlefont_justify;
87 FbTk::ThemeItem<FbTk::Justify> bullet_pos; 90 FbTk::ThemeItem<FbTk::Justify> bullet_pos;
88 FbTk::ThemeItem<BulletType> m_bullet; 91 FbTk::ThemeItem<BulletType> m_bullet;
92 FbTk::ThemeItem<unsigned int> m_border_width;
93 FbTk::ThemeItem<unsigned int> m_bevel_width;
94 FbTk::ThemeItem<FbTk::Color> m_border_color;
95
89 96
90 Display *m_display; 97 Display *m_display;
91 GC t_text_gc, f_text_gc, h_text_gc, d_text_gc, hilite_gc; 98 GC t_text_gc, f_text_gc, h_text_gc, d_text_gc, hilite_gc;