vdr-plugin-skindesigner/libtemplate/templateviewelement.h

125 lines
3.2 KiB
C
Raw Normal View History

2014-09-27 09:25:14 +02:00
#ifndef __TEMPLATEVIEWELEMENT_H
#define __TEMPLATEVIEWELEMENT_H
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <sstream>
#include "templatepixmap.h"
#include "templatefunction.h"
using namespace std;
// --- cTemplateViewElement -------------------------------------------------------------
enum eViewElement {
//Common ViewElements
veUndefined,
veBackground,
veDateTime,
2015-01-06 06:07:48 +01:00
veTime,
2014-09-27 09:25:14 +02:00
veMessage,
veSortMode,
2014-10-25 20:10:00 +02:00
veDevices,
2015-01-13 09:01:11 +01:00
veCurrentWeather,
veCustomTokens,
2014-09-27 09:25:14 +02:00
//DisplayChannel ViewElements
veChannelInfo,
veChannelGroup,
veEpgInfo,
veProgressBar,
veProgressBarBack,
veStatusInfo,
veAudioInfo,
2014-09-27 09:25:14 +02:00
veScreenResolution,
veSignalQuality,
veSignalQualityBack,
veScraperContent,
veEcmInfo,
2014-09-27 09:25:14 +02:00
//DisplayMenu ViewElements
veHeader,
veButtons,
veDiscUsage,
veSystemLoad,
veSystemMemory,
veVDRStats,
2015-01-06 06:07:48 +01:00
veTemperatures,
2014-09-27 09:25:14 +02:00
veTimers,
veLastRecordings,
veCurrentSchedule,
2014-09-27 09:25:14 +02:00
veMenuItem,
veMenuCurrentItemDetail,
veScrollbar,
veDetailHeader,
veTabLabels,
//DisplayReplay ViewElements
veRecTitle,
veRecInfo,
veRecCurrent,
veRecTotal,
veRecEnd,
2014-09-27 09:25:14 +02:00
veRecProgressBar,
veCuttingMarks,
veControlIcons,
veControlIconsModeOnly,
veBackgroundModeOnly,
veRecJump,
veOnPause,
veOnPauseModeOnly,
2014-09-27 09:25:14 +02:00
//DisplayVolume ViewElements
veVolume
};
2015-03-12 17:28:35 +01:00
enum ePluginInteralViewElements {
pveScrollbar = -1,
pveTablabels = -2,
pveUndefined = 0
};
2014-09-27 09:25:14 +02:00
class cTemplateViewElement {
protected:
bool debugTokens;
cGlobals *globals;
cTemplateFunction *parameters;
int containerX;
int containerY;
int containerWidth;
int containerHeight;
vector<cTemplatePixmapNode*> viewPixmapNodes;
vector<cTemplatePixmapNode*>::iterator pixmapNodeIterator;
cTemplatePixmap *pixmapIterator;
cTemplatePixmapContainer *currentNode;
2014-09-27 09:25:14 +02:00
int pixOffset;
public:
cTemplateViewElement(void);
virtual ~cTemplateViewElement(void);
void SetContainer(int x, int y, int width, int height);
virtual void SetGlobals(cGlobals *globals);
2014-09-27 09:25:14 +02:00
void SetParameters(vector<pair<string, string> > &params);
bool CalculateParameters(void);
2015-02-12 18:50:58 +01:00
virtual bool CalculatePixmapParameters(void);
2014-09-27 09:25:14 +02:00
bool CalculatePixmapParametersList(int orientation, int numElements);
void AddPixmap(cTemplatePixmapNode *pix) { viewPixmapNodes.push_back(pix); };
2014-09-27 09:25:14 +02:00
int GetNumericParameter(eParamType type);
void SetPixOffset(int offset) { pixOffset = offset; };
int GetPixOffset(void) { return pixOffset; };
virtual int GetNumPixmaps(void);
void InitPixmapNodeIterator(void);
cTemplatePixmapNode *GetNextPixmapNode(void);
void InitPixmapIterator(void);
2014-09-27 09:25:14 +02:00
cTemplatePixmap *GetNextPixmap(void);
cTemplateFunction *GetFunction(string name);
bool Execute(void);
2015-03-22 08:29:52 +01:00
bool Detach(void);
string GetMode(void);
bool DebugTokens(void);
2014-09-27 09:25:14 +02:00
virtual void Debug(void);
};
#endif //__TEMPLATEVIEWELEMENT_H