/*
 * scroll.h: Scrolling
 *
 * See the main source file 'skinelchi.c' for copyright information and
 * how to reach the author.
 *
 * $Id$
 */

#ifndef __SCROLL_H
#define __SCROLL_H

#include "setup.h"
#include <vdr/skins.h>
#include <vdr/tools.h>

class cCharScroll
{
private:
   int Delay;
   cBitmap *bmp;
   cTimeMs Time;
   char *Text;
   const cFont *Font;
   tColor Fg;
   tColor Bg;
   int xOff;
   int yOff;
   int DestWidth;
   int Width;
   cOsd *osd;
   int ColorDepth;
   int pos;
   int dir;
   int alignment;
   int delay;
   int intervall;
   int IconOffset;
   bool IsDrawNeeded(void);
public:
   cCharScroll(int x, int y, int width, cOsd *Osd, const cFont *Fnt, tColor FG = 0xFFFFFFFF, tColor BG = 0xFF000000, int Alignment = taDefault, int Delay = 5);
   ~cCharScroll();
   bool SetText(const char *text, int offset = 0);
   bool DrawIfNeeded(void);
};

#endif //__SCROLL_H
