vdr-plugin-skindesigner/libtemplate/template.h

61 lines
1.5 KiB
C
Raw Normal View History

2014-09-27 09:25:14 +02:00
#ifndef __TEMPLATE_H
#define __TEMPLATE_H
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <sstream>
#include "globals.h"
#include "templateview.h"
#include "templateviewelement.h"
#include "templatepixmap.h"
#include "templatefunction.h"
using namespace std;
// --- cTemplate -------------------------------------------------------------
enum eViewType {
vtDisplayChannel,
vtDisplayMenu,
vtDisplayReplay,
vtDisplayVolume,
vtDisplayAudioTracks,
2015-02-12 18:50:58 +01:00
vtDisplayMessage,
vtDisplayPlugin
2014-09-27 09:25:14 +02:00
};
class cTemplate {
private:
eViewType viewType;
2014-11-25 14:33:59 +01:00
void CachePixmapImages(cTemplatePixmap *pix);
2014-09-27 09:25:14 +02:00
void CacheImage(cTemplateFunction *func);
protected:
cGlobals *globals;
cTemplateView *rootView;
2015-02-12 18:50:58 +01:00
void CreateView(string pluginName, int viewID);
2014-09-27 09:25:14 +02:00
void GetUsedFonts(cTemplateView *view, vector< pair<string, int> > &usedFonts);
void CacheImages(cTemplateView *view);
public:
2015-02-12 18:50:58 +01:00
cTemplate(eViewType viewType, string pluginName = "", int viewID = -1);
2014-09-27 09:25:14 +02:00
virtual ~cTemplate(void);
2015-02-12 18:50:58 +01:00
bool ReadFromXML(string xmlfile = "");
2014-09-27 09:25:14 +02:00
void SetGlobals(cGlobals *globals);
cTemplateView *GetRootView(void) { return rootView; };
void Translate(void);
void PreCache(void);
//get fonts for pre caching
vector< pair<string, int> > GetUsedFonts(void);
void CacheImages(void);
2015-03-12 17:28:35 +01:00
//Set Plugin Subviews
bool SetSubViews(string plugName, int viewID);
2014-09-27 09:25:14 +02:00
//Debug
void Debug(void);
};
#endif //__TEMPLATE_H