MeshLib Documentation
Loading...
Searching...
No Matches
MRSetupViewer.h
Go to the documentation of this file.
1#pragma once
2
3#include "MRViewerFwd.h"
4#include <string>
5#include <filesystem>
6
7namespace MR
8{
9
10class MRVIEWER_CLASS ViewerSetup
11{
12public:
14 ViewerSetup() = default;
15 ViewerSetup( const ViewerSetup & ) = default;
16 ViewerSetup( ViewerSetup && ) = default;
17
18 virtual ~ViewerSetup() = default;
19
21 MRVIEWER_API virtual void setupBasePlugins( Viewer* /*viewer*/ ) const;
22
24 virtual void setupCommonModifiers( Viewer* /*viewer*/ ) const {}
25
27 virtual void setupCommonPlugins( Viewer* /*viewer*/ ) const {}
28
30 MRVIEWER_API virtual void setupSettingsManager( Viewer* viewer, const std::string& appName ) const;
31
34 MRVIEWER_API virtual void setupConfiguration( Viewer* viewer ) const;
35
38 MRVIEWER_API virtual void setupExtendedLibraries() const;
39
41 MRVIEWER_API virtual void unloadExtendedLibraries() const;
42
43private:
44#ifndef __EMSCRIPTEN__
45 struct LoadedModule
46 {
47 std::filesystem::path filename;
48#if _WIN32
49 HMODULE module = nullptr;
50#else
51 void * module = nullptr;
52#endif
53 };
54 mutable std::vector<LoadedModule> loadedModules_;
55#endif // ifndef __EMSCRIPTEN__
56};
57
58} // namespace MR
Definition MRSetupViewer.h:11
virtual void setupCommonPlugins(Viewer *) const
Setups custom plugins to viewer.
Definition MRSetupViewer.h:27
virtual MRVIEWER_API void setupExtendedLibraries() const
ViewerSetup(const ViewerSetup &)=default
ViewerSetup(ViewerSetup &&)=default
virtual void setupCommonModifiers(Viewer *) const
Setups modifiers to Menu plugin if it is present in viewer.
Definition MRSetupViewer.h:24
virtual MRVIEWER_API void setupBasePlugins(Viewer *) const
Setups Menu Save and Open plugins.
virtual MRVIEWER_API void setupConfiguration(Viewer *viewer) const
virtual ~ViewerSetup()=default
ViewerSetup()=default
explicitly define ctors to avoid warning C5267: definition of implicit copy constructor is deprecated...
virtual MRVIEWER_API void setupSettingsManager(Viewer *viewer, const std::string &appName) const
Sets custom viewer settings manager to viewer.
virtual MRVIEWER_API void unloadExtendedLibraries() const
free all libraries loaded in setupExtendedLibraries()
Definition MRCameraOrientationPlugin.h:8
Definition Viewer.dox.py:1