summaryrefslogtreecommitdiff
path: root/libtemplate/templateviewelement.h
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2014-09-27 09:25:14 +0200
committerlouis <louis.braun@gmx.de>2014-09-27 09:25:14 +0200
commitb0509b5182b6e0d04f05e6b3d5676b0d21f51966 (patch)
tree22b302342f22843e0815eb5f516c85f1478cbf0b /libtemplate/templateviewelement.h
downloadvdr-plugin-skindesigner-0.0.1.tar.gz
vdr-plugin-skindesigner-0.0.1.tar.bz2
initial commit version 0.0.10.0.1
Diffstat (limited to 'libtemplate/templateviewelement.h')
-rw-r--r--libtemplate/templateviewelement.h99
1 files changed, 99 insertions, 0 deletions
diff --git a/libtemplate/templateviewelement.h b/libtemplate/templateviewelement.h
new file mode 100644
index 0000000..84db627
--- /dev/null
+++ b/libtemplate/templateviewelement.h
@@ -0,0 +1,99 @@
+#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,
+ //DisplayChannel ViewElements
+ veChannelInfo,
+ veChannelGroup,
+ veEpgInfo,
+ veProgressBar,
+ veProgressBarBack,
+ veStatusInfo,
+ veScreenResolution,
+ veSignalQuality,
+ veSignalQualityBack,
+ veScraperContent,
+ //DisplayMenu ViewElements
+ veHeader,
+ veButtons,
+ veDiscUsage,
+ veSystemLoad,
+ veTimers,
+ veDevices,
+ veMenuItem,
+ veMenuCurrentItemDetail,
+ veScrollbar,
+ veDetailHeader,
+ veTabLabels,
+ //DisplayReplay ViewElements
+ veRecTitle,
+ veRecInfo,
+ veRecCurrent,
+ veRecTotal,
+ veRecProgressBar,
+ veCuttingMarks,
+ veControlIcons,
+ veControlIconsModeOnly,
+ veBackgroundModeOnly,
+ veRecJump,
+ //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> > &params);
+ 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);
+ void ActivateDebugTokens(void) {debugTokens = true; };
+ bool DebugTokens(void) { return debugTokens; };
+ virtual void Debug(void);
+};
+
+#endif //__TEMPLATEVIEWELEMENT_H \ No newline at end of file