MeshLib Documentation
Loading...
Searching...
No Matches
MRSceneControlMenuItems.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
MRViewer/MRRibbonMenuItem.h
"
4
#include "
MRViewer/MRHistoryStore.h
"
5
#include "
MRViewer/MRViewerEventsListener.h
"
6
7
namespace
MR
8
{
9
10
class
ResetSceneMenuItem
:
public
RibbonMenuItem
,
public
MultiListener
<PreDrawListener>
11
{
12
public
:
13
ResetSceneMenuItem
();
14
virtual
bool
action
()
override
;
15
virtual
bool
blocking
()
const override
{
return
true
; }
16
private
:
17
virtual
void
preDraw_()
override
;
18
void
resetScene_();
19
bool
openPopup_{
false
};
20
unsigned
popupId_{ 0 };
21
};
22
23
class
FitDataMenuItem
:
public
RibbonMenuItem
24
{
25
public
:
26
FitDataMenuItem
();
27
virtual
bool
action
()
override
;
28
virtual
std::string
isAvailable
(
const
std::vector<std::shared_ptr<const Object>>& )
const override
;
29
};
30
31
class
FitSelectedObjectsMenuItem
:
public
RibbonMenuItem
32
{
33
public
:
34
FitSelectedObjectsMenuItem
();
35
virtual
bool
action
()
override
;
36
virtual
std::string
isAvailable
(
const
std::vector<std::shared_ptr<const Object>>& )
const override
;
37
};
38
39
class
FitSelectedPrimitivesMenuItem
:
public
RibbonMenuItem
40
{
41
public
:
42
FitSelectedPrimitivesMenuItem
();
43
virtual
bool
action
()
override
;
44
virtual
std::string
isAvailable
(
const
std::vector<std::shared_ptr<const Object>>& )
const override
;
45
};
46
47
class
SetViewPresetMenuItem
:
public
RibbonMenuItem
48
{
49
public
:
50
enum class
Type
51
{
52
Front
,
53
Top
,
54
// 2 is skipped
55
Bottom
= 3,
56
Left
,
57
Back
,
58
Right
,
59
Isometric
,
60
Count
61
};
62
SetViewPresetMenuItem
(
Type
type
);
63
virtual
bool
action
()
override
;
64
private
:
65
Type
type_;
66
};
67
68
class
SetViewportConfigPresetMenuItem
:
public
RibbonMenuItem
69
{
70
public
:
71
enum class
Type
72
{
73
Single
,
74
Horizontal
,
75
Vertical
,
76
Quad
,
77
Hex
,
78
Count
79
};
80
SetViewportConfigPresetMenuItem
(
Type
type
);
81
virtual
void
setCustomUpdateViewports
(
const
std::function<
void
(
const
ViewportMask
)>& callback ) { updateViewports_ = callback; }
82
virtual
bool
action
()
override
;
83
private
:
84
Type
type_;
85
std::function<void(
const
ViewportMask
appendedViewports )> updateViewports_;
86
};
87
88
}
MRHistoryStore.h
MRRibbonMenuItem.h
MRViewerEventsListener.h
MR::FitDataMenuItem
Definition
MRSceneControlMenuItems.h:24
MR::FitDataMenuItem::isAvailable
virtual std::string isAvailable(const std::vector< std::shared_ptr< const Object > > &) const override
MR::FitDataMenuItem::action
virtual bool action() override
MR::FitDataMenuItem::FitDataMenuItem
FitDataMenuItem()
MR::FitSelectedObjectsMenuItem
Definition
MRSceneControlMenuItems.h:32
MR::FitSelectedObjectsMenuItem::FitSelectedObjectsMenuItem
FitSelectedObjectsMenuItem()
MR::FitSelectedObjectsMenuItem::action
virtual bool action() override
MR::FitSelectedObjectsMenuItem::isAvailable
virtual std::string isAvailable(const std::vector< std::shared_ptr< const Object > > &) const override
MR::FitSelectedPrimitivesMenuItem
Definition
MRSceneControlMenuItems.h:40
MR::FitSelectedPrimitivesMenuItem::isAvailable
virtual std::string isAvailable(const std::vector< std::shared_ptr< const Object > > &) const override
MR::FitSelectedPrimitivesMenuItem::FitSelectedPrimitivesMenuItem
FitSelectedPrimitivesMenuItem()
MR::FitSelectedPrimitivesMenuItem::action
virtual bool action() override
MR::ResetSceneMenuItem
Definition
MRSceneControlMenuItems.h:11
MR::ResetSceneMenuItem::ResetSceneMenuItem
ResetSceneMenuItem()
MR::ResetSceneMenuItem::action
virtual bool action() override
MR::ResetSceneMenuItem::blocking
virtual bool blocking() const override
Definition
MRSceneControlMenuItems.h:15
MR::RibbonMenuItem
Definition
MRRibbonMenuItem.h:20
MR::RibbonMenuItem::type
virtual RibbonItemType type() const
Definition
MRRibbonMenuItem.h:45
MR::SetViewPresetMenuItem
Definition
MRSceneControlMenuItems.h:48
MR::SetViewPresetMenuItem::action
virtual bool action() override
MR::SetViewPresetMenuItem::Type
Type
Definition
MRSceneControlMenuItems.h:51
MR::SetViewPresetMenuItem::Type::Back
@ Back
MR::SetViewPresetMenuItem::Type::Bottom
@ Bottom
MR::SetViewPresetMenuItem::Type::Front
@ Front
MR::SetViewPresetMenuItem::Type::Right
@ Right
MR::SetViewPresetMenuItem::Type::Isometric
@ Isometric
MR::SetViewPresetMenuItem::Type::Left
@ Left
MR::SetViewPresetMenuItem::Type::Top
@ Top
MR::SetViewPresetMenuItem::Type::Count
@ Count
MR::SetViewPresetMenuItem::SetViewPresetMenuItem
SetViewPresetMenuItem(Type type)
MR::SetViewportConfigPresetMenuItem
Definition
MRSceneControlMenuItems.h:69
MR::SetViewportConfigPresetMenuItem::Type
Type
Definition
MRSceneControlMenuItems.h:72
MR::SetViewportConfigPresetMenuItem::Type::Vertical
@ Vertical
MR::SetViewportConfigPresetMenuItem::Type::Single
@ Single
MR::SetViewportConfigPresetMenuItem::Type::Hex
@ Hex
MR::SetViewportConfigPresetMenuItem::Type::Horizontal
@ Horizontal
MR::SetViewportConfigPresetMenuItem::Type::Quad
@ Quad
MR::SetViewportConfigPresetMenuItem::Type::Count
@ Count
MR::SetViewportConfigPresetMenuItem::SetViewportConfigPresetMenuItem
SetViewportConfigPresetMenuItem(Type type)
MR::SetViewportConfigPresetMenuItem::action
virtual bool action() override
MR::SetViewportConfigPresetMenuItem::setCustomUpdateViewports
virtual void setCustomUpdateViewports(const std::function< void(const ViewportMask)> &callback)
Definition
MRSceneControlMenuItems.h:81
MR::ViewportMask
stores mask of viewport unique identifiers
Definition
MRViewportId.h:38
MR
Definition
MRCameraOrientationPlugin.h:8
MR::MultiListener
Definition
MRViewerEventsListener.h:29
MeshLib
source
MRCommonPlugins
ViewerButtons
MRSceneControlMenuItems.h
Generated by
1.11.0