From 4ae7cd5384f363f6f7f1358ac017218eadb700ab Mon Sep 17 00:00:00 2001 From: fluxgen Date: Mon, 11 Aug 2003 15:53:13 +0000 Subject: iconbar theme --- src/IconbarTheme.cc | 23 +++++++++++++++++++++++ src/IconbarTheme.hh | 24 ++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 src/IconbarTheme.cc create mode 100644 src/IconbarTheme.hh diff --git a/src/IconbarTheme.cc b/src/IconbarTheme.cc new file mode 100644 index 0000000..0813128 --- /dev/null +++ b/src/IconbarTheme.cc @@ -0,0 +1,23 @@ +#include "IconbarTheme.hh" +#include "FbTk/App.hh" + +IconbarTheme::IconbarTheme(int screen_num, + const std::string &name, + const std::string &altname): + FbTk::Theme(screen_num), + m_focused_texture(*this, name + ".focused", altname + ".Focused"), + m_unfocused_texture(*this, name + ".unfocused", altname + ".Unfocused"), + m_focused_text(*this, name + ".focused", altname + ".Focused"), + m_unfocused_text(*this, name + ".unfocused", altname + ".Unfocused") { + + FbTk::ThemeManager::instance().loadTheme(*this); + +} +IconbarTheme::~IconbarTheme() { + +} +void IconbarTheme::reconfigTheme() { + m_focused_text.update(); + m_unfocused_text.update(); +} + diff --git a/src/IconbarTheme.hh b/src/IconbarTheme.hh new file mode 100644 index 0000000..d75b3cd --- /dev/null +++ b/src/IconbarTheme.hh @@ -0,0 +1,24 @@ +#ifndef ICONBARTHEME_HH +#define ICONBARTHEME_HH + +#include "FbTk/Theme.hh" +#include "FbTk/Texture.hh" +#include "TextTheme.hh" + +class IconbarTheme:public FbTk::Theme { +public: + IconbarTheme(int screen_num, const std::string &name, const std::string &altname); + virtual ~IconbarTheme(); + + void reconfigTheme(); + const TextTheme &focusedText() const { return m_focused_text; } + const TextTheme &unfocusedText() const { return m_unfocused_text; } + + const FbTk::Texture &focusedTexture() const { return *m_focused_texture; } + const FbTk::Texture &unfocusedTexture() const { return *m_unfocused_texture; } +private: + FbTk::ThemeItem m_focused_texture, m_unfocused_texture; + TextTheme m_focused_text, m_unfocused_text; +}; + +#endif // ICONBARTHEME_HH -- cgit v0.11.2