#include <MRColorTheme.h>
Static Public Member Functions | |
| static MRVIEWER_API ColorTheme & | instance () |
| static MRVIEWER_API Preset | getPreset () |
| static MRVIEWER_API const char * | getPresetName (Preset type) |
| static MRVIEWER_API Type | getThemeType () |
| static MRVIEWER_API const std::string & | getThemeName () |
| static MRVIEWER_API void | setupByTypeName (Type type, const std::string &name) |
| Setup this struct. | |
| static MRVIEWER_API void | setupDefaultDark () |
| static MRVIEWER_API void | setupDefaultLight () |
| static MRVIEWER_API void | setupUserTheme (const std::string &themeName) |
| static MRVIEWER_API void | setupFromFile (const std::filesystem::path &path, Type type=Type::User) |
| Setup this struct from serialized color-theme file. | |
| static MRVIEWER_API void | setupFromJson (const Json::Value &value, Type type=Type::User) |
| Setup this struct from Json value. | |
| static MRVIEWER_API void | serializeCurrentToFile (const std::filesystem::path &path) |
| static MRVIEWER_API void | serializeCurrentToJson (Json::Value &root) |
| static MRVIEWER_API bool | isInitialized () |
| True if this structure is filled with colors, false if empty. | |
| static MRVIEWER_API void | setRibbonColor (const Color &color, RibbonColorsType type) |
| Getter and setter for ribbon colors. | |
| static MRVIEWER_API const Color & | getRibbonColor (RibbonColorsType type) |
| static MRVIEWER_API const char * | getRibbonColorTypeName (RibbonColorsType type) |
| static MRVIEWER_API void | setViewportColor (const Color &color, ViewportColorsType type) |
| Getter and setter for viewport colors. | |
| static MRVIEWER_API const Color & | getViewportColor (ViewportColorsType type) |
| static MRVIEWER_API const char * | getViewportColorTypeName (ViewportColorsType type) |
| static MRVIEWER_API std::filesystem::path | getUserThemesDirectory () |
| Returns directory where user's custom themes are stored. | |
| static MRVIEWER_API void | updateUserThemesList () |
| Find available custom themes. | |
| static MRVIEWER_API std::vector< std::string > | foundUserThemes () |
| Return list of found custom themes. | |
| static MRVIEWER_API void | resetImGuiStyle () |
| Reset ImGui style sizes and colors, and apply menu scaling to it. | |
| static MRVIEWER_API boost::signals2::connection | onChanged (const std::function< void()> &slot, boost::signals2::connect_position position=boost::signals2::at_back) |
| Connects given slot to receive signal on every Color Theme change, triggered in apply. | |
This singleton is born to manage color-themes loading and saving, and apply it to app It can handle scene colors (default mesh colors, etc.) and Dear ImGui colors