From b32f1eaf9ae246f656ebd27c2fbb5d29d2bec34c Mon Sep 17 00:00:00 2001 From: Christian Tusche Date: Sun, 6 May 2007 17:26:51 +0200 Subject: 2007-05-06: Version 1.1-cvs_ext-0.10b (text2skin-1.1-cvs_ext-0.10b.diff) - increase skin file version to 1.1 - the position of list items is interpreted relative to the "list" container when file version >= 1.1 - when a position is specified for "block" elements, the position of all contained elements is interpreted relative to the container position --- xml/skin.h | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) (limited to 'xml/skin.h') diff --git a/xml/skin.h b/xml/skin.h index e27f87e..4613199 100644 --- a/xml/skin.h +++ b/xml/skin.h @@ -15,6 +15,44 @@ class cText2SkinI18n; class cText2SkinTheme; + +class cxVersion { +public: + cxVersion( int ma=0, int min=0 ); + bool Parse(const std::string &Text); + int Major(void) const { return mMajor; } + int Minor(void) const { return mMinor; } + bool Require( int ma, int min ) const { + return mMajor > ma ? true : (mMajor == ma ? mMinor >= min : false); + } + bool Limit( int ma, int min ) const { + return mMajor < ma ? true : (mMajor == ma ? mMinor <= min : false); + } + bool cxVersion::operator==( const cxVersion &v ) const { + return mMajor == v.mMajor && mMinor == v.mMinor; + } + bool cxVersion::operator>=( const cxVersion &v ) const { + return Require( v.mMajor , v.mMinor); + } + bool cxVersion::operator>=( const char *c ) const { + cxVersion v; + if( !v.Parse(c) ) return false; + return Require( v.mMajor , v.mMinor); + } + bool cxVersion::operator<=( const cxVersion &v ) const { + return Limit( v.mMajor , v.mMinor ); + } + bool cxVersion::operator<=( const char *c ) const { + cxVersion v; + if( !v.Parse(c) ) return false; + return Limit( v.mMajor , v.mMinor); + } + +private: + int mMajor; + int mMinor; +}; + class cxSkin { friend bool xStartElem(const std::string &name, std::map &attrs); friend bool xEndElem(const std::string &name); @@ -35,7 +73,7 @@ private: txSize mBaseSize; std::string mName; std::string mTitle; - std::string mVersion; + cxVersion mVersion; cxDisplays mDisplays; @@ -55,7 +93,7 @@ public: 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; } + const cxVersion &Version(void) const { return mVersion; } // functions for object classes to obtain dynamic item information std::string Translate(const std::string &Text); -- cgit v1.2.3 From 3ab2393b6932b34e7f0e69af7f843d1303104d79 Mon Sep 17 00:00:00 2001 From: Christian Tusche Date: Sun, 29 Jul 2007 19:01:17 +0200 Subject: 2007-07-29: Version 1.1-cvs_ext-0.11 (text2skin-1.1-cvs_ext-0.11.diff) - moved state tracking of marquee, blink, scroll from cText2SkinRender to cxObject - fixed compatibility with gcc-4 and vdr-1.5.x - fixed use of Update.Lock() in render.h - new: dynamic width/height of objects - new: Option "bgColor" used for items "Text", "Marquee", and "Blink". - remember period to next timeout when doing a non-timeout refresh prevent occasional start/stop of marquee-text --- xml/skin.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'xml/skin.h') diff --git a/xml/skin.h b/xml/skin.h index 4613199..69d96e6 100644 --- a/xml/skin.h +++ b/xml/skin.h @@ -28,21 +28,21 @@ public: bool Limit( int ma, int min ) const { return mMajor < ma ? true : (mMajor == ma ? mMinor <= min : false); } - bool cxVersion::operator==( const cxVersion &v ) const { + bool operator==( const cxVersion &v ) const { return mMajor == v.mMajor && mMinor == v.mMinor; } - bool cxVersion::operator>=( const cxVersion &v ) const { + bool operator>=( const cxVersion &v ) const { return Require( v.mMajor , v.mMinor); } - bool cxVersion::operator>=( const char *c ) const { + bool operator>=( const char *c ) const { cxVersion v; if( !v.Parse(c) ) return false; return Require( v.mMajor , v.mMinor); } - bool cxVersion::operator<=( const cxVersion &v ) const { + bool operator<=( const cxVersion &v ) const { return Limit( v.mMajor , v.mMinor ); } - bool cxVersion::operator<=( const char *c ) const { + bool operator<=( const char *c ) const { cxVersion v; if( !v.Parse(c) ) return false; return Limit( v.mMajor , v.mMinor); -- cgit v1.2.3