2013-01-17 13:16:44 +01:00
|
|
|
#ifndef __TVGUIDE_STYLEDPIXMAP_H
|
|
|
|
#define __TVGUIDE_STYLEDPIXMAP_H
|
|
|
|
|
2013-12-07 15:51:50 +01:00
|
|
|
#include <vdr/osd.h>
|
|
|
|
#include <vdr/epg.h>
|
|
|
|
#include "timer.h"
|
|
|
|
#include "config.h"
|
|
|
|
|
2013-12-21 11:25:03 +01:00
|
|
|
enum eBackgroundType {
|
|
|
|
bgGrid,
|
|
|
|
bgStatusHeaderFull,
|
|
|
|
bgStatusHeaderWindowed,
|
|
|
|
bgChannelHeader,
|
|
|
|
bgChannelGroup,
|
|
|
|
bgClock,
|
|
|
|
bgEpgHeader,
|
|
|
|
bgButton,
|
|
|
|
bgRecMenuBack,
|
2013-12-23 09:12:19 +01:00
|
|
|
bgChannelJump,
|
2013-12-21 11:25:03 +01:00
|
|
|
};
|
|
|
|
|
2013-01-17 13:16:44 +01:00
|
|
|
// --- cStyledPixmap -------------------------------------------------------------
|
|
|
|
|
|
|
|
class cStyledPixmap {
|
|
|
|
private:
|
2013-05-26 11:38:05 +02:00
|
|
|
void drawVerticalLine(int x, int yStart, int yStop, tColor col);
|
|
|
|
void drawHorizontalLine(int y, int xStart, int xStop, tColor col);
|
2013-12-21 11:25:03 +01:00
|
|
|
void drawBackgroundButton(bool active);
|
2013-01-17 13:16:44 +01:00
|
|
|
protected:
|
2013-05-26 11:38:05 +02:00
|
|
|
cPixmap *pixmap;
|
|
|
|
tColor color;
|
|
|
|
tColor colorBlending;
|
|
|
|
void setPixmap(cPixmap *pixmap);
|
2013-01-17 13:16:44 +01:00
|
|
|
public:
|
2013-07-09 00:17:42 +02:00
|
|
|
cStyledPixmap(void);
|
|
|
|
cStyledPixmap(cPixmap *pixmap);
|
|
|
|
virtual ~cStyledPixmap(void);
|
|
|
|
void drawBackground();
|
2013-12-21 11:25:03 +01:00
|
|
|
void drawBackgroundGraphical(eBackgroundType type, bool active = false);
|
2013-07-09 00:17:42 +02:00
|
|
|
void drawBlendedBackground();
|
|
|
|
void drawSparsedBackground();
|
|
|
|
void drawBorder();
|
|
|
|
void drawBoldBorder();
|
|
|
|
void drawDefaultBorder(int width, int height);
|
|
|
|
void drawRoundedCorners(int width, int height, int radius);
|
|
|
|
void setColor(tColor color, tColor colorBlending) {this->color = color; this->colorBlending = colorBlending;};
|
|
|
|
void SetAlpha(int alpha) {pixmap->SetAlpha(alpha);};
|
|
|
|
void SetLayer(int layer) {pixmap->SetLayer(layer);};
|
2013-12-21 11:25:03 +01:00
|
|
|
void Fill(tColor clr) {pixmap->Fill(clr);};
|
2013-07-09 00:17:42 +02:00
|
|
|
void DrawText(const cPoint &Point, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font);
|
|
|
|
void DrawImage(const cPoint &Point, const cImage &Image);
|
|
|
|
void DrawRectangle(const cRect &Rect, tColor Color);
|
|
|
|
void DrawEllipse(const cRect &Rect, tColor Color, int Quadrant);
|
|
|
|
void SetViewPort(const cRect &Rect);
|
|
|
|
int Width() {return pixmap->ViewPort().Width();};
|
|
|
|
int Height() {return pixmap->ViewPort().Height();};
|
2013-01-17 13:16:44 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //__TVGUIDE_STYLEDPIXMAP_H
|