gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
Log | Files | Refs | Submodules | README | LICENSE

datasourcetreeitem.h (1199B)


      1 #pragma once
      2 
      3 #include "treeitem.h"
      4 
      5 #include "jucePluginLib/patchdb/datasource.h"
      6 
      7 namespace pluginLib::patchDB
      8 {
      9 	struct DataSource;
     10 }
     11 
     12 namespace jucePluginEditorLib::patchManager
     13 {
     14 	class DatasourceTreeItem : public TreeItem
     15 	{
     16 	public:
     17 		DatasourceTreeItem(PatchManager& _pm, const pluginLib::patchDB::DataSourceNodePtr& _ds);
     18 
     19 		bool mightContainSubItems() override
     20 		{
     21 			return m_dataSource->type == pluginLib::patchDB::SourceType::Folder;
     22 		}
     23 
     24 		bool isInterestedInPatchList(const ListModel* _list, const std::vector<pluginLib::patchDB::PatchPtr>& _patches) override;
     25 
     26 		bool isInterestedInFileDrag(const juce::StringArray& files) override;
     27 
     28 		void patchesDropped(const std::vector<pluginLib::patchDB::PatchPtr>& _patches, const SavePatchDesc* _savePatchDesc = nullptr) override;
     29 
     30 		void itemClicked(const juce::MouseEvent&) override;
     31 		void refresh();
     32 
     33 		int compareElements(const TreeViewItem* _a, const TreeViewItem* _b) override;
     34 
     35 		bool beginEdit() override;
     36 
     37 		const auto& getDataSource() const { return m_dataSource; }
     38 
     39 		juce::String getTooltip() override;
     40 
     41 		juce::var getDragSourceDescription() override;
     42 	private:
     43 		const pluginLib::patchDB::DataSourceNodePtr m_dataSource;
     44 	};
     45 }