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 drawLanguageSelector_();
83 void drawThemeSelector_();
84 void drawResetDialog_(
bool activated );
85 void drawShadingModeCombo_(
bool inGroup,
float toolWidth );
86 void drawProjectionModeSelector_(
float toolWidth );
87 void drawUpDirectionSelector_();
88 void drawBackgroundButton_(
bool allViewports );
89 void drawRenderOptions_();
90 void drawShadowsOptions_(
float menuWidth );
91 void drawMouseSceneControlsSettings_(
float menuWidth );
92 void drawSpaceMouseSettings_(
float menuWidth );
93 void drawTouchpadSettings_();
95 void drawMruInnerFormats_(
float menuWidth );
97 void drawGlobalSettings_(
float buttonWidth );
98 void drawCustomSettings_(
const std::string& separatorName,
bool needSeparator );
99 void drawSeparator_(
const std::string& separatorName );
102 void updateDialog_();
103 void resetSettings_();
105 int storedSamples_{ 0 };
106 int maxSamples_{ 0 };
107 bool gpuOverridesMSAA_{
false };
108 float tempUserScaling_{ 1.0f };
110 Vector4f backgroundColor_;
112 int selectedLanguage_{ -1 };
114 int selectedUserPreset_{ 0 };
115 std::vector<std::string> userThemesPresets_;
117 std::unique_ptr<ShadowsGL> shadowGl_;
119 SpaceMouse::Parameters spaceMouseParams_;
120#if defined(_WIN32) || defined(__APPLE__)
121 bool activeMouseScrollZoom_{
false };
124 TouchpadParameters touchpadParameters_;
126 TabType activeTab_ = TabType::Quick;
127 TabType orderedTab_ = TabType::Count;
129 std::array<std::vector<std::shared_ptr<ExternalSettings>>, size_t(TabType::Count)> comboSettings_;
131 MruFormatParameters mruFormatParameters_;
basic class of external settings
Definition MRViewerSettingsPlugin.h:44
virtual void drawDialog(ImGuiContext *ctx) override
void addComboSettings(const TabType tab, std::shared_ptr< ExternalSettings > settings)
add 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
void delComboSettings(const TabType tab, const ExternalSettings *settings)
delete external settings with UI combo box
StateListenerPlugin<> StatePlugin
Definition MRViewerFwd.h:75
virtual ~ExternalSettings()
Definition MRViewerSettingsPlugin.h:46
virtual void draw()=0
the function of drawing the configuration UI
void updateThemes()
call this function if you save/delete color theme, or change current theme outside of this plugin
virtual bool blocking() const override
true if this item is blocking (only one blocking item can be active at once)
Definition MRViewerSettingsPlugin.h:37
void setActiveTab(TabType tab)
changes active tab
virtual const char * separatorName() const
if not overriden this setting will be drawn in tools block
Definition MRViewerSettingsPlugin.h:54
static ViewerSettingsPlugin * instance()
TabType
Definition MRViewerSettingsPlugin.h:23
@ Quick
Definition MRViewerSettingsPlugin.h:24
@ MeasurementUnits
Definition MRViewerSettingsPlugin.h:28
@ Viewport
Definition MRViewerSettingsPlugin.h:27
@ Features
Definition MRViewerSettingsPlugin.h:29
@ Control
Definition MRViewerSettingsPlugin.h:26
@ Application
Definition MRViewerSettingsPlugin.h:25
@ Count
Definition MRViewerSettingsPlugin.h:30
only for bindings generation
Definition MRCameraOrientationPlugin.h:8