19#include <unordered_map>
30struct UiRenderManager;
31class SceneObjectsListDrawer;
32class ObjectComparableWithReference;
74 float userScaling_ = 1.0f;
77 ImGuiContext * context_ =
nullptr;
79 ImGuiWindow* prevFrameFocusPlugin_ =
nullptr;
82 bool pollEventsInPreDraw =
false;
84 bool showShortcuts_{
false };
85 bool showStatistics_{
false };
86 long long frameTimeMillisecThreshold_{ 25 };
87 bool showRenameModal_{
false };
90 bool needModalBgChange_{
false };
91 bool showInfoModal_{
false };
103 bool savedDialogPositionEnabled_{
false };
113 std::shared_ptr<ObjectLabel> obj{
nullptr };
116 bool allowRemoval_{
true };
117 bool uniformScale_{
true };
118 bool xfHistUpdated_{
false };
119 bool invertedRotation_{
false };
127 void validate(
const std::vector<ViewerPlugin*>& viewerPlugins );
132 std::array<std::vector<StateBasePlugin*>, size_t( StatePluginTabs::Count )> sortedCustomPlufins_;
133 std::vector<ViewerPlugin*> allPlugins_;
146 } viewportConfig_{ Single };
149 bool selectionChangedToSingleObj_{
false };
163 bool initHasFrontColor =
false;
164 bool hasFrontColor =
false;
170 bool showEditTag_ =
false;
175 MRVIEWER_API
static const std::shared_ptr<ImGuiMenu>&
instance();
187 MRVIEWER_API
virtual void load_font(
int font_size = 13);
219 const std::string& text,
221 bool clipByViewport );
249 MRVIEWER_API
void draw_scene_list_content(
const std::vector<std::shared_ptr<Object>>& selected,
const std::vector<std::shared_ptr<Object>>& all );
265 template<
typename ObjectT>
267 std::function<Vector4f(
const ObjectT* )> getter,
268 std::function<
void( ObjectT*,
const Vector4f& )> setter );
269 template<
typename ObjType,
typename ValueT>
270 void make_width( std::vector<std::shared_ptr<VisualObject>> selectedVisualObjs,
const char* label,
271 std::function<ValueT(
const ObjType* )> getter,
272 std::function<
void( ObjType*,
const ValueT& )> setter );
274 void make_light_strength( std::vector<std::shared_ptr<VisualObject>> selectedVisualObjs,
const char* label,
276 std::function<
void(
VisualObject*,
const float& )> setter);
278 template <
typename T,
typename ObjectType>
279 void make_slider( std::vector<std::shared_ptr<ObjectType>> selectedVisualObjs,
const char* label,
280 std::function<T(
const ObjectType* )> getter,
281 std::function<
void( ObjectType*, T )> setter, T min, T max );
291 MRVIEWER_API
void add_modifier( std::shared_ptr<MR::MeshModifier> modifier );
315 MRVIEWER_API
const std::shared_ptr<SceneObjectsListDrawer>&
getSceneObjectsList() {
return sceneObjectsList_; };
346 MRVIEWER_API
bool drawRemoveButton(
const std::vector<std::shared_ptr<Object>>& selectedObjs );
370 bool capturedMouse_{
false };
374 MRVIEWER_API
virtual bool onMouseMove_(
int mouse_x,
int mouse_y )
override;
378 MRVIEWER_API
virtual bool onCharPressed_(
unsigned key,
int modifiers )
override;
379 MRVIEWER_API
virtual bool onKeyDown_(
int key,
int modifiers )
override;
380 MRVIEWER_API
virtual bool onKeyUp_(
int key,
int modifiers )
override;
381 MRVIEWER_API
virtual bool onKeyRepeat_(
int key,
int modifiers )
override;
386 MRVIEWER_API
virtual bool spaceMouseMove_(
const Vector3f& translate,
const Vector3f& rotate )
override;
#define MR_MAKE_FLAG_OPERATORS(T)
Definition MRFlagOperators.h:6
Definition MRVisualObject.h:54
Definition MRObjectComparableWithReference.h:14
Definition MRObjectPointsHolder.h:21
named object in the data model
Definition MRObject.h:62
Definition MRStatePlugin.h:78
Definition MRViewerPlugin.h:27
Definition MRViewportId.h:16
stores mask of viewport unique identifiers
Definition MRViewportId.h:42
Definition MRViewport.h:46
Visual Object.
Definition MRVisualObject.h:119
auto width(const Box< V > &box)
returns size along x axis
Definition MRMesh/MRBox.h:341
auto height(const Box< V > &box)
returns size along y axis
Definition MRMesh/MRBox.h:348
Definition MRCameraOrientationPlugin.h:8
SelectedTypesMask
Definition ImGuiMenu.h:35
MouseButton
Definition MRMouse.h:9
NotificationType
Definition MRNotificationType.h:7
StatePluginTabs
Definition MRStatePlugin.h:58
MRVIEWER_API void reserveKeyEvent(ImGuiKey key)
Definition MRIRenderObject.h:81
InteractionMask
Definition MRIRenderObject.h:74
Definition MRViewerEventsListener.h:123
Definition MRMesh/MRColor.h:9
class to subscribe on CursorEntranceSingal
Definition MRViewerEventsListener.h:407
Definition MRViewerEventsListener.h:141
Definition MRViewerEventsListener.h:150
Definition MRViewerEventsListener.h:132
Definition MRViewerEventsListener.h:51
Definition MRViewerEventsListener.h:69
Definition MRViewerEventsListener.h:60
Definition MRViewerEventsListener.h:29
Definition MRViewerEventsListener.h:240
Definition MRViewerEventsListener.h:222
class to subscribe on SpaceMouseDownSgnal
Definition MRViewerEventsListener.h:287
class to subscribe on SpaceMouseMoveSignal
Definition MRViewerEventsListener.h:277
Definition MRSignalCombiners.h:8
class to subscribe on TouchpadRotateGestureBeginEvent
Definition MRViewerEventsListener.h:307
class to subscribe on TouchpadRotateGestureEndEvent
Definition MRViewerEventsListener.h:327
class to subscribe on TouchpadRotateGestureUpdateEvent
Definition MRViewerEventsListener.h:317
class to subscribe on TouchpadSwipeGestureBeginEvent
Definition MRViewerEventsListener.h:337
class to subscribe on TouchpadSwipeGestureEndEvent
Definition MRViewerEventsListener.h:357
class to subscribe on TouchpadSwipeGestureUpdateEvent
Definition MRViewerEventsListener.h:347
class to subscribe on TouchpadZoomGestureBeginEvent
Definition MRViewerEventsListener.h:367
class to subscribe on TouchpadZoomGestureEndEvent
Definition MRViewerEventsListener.h:387
class to subscribe on TouchpadZoomGestureUpdateEvent
Definition MRViewerEventsListener.h:377
Definition MRIRenderObject.h:115
std::vector< std::shared_ptr< BasicUiRenderTask > > UiTaskList
Definition MRIRenderObject.h:108