5#include <json/forwards.h>
176 MRVIEWER_API
static boost::signals2::connection
onChanged(
const std::function<
void()>& slot, boost::signals2::connect_position
position = boost::signals2::at_back );
186 MRVIEWER_API
static void apply_(
const std::vector<Color>& sceneColors );
188 bool isInitialized_ =
false;
194 std::string themeName_;
196 std::vector<std::string> foundUserThemes_;
198 using ChangedSignal =
Signal<void()>;
199 ChangedSignal changedSignal_;
Definition MRColorTheme.h:19
static MRVIEWER_API void updateUserThemesList()
Find available custom themes.
static MRVIEWER_API void setupUserTheme(const std::string &themeName)
static MRVIEWER_API bool isInitialized()
True if this structure is filled with colors, false if empty.
static MRVIEWER_API ColorTheme & instance()
static MRVIEWER_API void setupFromJson(const Json::Value &value, Type type=Type::User)
Setup this struct from Json value.
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.
static MRVIEWER_API const char * getPresetName(Preset type)
static MRVIEWER_API const char * getRibbonColorTypeName(RibbonColorsType type)
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 setRibbonColor(const Color &color, RibbonColorsType type)
Getter and setter for ribbon colors.
static MRVIEWER_API std::filesystem::path getUserThemesDirectory()
Returns directory where user's custom themes are stored.
static MRVIEWER_API std::vector< std::string > foundUserThemes()
Return list of found custom themes.
static MRVIEWER_API void setupByTypeName(Type type, const std::string &name)
Setup this struct.
static MRVIEWER_API Preset getPreset()
static MRVIEWER_API void setupDefaultLight()
static MRVIEWER_API void setupDefaultDark()
ViewportColorsType
Definition MRColorTheme.h:150
static MRVIEWER_API const char * getViewportColorTypeName(ViewportColorsType type)
static MRVIEWER_API void serializeCurrentToFile(const std::filesystem::path &path)
static MRVIEWER_API const Color & getRibbonColor(RibbonColorsType type)
static MRVIEWER_API void setViewportColor(const Color &color, ViewportColorsType type)
Getter and setter for viewport colors.
Preset
Definition MRColorTheme.h:24
static MRVIEWER_API const Color & getViewportColor(ViewportColorsType type)
Type
Definition MRColorTheme.h:35
static MRVIEWER_API Type getThemeType()
RibbonColorsType
Color types used in ribbon.
Definition MRColorTheme.h:67
static MRVIEWER_API void serializeCurrentToJson(Json::Value &root)
static MRVIEWER_API void resetImGuiStyle()
Reset ImGui style sizes and colors, and apply menu scaling to it.
static MRVIEWER_API const std::string & getThemeName()
@ RibbonButtonActiveHovered
@ RibbonButtonActiveClicked
@ GradBtnSecStyleActiveEnd
@ GradBtnSecStyleActiveStart
@ GradBtnSecStyleHoverStart
@ GradBtnSecStyleHoverEnd
@ TopPanelSearchBackground
@ CollapseHeaderBackground
only for bindings generation
Definition MRCameraOrientationPlugin.h:8