ThemeEditor

AppCUI::Dialogs::ThemeEditor (class)

class ThemeEditor

Public Static Functions

static void Show()
static bool RegisterCustomColors(std::string category_name, Application::Config::CustomColorNameStorage colors, OnThemePreviewWindowDrawInterface *previewInterface)

Adds a color category of the application (shown by the theme editor, saved in .theme files).

colors are the values every theme switch gives back (built-in themes do not define custom colors), unless RegisterCustomColorsForTheme gave other values for the new theme; a theme file or settings section that holds some of them wins.

static bool RegisterCustomColorsForTheme(std::string_view category_name, Application::ThemeType theme, Application::Config::CustomColorNameStorage colors)

Values of some colors of a registered category for one built-in theme (for example darker text colors for ThemeType::Light, whose windows are light): switching to theme gives them back instead of the values of RegisterCustomColors; a <Name>.theme file of that theme still wins.

Every name must be registered. If theme is the current (not edited) theme, it is built again at once, as a switch to it would build it, and the theme listeners are notified when a color changed. Returns false for an unknown category or name.

static void RemovePreviewDrawListener(OnThemePreviewWindowDrawInterface *previewInterface)
static bool RegisterOnThemeChangeCallback(OnThemeChangedInterface *listener)
static void RemoveOnThemeChangeCallback(OnThemeChangedInterface *listener)