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,
|
|
|
|
veMessage,
|
2014-10-25 20:10:00 +02:00
|
|
|
veDevices,
|
2014-10-11 16:31:39 +02:00
|
|
|
veCustomTokens,
|
2014-09-27 09:25:14 +02:00
|
|
|
//DisplayChannel ViewElements
|
|
|
|
veChannelInfo,
|
|
|
|
veChannelGroup,
|
|
|
|
veEpgInfo,
|
|
|
|
veProgressBar,
|
|
|
|
veProgressBarBack,
|
|
|
|
veStatusInfo,
|
2014-10-17 17:44:02 +02:00
|
|
|
veAudioInfo,
|
2014-09-27 09:25:14 +02:00
|
|
|
veScreenResolution,
|
|
|
|
veSignalQuality,
|
|
|
|
veSignalQualityBack,
|
|
|
|
veScraperContent,
|
|
|
|
//DisplayMenu ViewElements
|
|
|
|
veHeader,
|
|
|
|
veButtons,
|
|
|
|
veDiscUsage,
|
|
|
|
veSystemLoad,
|
|
|
|
veTimers,
|
|
|
|
veMenuItem,
|
|
|
|
veMenuCurrentItemDetail,
|
|
|
|
veScrollbar,
|
|
|
|
veDetailHeader,
|
|
|
|
veTabLabels,
|
|
|
|
//DisplayReplay ViewElements
|
|
|
|
veRecTitle,
|
|
|
|
veRecInfo,
|
|
|
|
veRecCurrent,
|
|
|
|
veRecTotal,
|
|
|
|
veRecProgressBar,
|
|
|
|
veCuttingMarks,
|
|
|
|
veControlIcons,
|
|
|
|
veControlIconsModeOnly,
|
|
|
|
veBackgroundModeOnly,
|
|
|
|
veRecJump,
|
2014-11-29 11:23:54 +01:00
|
|
|
veOnPause,
|
|
|
|
veOnPauseModeOnly,
|
2014-09-27 09:25:14 +02:00
|
|
|
//DisplayVolume ViewElements
|
|
|
|
veVolume
|
|
|
|
};
|
|
|
|
|
|
|
|
class cTemplateViewElement {
|
|
|
|
protected:
|
|
|
|
bool debugTokens;
|
|
|
|
cGlobals *globals;
|
|
|
|
cTemplateFunction *parameters;
|
|
|
|
int containerX;
|
|
|
|
int containerY;
|
|
|
|
int containerWidth;
|
|
|
|
int containerHeight;
|
|
|
|
vector<cTemplatePixmap*> viewPixmaps;
|
|
|
|
vector<cTemplatePixmap*>::iterator pixIterator;
|
|
|
|
int pixOffset;
|
|
|
|
public:
|
|
|
|
cTemplateViewElement(void);
|
|
|
|
virtual ~cTemplateViewElement(void);
|
|
|
|
void SetParameters(vector<pair<string, string> > ¶ms);
|
|
|
|
bool CalculateParameters(void);
|
|
|
|
bool CalculatePixmapParameters(void);
|
|
|
|
bool CalculatePixmapParametersList(int orientation, int numElements);
|
|
|
|
int GetNumericParameter(eParamType type);
|
|
|
|
void AddPixmap(cTemplatePixmap *pix) { viewPixmaps.push_back(pix); };
|
|
|
|
virtual void SetGlobals(cGlobals *globals);
|
|
|
|
void SetContainer(int x, int y, int width, int height);
|
|
|
|
void SetPixOffset(int offset) { pixOffset = offset; };
|
|
|
|
int GetPixOffset(void) { return pixOffset; };
|
|
|
|
virtual int GetNumPixmaps(void) { return viewPixmaps.size(); };
|
|
|
|
void InitIterator(void);
|
|
|
|
cTemplatePixmap *GetNextPixmap(void);
|
|
|
|
cTemplateFunction *GetFunction(string name);
|
2014-11-29 11:23:54 +01:00
|
|
|
bool DebugTokens(void);
|
2014-09-27 09:25:14 +02:00
|
|
|
virtual void Debug(void);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif //__TEMPLATEVIEWELEMENT_H
|