diff options
author | louis <louis.braun@gmx.de> | 2014-09-27 09:25:14 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2014-09-27 09:25:14 +0200 |
commit | b0509b5182b6e0d04f05e6b3d5676b0d21f51966 (patch) | |
tree | 22b302342f22843e0815eb5f516c85f1478cbf0b /views/view.h | |
download | vdr-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 'views/view.h')
-rw-r--r-- | views/view.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/views/view.h b/views/view.h new file mode 100644 index 0000000..4609935 --- /dev/null +++ b/views/view.h @@ -0,0 +1,72 @@ +#ifndef __VIEW_H
+#define __VIEW_H
+
+#include "string"
+#include "map"
+#include "../libcore/pixmapcontainer.h"
+#include "../libtemplate/template.h"
+
+using namespace std;
+
+class cView : public cPixmapContainer {
+private:
+ void Init(void);
+ void DoFill(int num, cTemplateFunction *func);
+ void DoDrawText(int num, cTemplateFunction *func, int x0 = 0, int y0 = 0);
+ void DoDrawTextBox(int num, cTemplateFunction *func, int x0 = 0, int y0 = 0);
+ void DoDrawFloatingTextBox(int num, cTemplateFunction *func);
+ void DoDrawRectangle(int num, cTemplateFunction *func, int x0 = 0, int y0 = 0);
+ void DoDrawEllipse(int num, cTemplateFunction *func, int x0 = 0, int y0 = 0);
+ void DoDrawImage(int num, cTemplateFunction *func, int x0 = 0, int y0 = 0);
+ void ActivateScrolling(void);
+protected:
+ cTemplateView *tmplView;
+ cTemplateViewElement *tmplItem;
+ cTemplateViewTab *tmplTab;
+ //scaling window
+ cRect scalingWindow;
+ bool tvScaled;
+ bool viewInit;
+ //true if view is scrollable in general
+ bool scrolling;
+ //true if view is actually starting scrolling
+ bool currentlyScrolling;
+ eViewElement veScroll;
+ int scrollingPix;
+ int scrollOrientation;
+ int scrollDelay;
+ int scrollMode;
+ int scrollSpeed;
+ void DrawViewElement(eViewElement ve, map <string,string> *stringTokens = NULL, map <string,int> *intTokens = NULL, map < string, vector< map< string, string > > > *loopTokens = NULL);
+ void ClearViewElement(eViewElement ve);
+ bool ViewElementImplemented(eViewElement ve);
+ void CreateViewPixmap(int num, cTemplatePixmap *pix, cRect *size = NULL);
+ void CreateScrollingPixmap(int num, cTemplatePixmap *pix, cSize &drawportSize);
+ void DrawPixmap(int num, cTemplatePixmap *pix, map < string, vector< map< string, string > > > *loopTokens = NULL, bool flushPerLoop = false);
+ void DrawLoop(int numPixmap, cTemplateFunction *func, map < string, vector< map< string, string > > > *loopTokens);
+ void DebugTokens(string viewElement, map<string,string> *stringTokens, map<string,int> *intTokens, map < string, vector< map< string, string > > > *loopTokens = NULL);
+ virtual void Action(void);
+public:
+ cView(cTemplateView *tmplView);
+ cView(cTemplateViewElement *tmplItem);
+ cView(cTemplateViewTab *tmplTab);
+ virtual ~cView();
+ virtual void Stop(void);
+};
+
+class cViewListItem : public cView {
+protected:
+ int pos;
+ int numTotal;
+ cRect container;
+ int align;
+ int listOrientation;
+ void SetListElementPosition(cTemplatePixmap *pix);
+public:
+ cViewListItem(cTemplateViewElement *tmplItem);
+ virtual ~cViewListItem();
+ cRect DrawListItem(map <string,string> *stringTokens, map <string,int> *intTokens);
+ void ClearListItem(void);
+};
+
+#endif //__VIEW_H
\ No newline at end of file |