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 );
179 ColorTheme() =
default;
180 ~ColorTheme() =
default;
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_;
ImVec2 position(const ViewportRectangle &rect)
Definition MRViewport.h:27
static void updateUserThemesList()
Find available custom themes.
static 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 const char * getRibbonColorTypeName(RibbonColorsType type)
static void setupFromJson(const Json::Value &value, Type type=Type::User)
Setup this struct from Json value.
static std::vector< std::string > foundUserThemes()
Return list of found custom themes.
static void serializeCurrentToFile(const std::filesystem::path &path)
static void setupDefaultLight()
static ColorTheme & instance()
static Type getThemeType()
static Preset getPreset()
static const Color & getRibbonColor(RibbonColorsType type)
static void setViewportColor(const Color &color, ViewportColorsType type)
Getter and setter for viewport colors.
static void setupFromFile(const std::filesystem::path &path, Type type=Type::User)
Setup this struct from serialized color-theme file.
static std::filesystem::path getUserThemesDirectory()
Returns directory where user's custom themes are stored.
static const char * getPresetName(Preset type)
static void resetImGuiStyle()
Reset ImGui style sizes and colors, and apply menu scaling to it.
static bool isInitialized()
True if this structure is filled with colors, false if empty.
ViewportColorsType
Definition MRColorTheme.h:150
static const char * getViewportColorTypeName(ViewportColorsType type)
static void setupDefaultDark()
static void setupByTypeName(Type type, const std::string &name)
Setup this struct.
static const std::string & getThemeName()
Preset
Definition MRColorTheme.h:24
static void setRibbonColor(const Color &color, RibbonColorsType type)
Getter and setter for ribbon colors.
Type
Definition MRColorTheme.h:35
static void serializeCurrentToJson(Json::Value &root)
static const Color & getViewportColor(ViewportColorsType type)
RibbonColorsType
Color types used in ribbon.
Definition MRColorTheme.h:67
static void setupUserTheme(const std::string &themeName)
@ AxisX
Definition MRColorTheme.h:153
@ AxisY
Definition MRColorTheme.h:154
@ AxisZ
Definition MRColorTheme.h:155
@ Count
Definition MRColorTheme.h:156
@ Default
Definition MRColorTheme.h:26
@ Light
Definition MRColorTheme.h:27
@ Dark
Definition MRColorTheme.h:25
@ Count
Definition MRColorTheme.h:28
@ Default
Definition MRColorTheme.h:36
@ User
Definition MRColorTheme.h:37
@ GradBtnSecStyleStart
Definition MRColorTheme.h:133
@ QuickAccessBackground
Definition MRColorTheme.h:75
@ RibbonButtonActiveHovered
Definition MRColorTheme.h:107
@ GradBtnDisableStart
Definition MRColorTheme.h:126
@ RibbonButtonActiveClicked
Definition MRColorTheme.h:108
@ RibbonButtonClicked
Definition MRColorTheme.h:105
@ GradBtnSecStyleEnd
Definition MRColorTheme.h:136
@ GradBtnSecStyleActiveEnd
Definition MRColorTheme.h:138
@ TopPanelBackground
Definition MRColorTheme.h:72
@ GradBtnHoverStart
Definition MRColorTheme.h:124
@ HeaderBackground
Definition MRColorTheme.h:70
@ TabClicked
Definition MRColorTheme.h:80
@ GradBtnDisableEnd
Definition MRColorTheme.h:130
@ RibbonButtonActive
Definition MRColorTheme.h:106
@ DialogTabText
Definition MRColorTheme.h:91
@ TabActive
Definition MRColorTheme.h:81
@ GradBtnStart
Definition MRColorTheme.h:123
@ Grid
Definition MRColorTheme.h:140
@ SelectedObjectFrame
Definition MRColorTheme.h:116
@ RibbonButtonHovered
Definition MRColorTheme.h:104
@ GradBtnEnd
Definition MRColorTheme.h:127
@ TabText
Definition MRColorTheme.h:84
@ DialogTabHovered
Definition MRColorTheme.h:88
@ BackgroundSecStyle
Definition MRColorTheme.h:69
@ GradBtnSecStyleActiveStart
Definition MRColorTheme.h:135
@ GradBtnSecStyleHoverStart
Definition MRColorTheme.h:134
@ TabActiveText
Definition MRColorTheme.h:85
@ ToolbarHovered
Definition MRColorTheme.h:94
@ GradBtnActiveEnd
Definition MRColorTheme.h:129
@ HeaderSeparator
Definition MRColorTheme.h:71
@ GradBtnSecStyleHoverEnd
Definition MRColorTheme.h:137
@ Text
Definition MRColorTheme.h:99
@ TabActiveHovered
Definition MRColorTheme.h:82
@ GradBtnText
Definition MRColorTheme.h:131
@ TextEnabled
Definition MRColorTheme.h:100
@ ThirdpartyBackground
Definition MRColorTheme.h:110
@ Background
Definition MRColorTheme.h:68
@ TextContrastBackground
Definition MRColorTheme.h:121
@ GradientEnd
Definition MRColorTheme.h:119
@ TopPanelSearchBackground
Definition MRColorTheme.h:73
@ FrameBackground
Definition MRColorTheme.h:112
@ TabHovered
Definition MRColorTheme.h:79
@ ModalBackground
Definition MRColorTheme.h:97
@ SelectedObjectText
Definition MRColorTheme.h:115
@ DialogTabActive
Definition MRColorTheme.h:89
@ ToolbarClicked
Definition MRColorTheme.h:95
@ GradBtnActiveStart
Definition MRColorTheme.h:125
@ TabActiveClicked
Definition MRColorTheme.h:83
@ DialogTabActiveHovered
Definition MRColorTheme.h:90
@ DialogTab
Definition MRColorTheme.h:87
@ ProgressBarBackground
Definition MRColorTheme.h:111
@ CollapseHeaderBackground
Definition MRColorTheme.h:113
@ Borders
Definition MRColorTheme.h:77
@ TextDisabled
Definition MRColorTheme.h:101
@ TextSelectedBg
Definition MRColorTheme.h:102
@ DialogTabActiveText
Definition MRColorTheme.h:92
@ Count
Definition MRColorTheme.h:142
@ GradBtnHoverEnd
Definition MRColorTheme.h:128
@ GradientStart
Definition MRColorTheme.h:118
only for bindings generation
Definition MRCameraOrientationPlugin.h:8