Theme 
Global color scheme.
#include "GUI/Theme/Theme.h"
Public Types 
| Name | |
|---|---|
| using std::map< std::string, const char * > | CategoryNames | 
| using std::unordered_map< EColor, ImVec4 > | Colors | 
| using std::unordered_map< ESize, float > | Sizes | 
| using std::unordered_map< ESizeVec2, ImVec2 > | SizesVec | 
Public Functions 
| Name | |
|---|---|
| Theme() =default | |
| Theme(std::string name, bool isDark, const Colors & colors, const Sizes & sizes, const SizesVec & sizesVec) | |
| void | apply()<br>Call this function whenever you change style settings. | 
| const ImVec4 & | get(EColor color) | 
| ImFont * | get(EFont font) | 
| float | get(ESize size) | 
| const ImVec2 & | get(ESizeVec2 sizeVec) | 
| Colors & | getColorsRef() | 
| const std::string & | getName() const | 
| Sizes & | getSizesRef() | 
| SizesVec & | getSizesVecRef() | 
| void | initFonts() | 
| const bool | isDark() const | 
| void | set(EColor color, ImVec4 value) | 
| Theme | createDefaultClassic() | 
| const char * | getCategoryName(const std::string & key) | 
| CategoryNames & | getCategoryNames() | 
| std::map< EColor, const char * > & | getColorNames() | 
| std::map< ESize, const char * > & | getSizeNames() | 
| std::map< ESizeVec2, const char * > & | getSizeVecNames() | 
| const std::vector< ThemeGroup > & | getVariables() | 
| void | initNames()<br>Function which initializes all style properties names. | 
Public Types Documentation 
using CategoryNames 
cpp
using Theme::CategoryNames =  std::map<std::string, const char*>;using Theme::CategoryNames =  std::map<std::string, const char*>;Todo: MH - P0919R2 Heterogeneous lookup for unordered containers, C++2a (std::unordered_map cannot be used).
using Colors 
cpp
using Theme::Colors =  std::unordered_map<EColor, ImVec4>;using Theme::Colors =  std::unordered_map<EColor, ImVec4>;using Sizes 
cpp
using Theme::Sizes =  std::unordered_map<ESize, float>;using Theme::Sizes =  std::unordered_map<ESize, float>;using SizesVec 
cpp
using Theme::SizesVec =  std::unordered_map<ESizeVec2, ImVec2>;using Theme::SizesVec =  std::unordered_map<ESizeVec2, ImVec2>;Public Functions Documentation 
function Theme 
cpp
Theme() =defaultTheme() =defaultfunction Theme 
cpp
Theme(
    std::string name,
    bool isDark,
    const Colors & colors,
    const Sizes & sizes,
    const SizesVec & sizesVec
)Theme(
    std::string name,
    bool isDark,
    const Colors & colors,
    const Sizes & sizes,
    const SizesVec & sizesVec
)function apply 
cpp
void apply()void apply()Call this function whenever you change style settings.
function get 
cpp
inline const ImVec4 & get(
    EColor color
)inline const ImVec4 & get(
    EColor color
)function get 
cpp
ImFont * get(
    EFont font
)ImFont * get(
    EFont font
)function get 
cpp
inline float get(
    ESize size
)inline float get(
    ESize size
)function get 
cpp
inline const ImVec2 & get(
    ESizeVec2 sizeVec
)inline const ImVec2 & get(
    ESizeVec2 sizeVec
)function getColorsRef 
cpp
inline Colors & getColorsRef()inline Colors & getColorsRef()function getName 
cpp
inline const std::string & getName() constinline const std::string & getName() constfunction getSizesRef 
cpp
inline Sizes & getSizesRef()inline Sizes & getSizesRef()function getSizesVecRef 
cpp
inline SizesVec & getSizesVecRef()inline SizesVec & getSizesVecRef()function initFonts 
cpp
void initFonts()void initFonts()function isDark 
cpp
inline const bool isDark() constinline const bool isDark() constfunction set 
cpp
inline void set(
    EColor color,
    ImVec4 value
)inline void set(
    EColor color,
    ImVec4 value
)function createDefaultClassic 
cpp
static Theme createDefaultClassic()static Theme createDefaultClassic()function getCategoryName 
cpp
static const char * getCategoryName(
    const std::string & key
)static const char * getCategoryName(
    const std::string & key
)function getCategoryNames 
cpp
static CategoryNames & getCategoryNames()static CategoryNames & getCategoryNames()function getColorNames 
cpp
static std::map< EColor, const char * > & getColorNames()static std::map< EColor, const char * > & getColorNames()function getSizeNames 
cpp
static std::map< ESize, const char * > & getSizeNames()static std::map< ESize, const char * > & getSizeNames()function getSizeVecNames 
cpp
static std::map< ESizeVec2, const char * > & getSizeVecNames()static std::map< ESizeVec2, const char * > & getSizeVecNames()function getVariables 
cpp
static inline const std::vector< ThemeGroup > & getVariables()static inline const std::vector< ThemeGroup > & getVariables()function initNames 
cpp
static void initNames()static void initNames()Function which initializes all style properties names.
Warning: All values are kept in a table (key, value). If you want to edit or add new name, keep in mind, that name (value) must be unique.
TodoThis will be removed.
TodoThis will be removed.
TodoThis will be removed.
TodoThis will be removed.
TodoThis will be removed.
TodoThis will be removed.
TodoThis will be removed.
Updated on 2025-09-07 at 16:13:50 +0000