Interface IPresetProvider
- Namespace
- PluginUI
- Assembly
- PluginUI.dll
Source of presets for a PresetBar: implement it over the plug-in's preset storage (factory presets, a user folder, a VST3 program list...).
public interface IPresetProvider
Properties
CanSave
true if Save(string) is supported.
bool CanSave { get; }
Property Value
Count
Number of presets.
int Count { get; }
Property Value
CurrentIndex
Index of the loaded preset (−1 = none).
int CurrentIndex { get; }
Property Value
IsModified
true if parameters changed since the preset was loaded.
bool IsModified { get; }
Property Value
Methods
CanDelete(int)
true if the preset can be deleted (user presets).
bool CanDelete(int index)
Parameters
indexint
Returns
Delete(int)
Deletes a preset.
void Delete(int index)
Parameters
indexint
GetBank(int)
Bank / category of a preset (null = no grouping).
string? GetBank(int index)
Parameters
indexint
Returns
GetName(int)
Name of a preset.
string GetName(int index)
Parameters
indexint
Returns
Load(int)
Loads a preset.
void Load(int index)
Parameters
indexint
Save(string)
Saves the current state under name (overwrites a preset with the same name); returns its index.
int Save(string name)
Parameters
namestring
Returns
Events
Changed
Raised when the list, the current index or the modified flag changes.
event Action<IPresetProvider>? Changed