MeshLib Documentation
Loading...
Searching...
No Matches
MR::ColorTheme Class Reference

#include <MRColorTheme.h>

Public Types

enum class  Preset { Dark , Default = Dark , Light , Count }
 
enum class  Type { Default , User }
 
enum class  RibbonColorsType {
  Background , BackgroundSecStyle , HeaderBackground , HeaderSeparator ,
  TopPanelBackground , QuickAccessBackground , Borders , TabHovered ,
  TabClicked , TabActive , TabActiveHovered , TabActiveClicked ,
  TabText , TabActiveText , DialogTab , DialogTabHovered ,
  DialogTabActive , DialogTabActiveHovered , DialogTabText , DialogTabActiveText ,
  ToolbarHovered , ToolbarClicked , ModalBackground , Text ,
  TextEnabled , TextDisabled , TextSelectedBg , RibbonButtonHovered ,
  RibbonButtonClicked , RibbonButtonActive , RibbonButtonActiveHovered , RibbonButtonActiveClicked ,
  ThirdpartyBackground , ProgressBarBackground , FrameBackground , CollapseHeaderBackground ,
  SelectedObjectText , SelectedObjectFrame , GradientStart , GradientEnd ,
  TextContrastBackground , GradBtnStart , GradBtnHoverStart , GradBtnActiveStart ,
  GradBtnDisableStart , GradBtnEnd , GradBtnHoverEnd , GradBtnActiveEnd ,
  GradBtnDisableEnd , GradBtnText , GradBtnSecStyleStart , GradBtnSecStyleHoverStart ,
  GradBtnSecStyleActiveStart , GradBtnSecStyleEnd , GradBtnSecStyleHoverEnd , GradBtnSecStyleActiveEnd ,
  Count
}
 
enum class  ViewportColorsType { Background , Borders , Count }
 

Static Public Member Functions

static MRVIEWER_API ColorThemeinstance ()
 
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)
 
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)
 
static MRVIEWER_API void setupFromJson (const Json::Value &value, Type type=Type::User)
 
static MRVIEWER_API void serializeCurrentToFile (const std::filesystem::path &path)
 
static MRVIEWER_API void serializeCurrentToJson (Json::Value &root)
 
static MRVIEWER_API void apply ()
 
static MRVIEWER_API bool isInitialized ()
 
static MRVIEWER_API void setRibbonColor (const Color &color, RibbonColorsType type)
 
static MRVIEWER_API const ColorgetRibbonColor (RibbonColorsType type)
 
static MRVIEWER_API const char * getRibbonColorTypeName (RibbonColorsType type)
 
static MRVIEWER_API void setViewportColor (const Color &color, ViewportColorsType type)
 
static MRVIEWER_API const ColorgetViewportColor (ViewportColorsType type)
 
static MRVIEWER_API const char * getViewportColorTypeName (ViewportColorsType type)
 
static MRVIEWER_API std::filesystem::path getUserThemesDirectory ()
 
static MRVIEWER_API void updateUserThemesList ()
 
static MRVIEWER_API std::vector< std::string > foundUserThemes ()
 
static MRVIEWER_API void resetImGuiStyle ()
 
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.
 

Member Enumeration Documentation

◆ Preset

enum class MR::ColorTheme::Preset
strong
Enumerator
Dark 
Default 
Light 
Count 

◆ RibbonColorsType

Enumerator
Background 
BackgroundSecStyle 
HeaderBackground 
HeaderSeparator 
TopPanelBackground 
QuickAccessBackground 
Borders 
TabHovered 
TabClicked 
TabActive 
TabActiveHovered 
TabActiveClicked 
TabText 
TabActiveText 
DialogTab 
DialogTabHovered 
DialogTabActive 
DialogTabActiveHovered 
DialogTabText 
DialogTabActiveText 
ToolbarHovered 
ToolbarClicked 
ModalBackground 
Text 
TextEnabled 
TextDisabled 
TextSelectedBg 
RibbonButtonHovered 
RibbonButtonClicked 
RibbonButtonActive 
RibbonButtonActiveHovered 
RibbonButtonActiveClicked 
ThirdpartyBackground 
ProgressBarBackground 
FrameBackground 
CollapseHeaderBackground 
SelectedObjectText 
SelectedObjectFrame 
GradientStart 
GradientEnd 
TextContrastBackground 
GradBtnStart 
GradBtnHoverStart 
GradBtnActiveStart 
GradBtnDisableStart 
GradBtnEnd 
GradBtnHoverEnd 
GradBtnActiveEnd 
GradBtnDisableEnd 
GradBtnText 
GradBtnSecStyleStart 
GradBtnSecStyleHoverStart 
GradBtnSecStyleActiveStart 
GradBtnSecStyleEnd 
GradBtnSecStyleHoverEnd 
GradBtnSecStyleActiveEnd 
Count 

