diff options
author | lordjaxom <lordjaxom> | 2004-12-28 18:06:02 +0000 |
---|---|---|
committer | lordjaxom <lordjaxom> | 2004-12-28 18:06:02 +0000 |
commit | 933d1f1e876f09d130ac576440ac34e6e5f50c25 (patch) | |
tree | 93f987326832688a63c0a747613770e1167a131e | |
parent | efabce1166adbb02048bead9d7e38f215d486f04 (diff) | |
download | vdr-plugin-text2skin-933d1f1e876f09d130ac576440ac34e6e5f50c25.tar.gz vdr-plugin-text2skin-933d1f1e876f09d130ac576440ac34e6e5f50c25.tar.bz2 |
- removed unused marquee class
-rw-r--r-- | marquee.c | 134 | ||||
-rw-r--r-- | marquee.h | 47 | ||||
-rw-r--r-- | render.c | 3 | ||||
-rw-r--r-- | render.h | 3 |
4 files changed, 2 insertions, 185 deletions
diff --git a/marquee.c b/marquee.c deleted file mode 100644 index 2708257..0000000 --- a/marquee.c +++ /dev/null @@ -1,134 +0,0 @@ -/* - * $Id: marquee.c,v 1.3 2004/12/28 01:24:35 lordjaxom Exp $ - */ - -#include "marquee.h" -#include "screen.h" -#include <vdr/tools.h> - -/* -cText2SkinMarquee::cText2SkinMarquee(const cText2SkinMarquee &Src): - mScreen(Src.mScreen), - mFont(Src.mFont), - mLeft(Src.mLeft), - mTop(Src.mTop), - mWidth(Src.mWidth), - mHeight(Src.mHeight), - mText(Src.mText), - mScrolling(Src.mScrolling), - mOffset(Src.mOffset), - mDirection(Src.mDirection), - mColorFg(Src.mColorFg), - mColorBg(Src.mColorBg), - mNextTime(Src.mNextTime) -{ -} - -cText2SkinMarquee::cText2SkinMarquee(cText2SkinScreen *Screen, int Left, int Top, int Width, - int Height, const std::string &Text, const cFont *Font, - tColor ColorFg, tColor ColorBg, uint &UpdateIn) -{ - Set(Screen, Left, Top, Width, Height, Text, Font, ColorFg, ColorBg, UpdateIn); -} - -void cText2SkinMarquee::Set(cText2SkinScreen *Screen, int Left, int Top, int Width, int Height, - const std::string &Text, const cFont *Font, tColor ColorFg, - tColor ColorBg, uint &UpdateIn) -{ - mScreen = Screen; - mFont = Font; - mLeft = Left; - mTop = Top; - mWidth = Width; - mHeight = Height; - mText = Text; - mColorFg = ColorFg; - mColorBg = ColorBg; - mOffset = 0; - mDirection = 1; - mNextTime = 0; - mScrolling = mFont->Width(mText.c_str()) > mWidth; - DrawText(UpdateIn); -} -*/ - -void cText2SkinMarquee::DrawText(cText2SkinScreen *Screen, int Left, int Top, int Width, int Height, - const std::string &Text, const cFont *Font, tColor ColorFg, - tColor ColorBg, uint Delay, int &Offset, int &Direction, - uint &NextTime) -{ - uint now = time_ms(); - bool scrolling = Font->Width(Text.c_str()) > Width; - - if (NextTime == 0) - NextTime = now + 1500; - else if (now >= NextTime) { - uint nextin = Delay; - if (Direction > 0) { - if (Font->Width(Text.c_str() + Offset) <= Width) { - --Direction; - nextin = 1500; - } else - ++Offset; - } - else { - if (Offset <= 0) { - ++Direction; - nextin = 1500; - } else - --Offset; - } - NextTime = now + nextin; - } - - if (!scrolling) - NextTime = 0; - - /* - if (scrolling) { - uint updatein = NextTime - now; - if (UpdateIn == 0 || updatein < UpdateIn) - UpdateIn = updatein; - } - */ - - Screen->DrawText(Left, Top, Text.c_str() + Offset, ColorFg, ColorBg, Font, Width, Height); -} - -/* -void cText2SkinMarquee::DrawText(uint &UpdateIn) -{ - uint now = time_ms(); - if (mNextTime == 0) - mNextTime = now + 1500; - else if (now >= mNextTime) { - uint nextin = 250; - if (mDirection > 0) { - if (mFont->Width(mText.c_str() + mOffset) <= mWidth) { - --mDirection; - nextin = 1500; - } - else - ++mOffset; - } - else { - if (mOffset <= 0) { - ++mDirection; - nextin = 1500; - } - else - --mOffset; - } - mNextTime = now + nextin; - } - - if (mScrolling) { - uint updatein = mNextTime - now; - if (UpdateIn == 0 || updatein < UpdateIn) - UpdateIn = updatein; - } - - mScreen->DrawText(mLeft, mTop, mText.c_str() + mOffset, mColorFg, mColorBg, mFont, mWidth, - mHeight); -} -*/ diff --git a/marquee.h b/marquee.h deleted file mode 100644 index 36561c4..0000000 --- a/marquee.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * $Id: marquee.h,v 1.3 2004/12/28 01:24:35 lordjaxom Exp $ - */ - -#ifndef VDR_TEXT2SKIN_MARQUEE_H -#define VDR_TEXT2SKIN_MARQUEE_H - -#include <vdr/osd.h> -#include <string> - -class cFont; -class cText2SkinScreen; - -class cText2SkinMarquee { -private: - /* - cText2SkinScreen *mScreen; - const cFont *mFont; - int mLeft; - int mTop; - int mWidth; - int mHeight; - std::string mText; - bool mScrolling; - int mOffset; - int mDirection; - tColor mColorFg; - tColor mColorBg; - uint mNextTime; - - cText2SkinMarquee(void) {} // disallow direct construction - -public: - cText2SkinMarquee(const cText2SkinMarquee &Src); - cText2SkinMarquee(cText2SkinScreen *Screen, int Left, int Top, int Width, int Height, - const std::string &Text, const cFont *Font, tColor ColorFg, tColor ColorBg, - uint &UpdateIn);*/ -public: - static void DrawText(cText2SkinScreen *Screen, int Left, int Top, int Width, int Height, - const std::string &Text, const cFont *Font, tColor ColorFg, tColor ColorBg, - uint Delay, int &Offset, int &Direction, uint &NextTime); - //static void DrawText(uint &UpdateIn); - - //const std::string &Text(void) const { return mText; } -}; - -#endif // VDR_TEXT2SKIN_MARQUEE_H @@ -1,5 +1,5 @@ /* - * $Id: render.c,v 1.8 2004/12/28 14:35:54 lordjaxom Exp $ + * $Id: render.c,v 1.9 2004/12/28 18:06:02 lordjaxom Exp $ */ #include "render.h" @@ -10,7 +10,6 @@ #include "status.h" #include "screen.h" #include "scroller.h" -#include "marquee.h" #include "xml/display.h" #include <vdr/channels.h> #include <vdr/epg.h> @@ -1,5 +1,5 @@ /* - * $Id: render.h,v 1.5 2004/12/28 01:24:35 lordjaxom Exp $ + * $Id: render.h,v 1.6 2004/12/28 18:06:02 lordjaxom Exp $ */ #ifndef VDR_TEXT2SKIN_RENDER_H @@ -7,7 +7,6 @@ #include "common.h" #include "scroller.h" -#include "marquee.h" #include "xml/skin.h" #include "xml/type.h" #include <vdr/osd.h> |