MeshLib Documentation
Loading...
Searching...
No Matches
MRObjectImGuiLabel.h
Go to the documentation of this file.
1#pragma once
2
3#include "exports.h"
4
6
7namespace MR
8{
9
12class MRVIEWER_CLASS ObjectImGuiLabel : public VisualObject
13{
14public:
15 MRVIEWER_API ObjectImGuiLabel();
16
17 ObjectImGuiLabel( ObjectImGuiLabel&& ) noexcept = default;
18 ObjectImGuiLabel& operator = ( ObjectImGuiLabel&& ) noexcept = default;
19
20 constexpr static const char* TypeName() noexcept
21 {
22 return "ObjectImGuiLabel";
23 }
24 const char* typeName() const override
25 {
26 return TypeName();
27 }
28
29 bool hasVisualRepresentation() const override { return true; }
30
31 MRVIEWER_API std::shared_ptr<Object> clone() const override;
32 MRVIEWER_API std::shared_ptr<Object> shallowClone() const override;
33
36
37 [[nodiscard]] MRVIEWER_API const std::string& getLabel() const;
38 MRVIEWER_API void setLabel( std::string value );
39
40protected:
41 ObjectImGuiLabel( const ObjectImGuiLabel& other ) = default;
42
44 MRVIEWER_API void swapBase_( Object& other ) override;
45
46 MRVIEWER_API void serializeFields_( Json::Value& root ) const override;
47
48 MRVIEWER_API void deserializeFields_( const Json::Value& root ) override;
49
50 MRVIEWER_API void setupRenderObject_() const override;
51
52private:
53 std::string labelText_;
54};
55
56}
Definition MRObjectImGuiLabel.h:13
MRVIEWER_API std::shared_ptr< Object > clone() const override
MRVIEWER_API void setLabel(std::string value)
bool hasVisualRepresentation() const override
does the object have any visual representation (visible points, triangles, edges, etc....
Definition MRObjectImGuiLabel.h:29
ObjectImGuiLabel(const ObjectImGuiLabel &other)=default
MRVIEWER_API void deserializeFields_(const Json::Value &root) override
MRVIEWER_API std::shared_ptr< Object > shallowClone() const override
MRVIEWER_API void serializeFields_(Json::Value &root) const override
ObjectImGuiLabel(ObjectImGuiLabel &&) noexcept=default
MRVIEWER_API const std::string & getLabel() const
MRVIEWER_API void setupRenderObject_() const override
MRVIEWER_API ObjectImGuiLabel()
MRVIEWER_API ObjectImGuiLabel(ProtectedStruct, const ObjectImGuiLabel &obj)
MRVIEWER_API void swapBase_(Object &other) override
swaps this object with other
const char * typeName() const override
Definition MRObjectImGuiLabel.h:24
named object in the data model
Definition MRObject.h:60
Visual Object.
Definition MRVisualObject.h:131
Definition MRCameraOrientationPlugin.h:8
Definition MRObject.h:246