2013-05-20 11:37:37 +02:00
|
|
|
#ifndef __TVGUIDE_GRID_H
|
|
|
|
#define __TVGUIDE_GRID_H
|
|
|
|
|
2013-12-07 15:51:50 +01:00
|
|
|
#include <vdr/tools.h>
|
|
|
|
#include "styledpixmap.h"
|
|
|
|
|
|
|
|
class cChannelColumn;
|
|
|
|
|
2013-05-20 11:37:37 +02:00
|
|
|
// --- cEpgGrid -------------------------------------------------------------
|
|
|
|
|
|
|
|
class cGrid : public cListObject, public cStyledPixmap {
|
|
|
|
protected:
|
2013-05-26 11:38:05 +02:00
|
|
|
cTextWrapper *text;
|
|
|
|
int viewportHeight;
|
|
|
|
int borderWidth;
|
|
|
|
void setBackground();
|
|
|
|
bool isColor1;
|
|
|
|
bool active;
|
|
|
|
bool dirty;
|
2013-07-09 00:17:42 +02:00
|
|
|
bool hasTimer;
|
|
|
|
bool hasSwitchTimer;
|
2013-05-26 11:38:05 +02:00
|
|
|
bool intersects(cGrid *neighbor);
|
2013-05-20 11:37:37 +02:00
|
|
|
virtual time_t Duration(void) {};
|
|
|
|
virtual void drawText(void) {};
|
|
|
|
bool dummy;
|
|
|
|
public:
|
2013-05-26 11:38:05 +02:00
|
|
|
cGrid(cChannelColumn *c);
|
|
|
|
virtual ~cGrid(void);
|
|
|
|
cChannelColumn *column;
|
|
|
|
virtual void SetViewportHeight() {};
|
|
|
|
virtual void PositionPixmap() {};
|
|
|
|
virtual void setText(void) {};
|
|
|
|
void Draw();
|
|
|
|
void SetDirty() {dirty = true;};
|
|
|
|
void SetActive() {dirty = true; active = true;};
|
|
|
|
void SetInActive() {dirty = true; active = false;};
|
|
|
|
void SetColor(bool color) {isColor1 = color;};
|
|
|
|
bool IsColor1() {return isColor1;};
|
2013-05-20 11:37:37 +02:00
|
|
|
bool isFirst(void);
|
|
|
|
virtual const cEvent *GetEvent() {};
|
2013-05-26 11:38:05 +02:00
|
|
|
bool Match(time_t t);
|
|
|
|
virtual time_t StartTime() {};
|
|
|
|
virtual time_t EndTime() {};
|
|
|
|
virtual void SetStartTime(time_t start) {};
|
|
|
|
virtual void SetEndTime(time_t end) {};
|
|
|
|
int calcOverlap(cGrid *neighbor);
|
2013-07-09 00:17:42 +02:00
|
|
|
virtual void SetTimer() {};
|
|
|
|
virtual void SetSwitchTimer() {};
|
2013-05-20 11:37:37 +02:00
|
|
|
virtual cString getText(void) { return cString("");};
|
|
|
|
virtual cString getTimeString(void) { return cString("");};
|
|
|
|
bool Active(void) { return active; };
|
2013-07-09 00:17:42 +02:00
|
|
|
bool HasTimer() {return hasTimer;};
|
|
|
|
bool HasSwitchTimer() {return hasSwitchTimer;};
|
2013-05-20 11:37:37 +02:00
|
|
|
bool isDummy() { return dummy; };
|
|
|
|
virtual void debug() {};
|
|
|
|
};
|
|
|
|
|
2018-03-08 14:20:23 +01:00
|
|
|
#endif //__TVGUIDE_GRID_H
|