vdr-plugin-tvguide/grid.h

59 lines
1.9 KiB
C
Raw Normal View History

#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;
// --- 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);
2019-03-23 13:43:37 +01:00
virtual time_t Duration(void) { return 0; };
virtual void drawText(void) {};
bool dummy;
public:
2013-05-26 11:38:05 +02:00
cGrid(cChannelColumn *c);
virtual ~cGrid(void);
cChannelColumn *column;
2019-03-23 13:43:37 +01:00
virtual void SetViewportHeight(void) {};
virtual void PositionPixmap(void) {};
2013-05-26 11:38:05 +02:00
virtual void setText(void) {};
2019-03-23 13:43:37 +01:00
void Draw(void);
void SetDirty(void) {dirty = true;};
void SetActive(void) {dirty = true; active = true;};
void SetInActive(void) {dirty = true; active = false;};
2013-05-26 11:38:05 +02:00
void SetColor(bool color) {isColor1 = color;};
2019-03-23 13:43:37 +01:00
bool IsColor1(void) {return isColor1;};
bool isFirst(void);
2019-03-23 13:43:37 +01:00
virtual const cEvent *GetEvent(void) { return NULL; };
2013-05-26 11:38:05 +02:00
bool Match(time_t t);
2019-03-23 13:43:37 +01:00
virtual time_t StartTime(void) { return 0; };
virtual time_t EndTime(void) { return 0; };
2013-05-26 11:38:05 +02:00
virtual void SetStartTime(time_t start) {};
virtual void SetEndTime(time_t end) {};
int calcOverlap(cGrid *neighbor);
2019-03-23 13:43:37 +01:00
virtual void SetTimer(void) {};
virtual void SetSwitchTimer(void) {};
virtual cString getText(void) { return cString("");};
virtual cString getTimeString(void) { return cString("");};
bool Active(void) { return active; };
2019-03-23 13:43:37 +01:00
bool HasTimer(void) {return hasTimer;};
bool HasSwitchTimer(void) {return hasSwitchTimer;};
bool isDummy(void) { return dummy; };
virtual void debug() {};
};
2018-03-08 14:20:23 +01:00
#endif //__TVGUIDE_GRID_H