ThemeManager
Theme Manager
themes
Theme dictionary, containing all themes.
registerTheme
Register a theme.
/** * Register a theme * @param name Theme name * @param theme Theme configuration * @returns */ registerTheme: (name: string, theme: Partial<ITheme>) => void;
getTheme
Get a theme.
/** * Get a theme * @param name Theme name * @returns */ getTheme: (name: string) => ITheme;
removeTheme
Remove a theme.
/** * Remove a theme * @param name Theme name * @returns Whether removed successfully */ removeTheme: (name: string) => boolean;
themeExist
Determine if a theme exists.
/** * Determine if a theme exists * @param name Theme name * @returns Whether the theme exists */ themeExist: (name: string) => boolean;
getDefaultTheme
Get the default theme.
/** * Get the default theme * @returns The default theme */ getDefaultTheme: () => ITheme;
setCurrentTheme
Set the current theme (applied to all instances).
/** * Set the current theme * @param name Theme name * @returns Whether the theme was set successfully */ setCurrentTheme: (name: string) => void;
getCurrentTheme
Get the current theme (can only get themes set by the user through the setCurrentTheme method; the default value is the default theme).
/** * Get the current theme * @returns The current theme */ getCurrentTheme: () => ITheme;