From e0c2ee1d37c0f213f22a04df71710bebe3526f85 Mon Sep 17 00:00:00 2001 From: lordjaxom Date: Wed, 2 Jun 2004 19:56:58 +0000 Subject: - implemented image loading through ImageMagick (fixes crashes when running together with GraphTFT) - implemented Theme support (see file demo.colors in the demo skin) - implemented translations for texts used in skins (see file demo.trans in the demo skin) --- theme.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 theme.h (limited to 'theme.h') diff --git a/theme.h b/theme.h new file mode 100644 index 0000000..36ba3d1 --- /dev/null +++ b/theme.h @@ -0,0 +1,35 @@ +/* + * $Id: theme.h,v 1.1 2004/06/02 20:43:05 lordjaxom Exp $ + */ + +#ifndef VDR_TEXT2SKIN_THEME_H +#define VDR_TEXT2SKIN_THEME_H + +#include "common.h" +#include "file.h" +#include + +class cText2SkinTheme: public cText2SkinFile { +private: + cTheme mTheme; + map mMap; + +protected: + bool Parse(const char *Text); + +public: + cText2SkinTheme(const char *Skin); + virtual ~cText2SkinTheme(); + + cTheme *Theme(void) { return &mTheme; } + tColor Color(const string &Name); +}; + +inline tColor cText2SkinTheme::Color(const string &Name) { + if (mMap.find(Name) != mMap.end()) + return mTheme.Color(mMap[Name]); + else + return 0x00000000; +} + +#endif // VDR_TEXT2SKIN_THEME_H -- cgit v1.2.3