Public Member Functions | Protected Member Functions | List of all members
LV2::Presets< Required >::I< Derived > Struct Template Reference

#include <lv2gui.hpp>

Inherits LV2::Extension< Required >.

Public Member Functions

void preset_added (uint32_t number, char const *name)
void preset_removed (uint32_t number)
void presets_cleared ()
void current_preset_changed (uint32_t number)

Protected Member Functions

void change_preset (uint32_t preset)
void save_preset (uint32_t preset, char const *name)
bool host_supports_presets () const

Detailed Description

template<bool Required = true>
template<class Derived>
struct LV2::Presets< Required >::I< Derived >

This is the type that your plugin or GUI class will inherit when you use the Presets mixin. The public and protected members defined here will be available in your plugin class.

Member Function Documentation

template<bool Required = true>
template<class Derived>
void LV2::Presets< Required >::I< Derived >::change_preset ( uint32_t  preset)
inlineprotected

You can call this to request that the host changes the current preset to preset.

template<bool Required = true>
template<class Derived>
void LV2::Presets< Required >::I< Derived >::current_preset_changed ( uint32_t  number)
inline

This is called by the host to let the GUI know that the current preset has changed. If the number is equal to LV2_UI_PRESETS_NOPRESET there is no current preset.

Parameters
numberThe number of the active preset, or LV2_UI_PRESETS_NOPRESET if there is no active preset.
template<bool Required = true>
template<class Derived>
bool LV2::Presets< Required >::I< Derived >::host_supports_presets ( ) const
inlineprotected

Returns true if the host supports the Preset feature, false if it does not.

template<bool Required = true>
template<class Derived>
void LV2::Presets< Required >::I< Derived >::preset_added ( uint32_t  number,
char const *  name 
)
inline

This is called by the host to let the GUI know that a new preset has been added or renamed.

Parameters
numberThe number of the added preset.
nameThe name of the added preset.
template<bool Required = true>
template<class Derived>
void LV2::Presets< Required >::I< Derived >::preset_removed ( uint32_t  number)
inline

This is called by the host to let the GUI know that a previously existing preset has been removed.

Parameters
numberThe number of the removed preset.
template<bool Required = true>
template<class Derived>
void LV2::Presets< Required >::I< Derived >::presets_cleared ( )
inline

This is called by the host to let the GUI know that all previously existing presets have been removed.

template<bool Required = true>
template<class Derived>
void LV2::Presets< Required >::I< Derived >::save_preset ( uint32_t  preset,
char const *  name 
)
inlineprotected

You can call this to request that the host saves the current state of the plugin instance to a preset with the given number and name.


The documentation for this struct was generated from the following file: