MeshLib Documentation
Loading...
Searching...
No Matches
MRIOFilesMenuItems.h
Go to the documentation of this file.
1#pragma once
2#include "MRMesh/MRMeshFwd.h"
6#include <filesystem>
7
8#ifndef MESHLIB_NO_VOXELS
10#endif
11
12namespace MR
13{
14using FileNamesStack = std::vector<std::filesystem::path>;
15
17{
18public:
20 std::string isAvailable( const std::vector<std::shared_ptr<const Object>>& ) const override;
21 bool action() override;
22 void openDirectory( const std::filesystem::path& directory ) const;
23};
24
25class OpenFilesMenuItem : public RibbonMenuItem, public MultiListener<DragDropListener>
26{
27public:
30 virtual bool action() override;
31
32 virtual const DropItemsList& dropItems() const override;
33private:
34 virtual bool dragDrop_( const std::vector<std::filesystem::path>& paths ) override;
35 void parseLaunchParams_();
36 void setupListUpdate_();
37
38 boost::signals2::scoped_connection recentStoreConnection_;
39 FileNamesStack recentPathsCache_;
40 IOFilters filters_;
41 std::shared_ptr<OpenDirectoryMenuItem> openDirectoryItem_;
42};
43
44#if !defined( MESHLIB_NO_VOXELS ) && !defined( MRVOXELS_NO_DICOM )
46{
47public:
49 virtual bool action() override;
50};
51#endif
52
54{
55public:
57 virtual bool action() override;
58 virtual std::string isAvailable( const std::vector<std::shared_ptr<const Object>>&objs ) const override;
59};
60
62{
63public:
65 virtual bool action() override;
66};
67
69{
70public:
71 SaveSceneAsMenuItem( const std::string& pluginName = "Save Scene As" );
72 virtual bool action() override;
73 virtual std::string isAvailable( const std::vector<std::shared_ptr<const Object>>& ) const override;
74
75protected:
76 void saveScene_( const std::filesystem::path& savePath );
77};
78
80{
81public:
83 virtual bool action() override;
84};
85
87{
88public:
90 virtual void drawDialog( float menuScaling, ImGuiContext* ) override;
91 virtual bool blocking() const override { return false; }
92private:
93 Vector2i resolution_;
94 bool transparentBg_{ true };
95};
96
98{
99public:
101 virtual bool action() override;
102};
103
105{
106public:
108 virtual bool action() override;
109 virtual std::string isAvailable( const std::vector<std::shared_ptr<const Object>>& ) const override;
110};
111
112}
Definition MRIOFilesMenuItems.h:87
virtual bool blocking() const override
Definition MRIOFilesMenuItems.h:91
virtual void drawDialog(float menuScaling, ImGuiContext *) override
Definition MRIOFilesMenuItems.h:105
virtual std::string isAvailable(const std::vector< std::shared_ptr< const Object > > &) const override
Definition MRIOFilesMenuItems.h:98
virtual bool action() override
Definition MRIOFilesMenuItems.h:46
virtual bool action() override
Definition MRIOFilesMenuItems.h:17
std::string isAvailable(const std::vector< std::shared_ptr< const Object > > &) const override
bool action() override
void openDirectory(const std::filesystem::path &directory) const
Definition MRIOFilesMenuItems.h:26
virtual const DropItemsList & dropItems() const override
virtual bool action() override
Definition MRRibbonMenuItem.h:20
std::vector< std::shared_ptr< RibbonMenuItem > > DropItemsList
Definition MRRibbonMenuItem.h:47
Definition MRIOFilesMenuItems.h:54
virtual bool action() override
virtual std::string isAvailable(const std::vector< std::shared_ptr< const Object > > &objs) const override
Definition MRIOFilesMenuItems.h:69
SaveSceneAsMenuItem(const std::string &pluginName="Save Scene As")
virtual std::string isAvailable(const std::vector< std::shared_ptr< const Object > > &) const override
virtual bool action() override
void saveScene_(const std::filesystem::path &savePath)
Definition MRIOFilesMenuItems.h:80
virtual bool action() override
Definition MRIOFilesMenuItems.h:62
virtual bool action() override
Definition MRSceneStateCheck.h:140
Definition MRViewerFwd.h:60
std::vector< IOFilter > IOFilters
Definition MRIOFilters.h:32
Definition MRCameraOrientationPlugin.h:8
std::vector< std::filesystem::path > FileNamesStack
Definition MRIOFilesMenuItems.h:14
Definition MRViewerEventsListener.h:29