Table of Contents

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

bool

Count

Number of presets.

int Count { get; }

Property Value

int

CurrentIndex

Index of the loaded preset (−1 = none).

int CurrentIndex { get; }

Property Value

int

IsModified

true if parameters changed since the preset was loaded.

bool IsModified { get; }

Property Value

bool

Methods

CanDelete(int)

true if the preset can be deleted (user presets).

bool CanDelete(int index)

Parameters

index int

Returns

bool

Delete(int)

Deletes a preset.

void Delete(int index)

Parameters

index int

GetBank(int)

Bank / category of a preset (null = no grouping).

string? GetBank(int index)

Parameters

index int

Returns

string

GetName(int)

Name of a preset.

string GetName(int index)

Parameters

index int

Returns

string

Load(int)

Loads a preset.

void Load(int index)

Parameters

index int

Save(string)

Saves the current state under name (overwrites a preset with the same name); returns its index.

int Save(string name)

Parameters

name string

Returns

int

Events

Changed

Raised when the list, the current index or the modified flag changes.

event Action<IPresetProvider>? Changed

Event Type

Action<IPresetProvider>