3#include "MRViewerFwd.h"
9#include "MRCommonPlugins/exports.h"
37 virtual bool blocking()
const override {
return false; }
48 virtual const std::string&
getName()
const = 0;
70 virtual bool onEnable_()
override;
71 virtual bool onDisable_()
override;
73 void drawTab_(
float menuWidth );
75 void drawQuickTab_(
float menuWidth );
76 void drawApplicationTab_(
float menuWidth );
77 void drawControlTab_(
float menuWidth );
78 void drawViewportTab_(
float menuWidth );
79 void drawMeasurementUnitsTab_();
80 void drawFeaturesTab_();
82 void drawThemeSelector_();
83 void drawResetDialog_(
bool activated );
84 void drawShadingModeCombo_(
bool inGroup,
float toolWidth );
85 void drawProjectionModeSelector_(
float toolWidth );
86 void drawUpDirectionSelector_();
87 void drawBackgroundButton_(
bool allViewports );
88 void drawRenderOptions_();
89 void drawShadowsOptions_(
float menuWidth );
90 void drawMouseSceneControlsSettings_(
float menuWidth );
91 void drawSpaceMouseSettings_(
float menuWidth );
92 void drawTouchpadSettings_();
94 void drawMruInnerFormats_(
float menuWidth );
96 void drawGlobalSettings_(
float buttonWidth );
97 void drawCustomSettings_(
const std::string& separatorName,
bool needSeparator );
98 void drawSeparator_(
const std::string& separatorName );
101 void updateDialog_();
102 void resetSettings_();
104 int storedSamples_{ 0 };
105 int maxSamples_{ 0 };
106 bool gpuOverridesMSAA_{
false };
107 float tempUserScaling_{ 1.0f };
109 Vector4f backgroundColor_;
111 int selectedUserPreset_{ 0 };
112 std::vector<std::string> userThemesPresets_;
114 std::unique_ptr<ShadowsGL> shadowGl_;
116 SpaceMouse::Parameters spaceMouseParams_;
117#if defined(_WIN32) || defined(__APPLE__)
118 bool activeMouseScrollZoom_{
false };
121 TouchpadParameters touchpadParameters_;
123 TabType activeTab_ = TabType::Quick;
124 TabType orderedTab_ = TabType::Count;
126 std::array<std::vector<std::shared_ptr<ExternalSettings>>, size_t(TabType::Count)> comboSettings_;
128 MruFormatParameters mruFormatParameters_;
basic class of external settings
Definition MRViewerSettingsPlugin.h:44
Definition MRViewerSettingsPlugin.h:19
Definition MRViewport.h:49
virtual void drawDialog(ImGuiContext *ctx) override
MRVIEWER_API void delComboSettings(const TabType tab, const ExternalSettings *settings)
delete external settings with UI combo box
virtual const std::string & getName() const =0
returns the name of the setting, which is a unique value
virtual void reset()
restore the settings to their default values
Definition MRViewerSettingsPlugin.h:52
MRVIEWER_API void setActiveTab(TabType tab)
changes active tab
virtual ~ExternalSettings()
Definition MRViewerSettingsPlugin.h:46
virtual void draw()=0
the function of drawing the configuration UI
virtual bool blocking() const override
Definition MRViewerSettingsPlugin.h:37
MRVIEWER_API void addComboSettings(const TabType tab, std::shared_ptr< ExternalSettings > settings)
add external settings with UI combo box
MRVIEWER_API void updateThemes()
call this function if you save/delete color theme, or change current theme outside of this plugin
virtual const char * separatorName() const
if not overriden this setting will be drawn in tools block
Definition MRViewerSettingsPlugin.h:54
static MRVIEWER_API ViewerSettingsPlugin * instance()
TabType
Definition MRViewerSettingsPlugin.h:23
only for bindings generation
Definition MRCameraOrientationPlugin.h:8