From ccd693067e85b6049a9d61dc33338ecd6e8c22ee Mon Sep 17 00:00:00 2001 From: fluxgen Date: Thu, 9 Jan 2003 16:51:52 +0000 Subject: added menu border color and border width and bevel width --- src/FbTk/MenuTheme.cc | 20 +++++++++++++++++++- src/FbTk/MenuTheme.hh | 9 ++++++++- 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 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: MenuTheme.cc,v 1.1 2002/12/25 11:42:05 fluxgen Exp $ +// $Id: MenuTheme.cc,v 1.2 2003/01/09 16:51:52 fluxgen Exp $ #include "MenuTheme.hh" @@ -47,6 +47,9 @@ MenuTheme::MenuTheme(int screen_num): titlefont_justify(*this, "menu.title.justify", "Menu.Title.Justify"), bullet_pos(*this, "menu.bulletPos", "Menu.BulletPos"), m_bullet(*this, "menu.bullet", "Menu.Bullet"), + m_border_width(*this, "borderWidth", "BorderWidth"), + m_bevel_width(*this, "bevelWidth", "BevelWidth"), + m_border_color(*this, "borderColor", "BorderColor"), m_display(FbTk::App::instance()->display()) { Window rootwindow = RootWindow(m_display, screen_num); @@ -132,4 +135,19 @@ void ThemeItem::load() { // do nothing, we don't have anything extra to load } +template <> +void ThemeItem::setDefaultValue() { + m_value = 0; +} + +template <> +void ThemeItem::setFromString(const char *str) { + sscanf(str, "%d", &m_value); +} + +template <> +void ThemeItem::load() { +} + + }; // 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 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: MenuTheme.hh,v 1.1 2002/12/25 11:41:53 fluxgen Exp $ +// $Id: MenuTheme.hh,v 1.2 2003/01/09 16:47:06 fluxgen Exp $ #ifndef FBTK_MENUTHEME_HH #define FBTK_MENUTHEME_HH @@ -79,6 +79,9 @@ public: BulletType bullet() const { return *m_bullet; } FbTk::Justify bulletPos() const { return *bullet_pos; } + unsigned int borderWidth() const { return *m_border_width; } + unsigned int bevelWidth() const { return *m_bevel_width; } + const FbTk::Color &borderColor() const { return *m_border_color; } private: FbTk::ThemeItem t_text, f_text, h_text, d_text; FbTk::ThemeItem title, frame, hilite; @@ -86,6 +89,10 @@ private: FbTk::ThemeItem framefont_justify, titlefont_justify; FbTk::ThemeItem bullet_pos; FbTk::ThemeItem m_bullet; + FbTk::ThemeItem m_border_width; + FbTk::ThemeItem m_bevel_width; + FbTk::ThemeItem m_border_color; + Display *m_display; GC t_text_gc, f_text_gc, h_text_gc, d_text_gc, hilite_gc; -- cgit v0.11.2