summaryrefslogtreecommitdiff
path: root/xml/object.h
diff options
context:
space:
mode:
authorChristian Tusche <chr13@gmx.net>2007-07-29 19:01:17 +0200
committerThomas Günther <tom@toms-cafe.de>2009-06-04 01:30:20 +0200
commit3ab2393b6932b34e7f0e69af7f843d1303104d79 (patch)
treec1a4f7e6e61f6a09bad4420614be52420506a362 /xml/object.h
parentf6f140b2ea0bb1de9e055e920ef9c0c43c6e2add (diff)
downloadvdr-plugin-text2skin-3ab2393b6932b34e7f0e69af7f843d1303104d79.tar.gz
vdr-plugin-text2skin-3ab2393b6932b34e7f0e69af7f843d1303104d79.tar.bz2
2007-07-29: Version 1.1-cvs_ext-0.11 (text2skin-1.1-cvs_ext-0.11.diff)chr13-optimizations
- 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
Diffstat (limited to 'xml/object.h')
-rw-r--r--xml/object.h49
1 files changed, 45 insertions, 4 deletions
diff --git a/xml/object.h b/xml/object.h
index 7a37b5c..aad82a5 100644
--- a/xml/object.h
+++ b/xml/object.h
@@ -33,6 +33,29 @@ struct txWindow {
pos1(_x1, _y2), pos2(_x2, _y2), bpp(_bpp) {}
};
+
+
+
+
+
+// state information for marquee, blink, scroll
+struct txState {
+ bool scrolling;
+ int offset;
+ int direction;
+ uint nexttime;
+ std::string text;
+ txState(void): scrolling(false), offset(0), direction(1), nexttime(0) {}
+};
+
+
+
+
+
+
+
+
+
class cxObject;
class cxRefresh {
@@ -50,12 +73,12 @@ public:
cxRefresh(cxObject *Object);
~cxRefresh();
- bool Dirty(uint dirty, bool force=false);
+ bool Dirty(uint dirty, uint &updatein, bool force=false, uint now=0 );
bool Full(void) const { return mFull; }
uint Type(void) const { return mRefreshType; }
bool Parse(const std::string &Text);
bool ParseChanged(const std::string &Text);
- cxRefresh &cxRefresh::operator=(const cxRefresh &b);
+ cxRefresh &operator=(const cxRefresh &b);
private:
uint mRefreshType;
@@ -67,6 +90,12 @@ private:
bool mForce, mFull;
};
+
+
+
+
+
+
class cxObjects;
class cxObject {
@@ -102,11 +131,13 @@ private:
eType mType;
txPoint mPos1;
txPoint mPos2;
+ txSize mVirtSize;
int mAlpha;
int mColors;
int mArc;
std::string mFg;
std::string mBg;
+ std::string mBl;
std::string mMask;
std::string mMark;
std::string mActive;
@@ -125,6 +156,12 @@ private:
cxRefresh mRefresh;
cxObjects *mObjects; // used for block objects such as <list>
+ // state information for marquee, blink, scroll
+ uint mListIndex;
+ typedef std::map<uint,txState> tStates;
+ tStates mStates;
+
+
public:
cxObject(cxDisplay *parent);
cxObject(const cxObject &Src);
@@ -151,13 +188,17 @@ public:
uint Index(void) const { return mIndex; }
cxDisplay *Display(void) const { return mDisplay; }
cxSkin *Skin(void) const { return mSkin; }
+ txState &State(void) { return mStates[mListIndex]; }
const std::string &TypeName(void) const;
- txPoint Pos(const txPoint &BaseOffset=txPoint(-1,-1), const txSize &BaseSize=txSize(-1,-1)) const;
- txSize Size(const txPoint &BaseOffset=txPoint(-1,-1), const txSize &BaseSize=txSize(-1,-1)) const;
+ txPoint Pos(const txPoint &BaseOffset=txPoint(-1,-1), const txSize &BaseSize=txSize(-1,-1),
+ const txSize &VirtSize=txSize(-1,-1) ) const;
+ txSize Size(const txPoint &BaseOffset=txPoint(-1,-1), const txSize &BaseSize=txSize(-1,-1),
+ const txSize &VirtSize=txSize(-1,-1)) const;
const cFont *Font(void) const;
const tColor *Fg(void) const;
const tColor *Bg(void) const;
+ const tColor *Bl(void) const;
const tColor *Mask(void) const;
const tColor *Mark(void) const;
const tColor *Active(void) const;