vdr-plugin-skindesigner/libskindesigner/skindesignerosdbase.h

85 lines
2.9 KiB
C
Raw Normal View History

2014-11-15 09:47:22 +01:00
#ifndef __SKINDESIGNEROSDBASE_H
#define __SKINDESIGNEROSDBASE_H
#include <string>
#include <vector>
#include <map>
#include <set>
#include <sstream>
#include <vdr/osdbase.h>
#include <vdr/plugin.h>
#include "services.h"
2015-03-12 17:28:35 +01:00
class cOsdView;
/**********************************************************************
* cSkindesignerOsdObject
**********************************************************************/
class cSkindesignerOsdObject : public cOsdObject {
protected:
string pluginName;
cPlugin *pSkinDesigner;
bool InitSkindesignerInterface(string pluginName);
cOsdView *GetOsdView(int viewID, int subViewID = -1);
public:
cSkindesignerOsdObject(void);
virtual ~cSkindesignerOsdObject();
virtual void Show(void) {};
};
/**********************************************************************
* cSkindesignerOsdItem
**********************************************************************/
2014-11-15 09:47:22 +01:00
class cSkindesignerOsdItem : public cOsdItem {
private:
2014-11-25 14:33:59 +01:00
cSDDisplayMenu *sdDisplayMenu;
map < string, string > stringTokens;
2014-11-15 09:47:22 +01:00
map < string, int > intTokens;
map < string, vector< map< string, string > > > loopTokens;
protected:
public:
cSkindesignerOsdItem(eOSState State = osUnknown);
cSkindesignerOsdItem(const char *Text, eOSState State = osUnknown, bool Selectable = true);
virtual ~cSkindesignerOsdItem();
virtual void SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, bool Current, bool Selectable);
2014-11-25 14:33:59 +01:00
void SetDisplayMenu(cSDDisplayMenu *sdDisplayMenu) { this->sdDisplayMenu = sdDisplayMenu; };
2014-11-15 09:47:22 +01:00
void AddStringToken(string key, string value);
2014-11-25 14:33:59 +01:00
void AddIntToken(string key, int value);
2014-11-15 09:47:22 +01:00
void AddLoopToken(string loopName, map<string, string> &tokens);
};
2015-03-12 17:28:35 +01:00
/**********************************************************************
* cSkindesignerOsdMenu
**********************************************************************/
2014-11-15 09:47:22 +01:00
class cSkindesignerOsdMenu : public cOsdMenu {
private:
bool init;
bool displayText;
string pluginName;
2014-11-25 14:33:59 +01:00
cSDDisplayMenu *sdDisplayMenu;
2014-11-15 09:47:22 +01:00
string text;
map < string, string > stringTokens;
map < string, int > intTokens;
map < string, vector< map< string, string > > > loopTokens;
2014-11-25 14:33:59 +01:00
bool SetSkinDesignerDisplayMenu(void);
2014-11-15 09:47:22 +01:00
protected:
void ClearTokens(void);
void SetPluginName(string name) {pluginName = name; };
2014-11-25 14:33:59 +01:00
void SetPluginMenu(int menu, eMenuType type);
2014-11-15 09:47:22 +01:00
void SetText(string text) { this->text = text; };
void AddStringToken(string key, string value);
void AddIntToken(string key, int value);
void AddLoopToken(string loopName, map<string, string> &tokens);
void TextKeyLeft(void);
void TextKeyRight(void);
void TextKeyUp(void);
void TextKeyDown(void);
public:
cSkindesignerOsdMenu(const char *Title, int c0 = 0, int c1 = 0, int c2 = 0, int c3 = 0, int c4 = 0);
virtual ~cSkindesignerOsdMenu();
virtual void Display(void);
};
#endif // __SKINDESIGNEROSDBASE_H