◆ Type

enum class MR::ColorTheme::Type
strong
Enumerator
Default 
User 

◆ ViewportColorsType

Enumerator
Background 
Borders 
Count 

Member Function Documentation

◆ apply()

static MRVIEWER_API void MR::ColorTheme::apply ( )
static

◆ foundUserThemes()

static MRVIEWER_API std::vector< std::string > MR::ColorTheme::foundUserThemes ( )
static

◆ getPreset()

static MRVIEWER_API Preset MR::ColorTheme::getPreset ( )
static

◆ getPresetName()

static MRVIEWER_API const char * MR::ColorTheme::getPresetName ( Preset type)
static

◆ getRibbonColor()

static MRVIEWER_API const Color & MR::ColorTheme::getRibbonColor ( RibbonColorsType type)
static

◆ getRibbonColorTypeName()

static MRVIEWER_API const char * MR::ColorTheme::getRibbonColorTypeName ( RibbonColorsType type)
static

◆ getThemeName()

static MRVIEWER_API const std::string & MR::ColorTheme::getThemeName ( )
static

◆ getThemeType()

static MRVIEWER_API Type MR::ColorTheme::getThemeType ( )
static

◆ getUserThemesDirectory()

static MRVIEWER_API std::filesystem::path MR::ColorTheme::getUserThemesDirectory ( )
static

◆ getViewportColor()

static MRVIEWER_API const Color & MR::ColorTheme::getViewportColor ( ViewportColorsType type)
static

◆ getViewportColorTypeName()

static MRVIEWER_API const char * MR::ColorTheme::getViewportColorTypeName ( ViewportColorsType type)
static

◆ instance()

static MRVIEWER_API ColorTheme & MR::ColorTheme::instance ( )
static

◆ isInitialized()

static MRVIEWER_API bool MR::ColorTheme::isInitialized ( )
static

◆ onChanged()

static MRVIEWER_API boost::signals2::connection MR::ColorTheme::onChanged ( const std::function< void()> & slot,
boost::signals2::connect_position position = boost::signals2::at_back )
static

Connects given slot to receive signal on every Color Theme change, triggered in apply.

◆ resetImGuiStyle()

static MRVIEWER_API void MR::ColorTheme::resetImGuiStyle ( )
static

◆ serializeCurrentToFile()

static MRVIEWER_API void MR::ColorTheme::serializeCurrentToFile ( const std::filesystem::path & path)
static

◆ serializeCurrentToJson()

static MRVIEWER_API void MR::ColorTheme::serializeCurrentToJson ( Json::Value & root)
static

◆ setRibbonColor()

static MRVIEWER_API void MR::ColorTheme::setRibbonColor ( const Color & color,
RibbonColorsType type )
static

◆ setupByTypeName()

static MRVIEWER_API void MR::ColorTheme::setupByTypeName ( Type type,
const std::string & name )
static

◆ setupDefaultDark()

static MRVIEWER_API void MR::ColorTheme::setupDefaultDark ( )
static

◆ setupDefaultLight()

static MRVIEWER_API void MR::ColorTheme::setupDefaultLight ( )
static

◆ setupFromFile()

static MRVIEWER_API void MR::ColorTheme::setupFromFile ( const std::filesystem::path & path,
Type type = Type::User )
static

◆ setupFromJson()

static MRVIEWER_API void MR::ColorTheme::setupFromJson ( const Json::Value & value,
Type type = Type::User )
static

◆ setupUserTheme()

static MRVIEWER_API void MR::ColorTheme::setupUserTheme ( const std::string & themeName)
static

◆ setViewportColor()

static MRVIEWER_API void MR::ColorTheme::setViewportColor ( const Color & color,
ViewportColorsType type )
static

◆ updateUserThemesList()

static MRVIEWER_API void MR::ColorTheme::updateUserThemesList ( )
static

The documentation for this class was generated from the following file: