19#include <unordered_map>
30struct UiRenderManager;
31class SceneObjectsListDrawer;
73 ImGuiContext * context_ =
nullptr;
75 ImGuiWindow* prevFrameFocusPlugin_ =
nullptr;
78 bool pollEventsInPreDraw =
false;
80 bool showShortcuts_{
false };
81 bool showStatistics_{
false };
82 long long frameTimeMillisecThreshold_{ 25 };
83 bool showRenameModal_{
false };
86 bool needModalBgChange_{
false };
87 bool showInfoModal_{
false };
99 bool savedDialogPositionEnabled_{
false };
109 std::shared_ptr<ObjectLabel> obj{
nullptr };
112 bool allowRemoval_{
true };
113 bool uniformScale_{
true };
114 bool xfHistUpdated_{
false };
115 bool invertedRotation_{
false };
123 void validate(
const std::vector<ViewerPlugin*>& viewerPlugins );
128 std::array<std::vector<StateBasePlugin*>, size_t( StatePluginTabs::Count )> sortedCustomPlufins_;
129 std::vector<ViewerPlugin*> allPlugins_;
142 } viewportConfig_{ Single };
145 bool selectionChangedToSingleObj_{
false };
155 MRVIEWER_API
static const std::shared_ptr<ImGuiMenu>&
instance();
167 MRVIEWER_API
virtual void load_font(
int font_size = 13);
201 const std::string& text,
203 bool clipByViewport );
226 MRVIEWER_API
void draw_scene_list_content(
const std::vector<std::shared_ptr<Object>>& selected,
const std::vector<std::shared_ptr<Object>>& all );
242 template<
typename ObjectT>
244 std::function<Vector4f(
const ObjectT* )> getter,
245 std::function<
void( ObjectT*,
const Vector4f& )> setter );
246 template<
typename ObjType>
247 void make_width( std::vector<std::shared_ptr<VisualObject>> selectedVisualObjs,
const char* label,
248 std::function<
float(
const ObjType* )> getter,
249 std::function<
void( ObjType*,
const float& )> setter );
251 void make_light_strength( std::vector<std::shared_ptr<VisualObject>> selectedVisualObjs,
const char* label,
253 std::function<
void(
VisualObject*,
const float& )> setter);
255 template <
typename T,
typename ObjectType>
256 void make_slider( std::vector<std::shared_ptr<ObjectType>> selectedVisualObjs,
const char* label,
257 std::function<T(
const ObjectType* )> getter,
258 std::function<
void( ObjectType*, T )> setter, T min, T max );
268 MRVIEWER_API
void add_modifier( std::shared_ptr<MR::MeshModifier> modifier );
292 MRVIEWER_API
const std::shared_ptr<SceneObjectsListDrawer>&
getSceneObjectsList() {
return sceneObjectsList_; };
321 MRVIEWER_API
bool drawRemoveButton(
const std::vector<std::shared_ptr<Object>>& selectedObjs );
327 bool capturedMouse_{
false };
331 MRVIEWER_API
virtual bool onMouseMove_(
int mouse_x,
int mouse_y )
override;
335 MRVIEWER_API
virtual bool onCharPressed_(
unsigned key,
int modifiers )
override;
336 MRVIEWER_API
virtual bool onKeyDown_(
int key,
int modifiers )
override;
337 MRVIEWER_API
virtual bool onKeyUp_(
int key,
int modifiers )
override;
338 MRVIEWER_API
virtual bool onKeyRepeat_(
int key,
int modifiers )
override;
343 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:67
Definition MRObjectPointsHolder.h:18
named object in the data model
Definition MRObject.h:60
Definition MRStatePlugin.h:78
Definition MRViewerPlugin.h:27
Definition MRViewportId.h:16
stores mask of viewport unique identifiers
Definition MRViewportId.h:38
Definition MRViewport.h:49
Visual Object.
Definition MRVisualObject.h:131
auto width(const Box< V > &box)
returns size along x axis
Definition MRMesh/MRBox.h:247
auto height(const Box< V > &box)
returns size along y axis
Definition MRMesh/MRBox.h:254
Definition MRCameraOrientationPlugin.h:8
SelectedTypesMask
Definition ImGuiMenu.h:34
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
class to subscribe on CursorEntranceSingal
Definition MRViewerEventsListener.h:380
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:213
Definition MRViewerEventsListener.h:195
class to subscribe on SpaceMouseDownSgnal
Definition MRViewerEventsListener.h:260
class to subscribe on SpaceMouseMoveSignal
Definition MRViewerEventsListener.h:250
Definition MRSignalCombiners.h:8
class to subscribe on TouchpadRotateGestureBeginEvent
Definition MRViewerEventsListener.h:280
class to subscribe on TouchpadRotateGestureEndEvent
Definition MRViewerEventsListener.h:300
class to subscribe on TouchpadRotateGestureUpdateEvent
Definition MRViewerEventsListener.h:290
class to subscribe on TouchpadSwipeGestureBeginEvent
Definition MRViewerEventsListener.h:310
class to subscribe on TouchpadSwipeGestureEndEvent
Definition MRViewerEventsListener.h:330
class to subscribe on TouchpadSwipeGestureUpdateEvent
Definition MRViewerEventsListener.h:320
class to subscribe on TouchpadZoomGestureBeginEvent
Definition MRViewerEventsListener.h:340
class to subscribe on TouchpadZoomGestureEndEvent
Definition MRViewerEventsListener.h:360
class to subscribe on TouchpadZoomGestureUpdateEvent
Definition MRViewerEventsListener.h:350
Definition MRIRenderObject.h:118
std::vector< std::shared_ptr< BasicUiRenderTask > > UiTaskList
Definition MRIRenderObject.h:111