diff options
Diffstat (limited to 'libtemplate/template.h')
-rw-r--r-- | libtemplate/template.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/libtemplate/template.h b/libtemplate/template.h new file mode 100644 index 0000000..a4ef238 --- /dev/null +++ b/libtemplate/template.h @@ -0,0 +1,57 @@ +#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, + vtDisplayMessage +}; + +class cTemplate { +private: + eViewType viewType; + void CacheImage(cTemplateFunction *func); +protected: + cGlobals *globals; + cTemplateView *rootView; + void CreateView(void); + void GetUsedFonts(cTemplateView *view, vector< pair<string, int> > &usedFonts); + void CacheImages(cTemplateView *view); +public: + cTemplate(eViewType viewType); + virtual ~cTemplate(void); + bool ReadFromXML(void); + 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); + //Debug + void Debug(void); +}; + +#endif //__TEMPLATE_H
\ No newline at end of file |