2015-04-02 15:09:41 +02: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 "osdelements.h"
|
|
|
|
#include "skindesignerapi.h"
|
|
|
|
|
|
|
|
namespace skindesignerapi {
|
|
|
|
|
|
|
|
class cOsdView;
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* cSkindesignerOsdObject
|
|
|
|
**********************************************************************/
|
|
|
|
class cSkindesignerOsdObject : public cOsdObject {
|
|
|
|
protected:
|
2016-01-26 18:32:38 +01:00
|
|
|
bool init;
|
|
|
|
cPluginStructure *plugStruct;
|
|
|
|
cOsdView *GetOsdView(int subViewId = -1);
|
|
|
|
bool SkindesignerAvailable(void);
|
2015-04-02 15:09:41 +02:00
|
|
|
public:
|
2016-01-26 18:32:38 +01:00
|
|
|
cSkindesignerOsdObject(cPluginStructure *plugStruct);
|
2015-04-02 15:09:41 +02:00
|
|
|
virtual ~cSkindesignerOsdObject();
|
|
|
|
virtual void Show(void) {};
|
|
|
|
};
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* cSkindesignerOsdItem
|
|
|
|
**********************************************************************/
|
|
|
|
class cSkindesignerOsdItem : public cOsdItem {
|
|
|
|
private:
|
|
|
|
ISDDisplayMenu *sdDisplayMenu;
|
2016-01-26 18:32:38 +01:00
|
|
|
cTokenContainer *tokenContainer;
|
2015-04-02 15:09:41 +02:00
|
|
|
protected:
|
|
|
|
public:
|
2016-01-26 18:32:38 +01:00
|
|
|
cSkindesignerOsdItem(cTokenContainer *tk, eOSState State = osUnknown);
|
|
|
|
cSkindesignerOsdItem(cTokenContainer *tk, const char *Text, eOSState State = osUnknown, bool Selectable = true);
|
2015-04-02 15:09:41 +02:00
|
|
|
virtual ~cSkindesignerOsdItem();
|
|
|
|
virtual void SetMenuItem(cSkinDisplayMenu *DisplayMenu, int Index, bool Current, bool Selectable);
|
|
|
|
void SetDisplayMenu(ISDDisplayMenu *sdDisplayMenu) { this->sdDisplayMenu = sdDisplayMenu; };
|
2016-01-26 18:32:38 +01:00
|
|
|
int GetLoopIndex(const char *loop);
|
|
|
|
void SetLoop(vector<int> loopInfo);
|
|
|
|
void AddStringToken(int index, const char *value);
|
|
|
|
void AddIntToken(int index, int value);
|
|
|
|
void AddLoopToken(int loopIndex, int row, int index, const char *value);
|
2015-04-02 15:09:41 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/**********************************************************************
|
|
|
|
* cSkindesignerOsdMenu
|
|
|
|
**********************************************************************/
|
|
|
|
class cSkindesignerOsdMenu : public cOsdMenu {
|
|
|
|
private:
|
2016-01-26 18:32:38 +01:00
|
|
|
cPluginStructure *plugStruct;
|
|
|
|
cTokenContainer *tokenContainer;
|
|
|
|
int activeMenu;
|
2015-04-02 15:09:41 +02:00
|
|
|
bool init;
|
2015-05-30 16:43:59 +02:00
|
|
|
bool firstCallCleared;
|
|
|
|
bool secondCall;
|
|
|
|
int firstMenu;
|
|
|
|
eMenuType firstType;
|
2015-04-02 15:09:41 +02:00
|
|
|
bool displayText;
|
|
|
|
ISDDisplayMenu *sdDisplayMenu;
|
|
|
|
string text;
|
|
|
|
bool SetSkinDesignerDisplayMenu(void);
|
|
|
|
protected:
|
2016-01-26 18:32:38 +01:00
|
|
|
void SetPluginName(const char *name);
|
2015-05-30 16:43:59 +02:00
|
|
|
void FirstCallCleared(void) { firstCallCleared = true; };
|
2015-04-02 15:09:41 +02:00
|
|
|
void ClearTokens(void);
|
2016-01-26 18:32:38 +01:00
|
|
|
void SetTokenContainer(cTokenContainer *tk);
|
|
|
|
void SetPluginMenu(int menuId, eMenuType type);
|
2015-04-02 15:09:41 +02:00
|
|
|
void SetText(string text) { this->text = text; };
|
2016-01-26 18:32:38 +01:00
|
|
|
int GetLoopIndex(const char *loop);
|
|
|
|
void SetLoop(vector<int> loopInfo);
|
|
|
|
void AddStringToken(int index, const char *value);
|
|
|
|
void AddIntToken(int index, int value);
|
|
|
|
void AddLoopToken(int loopIndex, int row, int index, const char *value);
|
2015-04-02 15:09:41 +02:00
|
|
|
void TextKeyLeft(void);
|
|
|
|
void TextKeyRight(void);
|
|
|
|
void TextKeyUp(void);
|
|
|
|
void TextKeyDown(void);
|
2016-01-26 18:32:38 +01:00
|
|
|
cTokenContainer *GetTokenContainer(int menuId);
|
2015-04-02 15:09:41 +02:00
|
|
|
public:
|
2016-01-26 18:32:38 +01:00
|
|
|
cSkindesignerOsdMenu(skindesignerapi::cPluginStructure *plugStruct, const char *Title, int c0 = 0, int c1 = 0, int c2 = 0, int c3 = 0, int c4 = 0);
|
2015-04-02 15:09:41 +02:00
|
|
|
virtual ~cSkindesignerOsdMenu();
|
|
|
|
virtual void Display(void);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
#endif // __SKINDESIGNEROSDBASE_H
|
|
|
|
|