summaryrefslogtreecommitdiff
path: root/marquee.h
blob: e39443b116b854b0935ca35e83c1edc08068b349 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
 *  $Id: marquee.h,v 1.2 2004/12/21 20:26:25 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);

	void Set(cText2SkinScreen *Screen, int Left, int Top, int Width, int Height,
	         const std::string &Text, const cFont *Font, tColor ColorFg, tColor ColorBg, 
	         uint &UpdateIn);
	void DrawText(uint &UpdateIn);

	const std::string &Text(void) const { return mText; }
};

#endif // VDR_TEXT2SKIN_MARQUEE_H