2014-09-27 09:25:14 +02:00
|
|
|
#ifndef __SKINDESIGNER_SETUP_H
|
|
|
|
#define __SKINDESIGNER_SETUP_H
|
|
|
|
|
|
|
|
#include "config.h"
|
2015-05-30 16:43:59 +02:00
|
|
|
#include "libskindesignerapi/skindesignerosdbase.h"
|
|
|
|
|
|
|
|
enum eItemType {
|
|
|
|
itSkinSetup,
|
|
|
|
itNoSkinSetup,
|
|
|
|
itSkinRepo
|
|
|
|
};
|
2014-09-27 09:25:14 +02:00
|
|
|
|
2015-06-04 10:57:25 +02:00
|
|
|
// --- cInstallManager -----------------------------------------------------------
|
|
|
|
class cInstallManager {
|
|
|
|
private:
|
|
|
|
uint64_t installationStart;
|
|
|
|
int lastInstallDuration;
|
|
|
|
int timeout;
|
|
|
|
bool installing;
|
|
|
|
bool updating;
|
|
|
|
cSkinRepo *runningInst;
|
|
|
|
protected:
|
|
|
|
string currentSkin;
|
|
|
|
bool StartInstallation(string skin);
|
|
|
|
bool StartUpdate(string skin);
|
|
|
|
bool Installing(void) { return installing; };
|
|
|
|
bool Updating(void) { return updating; };
|
|
|
|
bool Finished(void);
|
|
|
|
bool SuccessfullyInstalled(void);
|
|
|
|
bool SuccessfullyUpdated(void);
|
|
|
|
int Duration(void);
|
|
|
|
eOSState ProcessInstallationStatus(void);
|
|
|
|
public:
|
|
|
|
cInstallManager(void);
|
|
|
|
virtual ~cInstallManager(void);
|
|
|
|
};
|
2015-01-20 09:29:16 +01:00
|
|
|
|
2015-06-04 10:57:25 +02:00
|
|
|
// --- cSkinDesignerSetup -----------------------------------------------------------
|
|
|
|
class cSkinDesignerSetup : public cMenuSetupPage, cInstallManager {
|
2015-01-20 09:29:16 +01:00
|
|
|
private:
|
2016-01-26 18:32:38 +01:00
|
|
|
skindesignerapi::cPluginStructure *skinPreviewStruct;
|
2015-01-20 09:29:16 +01:00
|
|
|
int numLogosPerSizeInitial;
|
2016-01-26 18:32:38 +01:00
|
|
|
int cacheImagesInitial;
|
2015-01-20 09:29:16 +01:00
|
|
|
int limitLogoCache;
|
|
|
|
int numLogosMax;
|
|
|
|
int debugImageLoading;
|
|
|
|
int rerunAmount;
|
|
|
|
int rerunDistance;
|
|
|
|
int rerunMaxChannel;
|
2016-01-26 18:32:38 +01:00
|
|
|
int numCustomTokens;
|
2015-01-20 09:29:16 +01:00
|
|
|
const char *menuDisplayStyle[2];
|
|
|
|
void Setup(void);
|
|
|
|
virtual void Store(void);
|
|
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
|
|
cOsdItem *InfoItem(const char *label);
|
|
|
|
void PluginSetup(void);
|
|
|
|
void ImageCacheStatistics(void);
|
2015-05-30 16:43:59 +02:00
|
|
|
void SkinSetup(void);
|
|
|
|
void InstallSkins(void);
|
2015-01-20 09:29:16 +01:00
|
|
|
public:
|
2016-01-26 18:32:38 +01:00
|
|
|
cSkinDesignerSetup(skindesignerapi::cPluginStructure *skinPreviewStruct);
|
2015-06-04 10:57:25 +02:00
|
|
|
virtual ~cSkinDesignerSetup(void);
|
2015-01-20 09:29:16 +01:00
|
|
|
};
|
|
|
|
|
2015-05-30 16:43:59 +02:00
|
|
|
// --- cSkinMenuItem -----------------------------------------------------------
|
|
|
|
|
|
|
|
class cSkinMenuItem : public cOsdItem {
|
|
|
|
private:
|
|
|
|
string skinName;
|
|
|
|
eItemType type;
|
|
|
|
public:
|
|
|
|
cSkinMenuItem(string skinName, string displayText, eItemType type);
|
|
|
|
virtual ~cSkinMenuItem() {};
|
|
|
|
string GetSkinName(void) { return skinName; };
|
|
|
|
eItemType Type(void) { return type; };
|
|
|
|
};
|
|
|
|
|
2015-01-31 11:46:06 +01:00
|
|
|
// --- cSkinSetupSubMenu -----------------------------------------------------------
|
|
|
|
|
|
|
|
class cSkinSetupSubMenu : public cOsdItem {
|
|
|
|
private:
|
|
|
|
string name;
|
2015-07-09 00:14:42 +02:00
|
|
|
string displayText;
|
2015-01-31 11:46:06 +01:00
|
|
|
public:
|
|
|
|
cSkinSetupSubMenu(string name, string displayText);
|
|
|
|
virtual ~cSkinSetupSubMenu() {};
|
|
|
|
string GetName(void) { return name; };
|
2015-07-09 00:14:42 +02:00
|
|
|
string GetDisplayText(void) { return displayText; };
|
2015-01-31 11:46:06 +01:00
|
|
|
};
|
|
|
|
|
2015-01-20 09:29:16 +01:00
|
|
|
// --- cSkindesignerSkinSetup -----------------------------------------------------------
|
|
|
|
|
2015-06-04 10:57:25 +02:00
|
|
|
class cSkindesignerSkinSetup : public cOsdMenu, cInstallManager {
|
2015-01-20 09:29:16 +01:00
|
|
|
private:
|
|
|
|
string skin;
|
2015-07-09 00:14:42 +02:00
|
|
|
string menu;
|
2015-08-14 17:23:12 +02:00
|
|
|
vector<string> helpTexts;
|
|
|
|
string buttonRed;
|
|
|
|
string buttonGreen;
|
|
|
|
string buttonYellow;
|
|
|
|
bool showRed;
|
|
|
|
bool showYellow;
|
|
|
|
bool hadHelp;
|
|
|
|
void ShowButtons(int current, bool force = false);
|
2015-01-20 09:29:16 +01:00
|
|
|
protected:
|
|
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
|
|
void Set(void);
|
|
|
|
public:
|
2015-07-09 00:14:42 +02:00
|
|
|
cSkindesignerSkinSetup(string skin, string menu, string header);
|
2015-01-20 09:29:16 +01:00
|
|
|
virtual ~cSkindesignerSkinSetup();
|
2014-09-27 09:25:14 +02:00
|
|
|
};
|
2015-01-20 09:29:16 +01:00
|
|
|
|
2015-05-30 16:43:59 +02:00
|
|
|
// --- cSkindesignerSkinPreview -----------------------------------------------------------
|
2015-06-04 10:57:25 +02:00
|
|
|
class cSkindesignerSkinPreview : public skindesignerapi::cSkindesignerOsdMenu, cInstallManager {
|
2015-05-30 16:43:59 +02:00
|
|
|
protected:
|
|
|
|
virtual eOSState ProcessKey(eKeys Key);
|
|
|
|
void Set(void);
|
2016-01-26 18:32:38 +01:00
|
|
|
const char *CheckFontInstalled(string fontName);
|
2015-05-30 16:43:59 +02:00
|
|
|
public:
|
2016-01-26 18:32:38 +01:00
|
|
|
cSkindesignerSkinPreview(string skin, skindesignerapi::cPluginStructure *plugStruct);
|
2015-05-30 16:43:59 +02:00
|
|
|
virtual ~cSkindesignerSkinPreview();
|
2016-01-26 18:32:38 +01:00
|
|
|
static void DefineTokens(skindesignerapi::cTokenContainer *tk);
|
2015-05-30 16:43:59 +02:00
|
|
|
void Display(void);
|
|
|
|
};
|
2014-09-27 09:25:14 +02:00
|
|
|
#endif //__SKINDESIGNER_SETUP_H
|