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

tree.h (1178B)


      1 #pragma once
      2 
      3 #include "juce_gui_basics/juce_gui_basics.h"
      4 
      5 #include "types.h"
      6 
      7 namespace pluginLib::patchDB
      8 {
      9 	struct SearchRequest;
     10 	struct DataSource;
     11 	struct Dirty;
     12 }
     13 
     14 namespace jucePluginEditorLib::patchManager
     15 {
     16 	class DatasourceTreeItem;
     17 	class PatchManager;
     18 	class GroupTreeItem;
     19 
     20 	class Tree : public juce::TreeView
     21 	{
     22 	public:
     23 		Tree(PatchManager& _patchManager);
     24 		~Tree() override;
     25 
     26 		void updateDataSources();
     27 		void updateTags(GroupType _type);
     28 		void updateTags(pluginLib::patchDB::TagType _type);
     29 
     30 		virtual void processDirty(const pluginLib::patchDB::Dirty& _dirty);
     31 
     32 		void paint(juce::Graphics& g) override;
     33 
     34 		bool keyPressed(const juce::KeyPress& _key) override;
     35 
     36 		void setFilter(const std::string& _filter);
     37 
     38 		DatasourceTreeItem* getItem(const pluginLib::patchDB::DataSource& _ds);
     39 
     40 		virtual void onParentSearchChanged(const pluginLib::patchDB::SearchRequest& _searchRequest);
     41 
     42 		void addGroup(GroupType _type, const std::string& _name);
     43 
     44 		GroupTreeItem* getItem(GroupType _type);
     45 	protected:
     46 		void addGroup(GroupType _type);
     47 
     48 	private:
     49 		PatchManager& m_patchManager;
     50 		std::map<GroupType, GroupTreeItem*> m_groupItems;
     51 		std::string m_filter;
     52 	};
     53 }