diff options
author | lordjaxom <lordjaxom> | 2004-12-08 18:48:39 +0000 |
---|---|---|
committer | lordjaxom <lordjaxom> | 2004-12-08 18:48:39 +0000 |
commit | 5382d18d05d358bb1c313c642395e835aa44a6a0 (patch) | |
tree | 2b5ef58620b3640c5b21e8eafe92ee4b266b1d30 /xml/skin.h | |
parent | eb2f2c9600e8f69788232582191b141002bcd522 (diff) | |
download | vdr-plugin-text2skin-5382d18d05d358bb1c313c642395e835aa44a6a0.tar.gz vdr-plugin-text2skin-5382d18d05d358bb1c313c642395e835aa44a6a0.tar.bz2 |
1.0-pre1v1.0-pre1
Diffstat (limited to 'xml/skin.h')
-rw-r--r-- | xml/skin.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/xml/skin.h b/xml/skin.h new file mode 100644 index 0000000..40e25e7 --- /dev/null +++ b/xml/skin.h @@ -0,0 +1,64 @@ +/* + * $Id: skin.h,v 1.3 2004/12/08 17:13:26 lordjaxom Exp $ + */ + +#ifndef VDR_TEXT2SKIN_XML_SKIN_H +#define VDR_TEXT2SKIN_XML_SKIN_H + +#include "xml/display.h" +#include <vdr/osd.h> +#include <expat.h> +#include <map> +#include <string> + +// --- cxSkin ----------------------------------------------------------------- + +class cxSkin { + friend bool xStartElem(const std::string &name, std::map<std::string,std::string> &attrs); + friend bool xEndElem(const std::string &name); + + /* Skin Editor */ + friend class VSkinnerView; + +public: + enum eScreenBase { + relative, + absolute, +#define __COUNT_BASE__ (absolute + 1) + }; + +private: + eScreenBase mBase; + txPoint mBaseOffset; + txSize mBaseSize; + std::string mName; + std::string mTitle; + std::string mVersion; + + cxDisplays mDisplays; + +protected: + void SetBase(eScreenBase Base); + +public: + cxSkin(const std::string &Name); + + cxDisplay *Get(cxDisplay::eType Type); + + bool ParseBase(const std::string &Text); + + eScreenBase Base(void) const { return mBase; } + const txPoint &BaseOffset(void) const { return mBaseOffset; } + const txSize &BaseSize(void) const { return mBaseSize; } + const std::string &Name(void) const { return mName; } + const std::string &Title(void) const { return mTitle; } + const std::string &Version(void) const { return mVersion; } +}; + +inline cxDisplay *cxSkin::Get(cxDisplay::eType Type) { + if (mDisplays.find(Type) != mDisplays.end()) + return mDisplays[Type]; + return NULL; +} + +#endif // VDR_TEXT2SKIN_XML_SKIN_H |