diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-11-08 19:15:28 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-11-08 19:15:28 +0000 |
commit | b5f7ae45bda38031f354ea1643ebc1cc22018907 (patch) | |
tree | 58ef43d8048cb3c5dbb5305b4d056cd06249c891 /libs/ardour/ardour/plugin_manager.h | |
parent | d7faaf7b028d7e0a56b8cefb90210f7e7505e6f0 (diff) |
plugin menu/manager patch from J. Abelardo Gutierrez
git-svn-id: svn://localhost/ardour2/branches/3.0@6038 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/plugin_manager.h')
-rw-r--r-- | libs/ardour/ardour/plugin_manager.h | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/libs/ardour/ardour/plugin_manager.h b/libs/ardour/ardour/plugin_manager.h index d564d62a87..779e26e915 100644 --- a/libs/ardour/ardour/plugin_manager.h +++ b/libs/ardour/ardour/plugin_manager.h @@ -58,30 +58,36 @@ class PluginManager : public boost::noncopyable { static PluginManager* the_manager() { return _manager; } - void load_favorites (); - void save_favorites (); - void add_favorite (ARDOUR::PluginType type, std::string unique_id); - void remove_favorite (ARDOUR::PluginType type, std::string unique_id); - bool is_a_favorite_plugin (const PluginInfoPtr&); + enum PluginStatusType { + Normal = 0, + Favorite, + Hidden + }; + + void load_statuses (); + void save_statuses (); + void set_status (ARDOUR::PluginType type, std::string unique_id, PluginStatusType status); + PluginStatusType get_status (const PluginInfoPtr&); private: - struct FavoritePlugin { - ARDOUR::PluginType type; - std::string unique_id; + struct PluginStatus { + ARDOUR::PluginType type; + std::string unique_id; + PluginStatusType status; - FavoritePlugin (ARDOUR::PluginType t, std::string id) - : type (t), unique_id (id) {} + PluginStatus (ARDOUR::PluginType t, std::string id, PluginStatusType s = Normal) + : type (t), unique_id (id), status (s) {} - bool operator==(const FavoritePlugin& other) const { - return other.type == type && other.unique_id == unique_id; - } + bool operator==(const PluginStatus& other) const { + return other.type == type && other.unique_id == unique_id; + } - bool operator<(const FavoritePlugin& other) const { - return other.type < type || other.unique_id < unique_id; - } + bool operator<(const PluginStatus& other) const { + return other.type < type || other.unique_id < unique_id; + } }; - typedef std::set<FavoritePlugin> FavoritePluginList; - FavoritePluginList favorites; + typedef std::set<PluginStatus> PluginStatusList; + PluginStatusList statuses; ARDOUR::PluginInfoList _empty_plugin_info; ARDOUR::PluginInfoList* _vst_plugin_info; |