2020-03-12 10:47:59 +01:00
|
|
|
#if !defined(__XTHEME_H__)
|
2020-03-13 14:34:36 +01:00
|
|
|
#define __XTHEME_H__
|
|
|
|
|
2020-03-12 10:47:59 +01:00
|
|
|
#include "../cpp_foundation/XToolsCommon.h"
|
|
|
|
#include "../cpp_foundation/XObjArray.h"
|
2020-03-16 12:15:25 +01:00
|
|
|
#include "../cpp_foundation/XString.h"
|
2020-03-13 14:34:36 +01:00
|
|
|
#include "libeg.h"
|
|
|
|
#include "XImage.h"
|
|
|
|
|
|
|
|
class Icon
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
INTN Id; //for example BUILTIN_ICON_POINTER
|
2020-03-16 12:15:25 +01:00
|
|
|
XString Name; //for example "os_moja", "vol_internal"
|
2020-03-13 14:34:36 +01:00
|
|
|
XImage ImageNight;
|
|
|
|
XImage Image;
|
|
|
|
|
2020-03-16 12:15:25 +01:00
|
|
|
Icon(INTN Id);
|
2020-03-13 14:34:36 +01:00
|
|
|
~Icon();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
class XTheme
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
XObjArray<Icon> Icons;
|
|
|
|
|
2020-03-12 10:47:59 +01:00
|
|
|
UINTN DisableFlags;
|
|
|
|
UINTN HideBadges;
|
|
|
|
UINTN HideUIFlags;
|
|
|
|
BOOLEAN TextOnly;
|
|
|
|
FONT_TYPE Font;
|
|
|
|
INTN CharWidth;
|
|
|
|
UINTN SelectionColor;
|
|
|
|
XStringW FontFileName;
|
|
|
|
XStringW Theme;
|
|
|
|
XStringW BannerFileName;
|
|
|
|
XStringW SelectionSmallFileName;
|
|
|
|
XStringW SelectionBigFileName;
|
|
|
|
XStringW SelectionIndicatorName;
|
|
|
|
XStringW DefaultSelection;
|
|
|
|
XStringW BackgroundName;
|
|
|
|
SCALING BackgroundScale;
|
|
|
|
UINTN BackgroundSharp;
|
|
|
|
BOOLEAN BackgroundDark;
|
|
|
|
BOOLEAN CustomIcons;
|
|
|
|
BOOLEAN SelectionOnTop;
|
|
|
|
BOOLEAN BootCampStyle;
|
|
|
|
INTN BadgeOffsetX;
|
|
|
|
INTN BadgeOffsetY;
|
|
|
|
INTN BadgeScale;
|
|
|
|
INTN ThemeDesignWidth;
|
|
|
|
INTN ThemeDesignHeight;
|
|
|
|
INTN BannerPosX;
|
|
|
|
INTN BannerPosY;
|
|
|
|
INTN BannerEdgeHorizontal;
|
|
|
|
INTN BannerEdgeVertical;
|
|
|
|
INTN BannerNudgeX;
|
|
|
|
INTN BannerNudgeY;
|
|
|
|
BOOLEAN VerticalLayout;
|
|
|
|
BOOLEAN NonSelectedGrey;
|
|
|
|
INTN MainEntriesSize;
|
|
|
|
INTN TileXSpace;
|
|
|
|
INTN TileYSpace;
|
2020-03-12 15:00:36 +01:00
|
|
|
// INTN IconFormat;
|
2020-03-12 10:47:59 +01:00
|
|
|
BOOLEAN Proportional;
|
|
|
|
BOOLEAN ShowOptimus;
|
|
|
|
BOOLEAN DarkEmbedded;
|
|
|
|
BOOLEAN TypeSVG;
|
|
|
|
INTN Codepage;
|
|
|
|
INTN CodepageSize;
|
|
|
|
float Scale;
|
2020-03-13 14:34:36 +01:00
|
|
|
float CentreShift;
|
2020-03-16 12:15:25 +01:00
|
|
|
INTN row0TileSize;
|
|
|
|
INTN row1TileSize;
|
2020-03-13 14:34:36 +01:00
|
|
|
|
2020-03-16 12:15:25 +01:00
|
|
|
void Init();
|
2020-03-13 14:34:36 +01:00
|
|
|
XImage Background; //Background and Banner will not be in array as they live own life
|
|
|
|
XImage BigBack; //not sure is needed
|
2020-03-16 12:15:25 +01:00
|
|
|
XImage Banner; //same as logo in the array
|
2020-03-13 14:34:36 +01:00
|
|
|
|
|
|
|
XImage& GetIcon(XStringW& Name, BOOLEAN Night); //get by name
|
|
|
|
XImage& GetIcon(INTN Id, BOOLEAN Night); //get by id
|
|
|
|
|
|
|
|
void AddIcon(Icon& NewIcon); //return EFI_STATUS?
|
|
|
|
|
2020-03-16 12:15:25 +01:00
|
|
|
void FillByEmbedded();
|
|
|
|
|
2020-03-13 14:34:36 +01:00
|
|
|
XTheme(); //default constructor
|
|
|
|
~XTheme();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
//internal layout variables instead of globals in menu.cpp
|
|
|
|
|
|
|
|
};
|
2020-03-12 10:47:59 +01:00
|
|
|
#endif
|