LMMS
Loading...
Searching...
No Matches
Steinberg::Vst::IProgress Class Referenceabstract

#include <ivsteditcontroller.h>

Inheritance diagram for Steinberg::Vst::IProgress:
Steinberg::FUnknown

Public Types

enum  ProgressType : uint32 { AsyncStateRestoration = 0 , UIBackgroundTask }
using ID = uint64

Public Member Functions

virtual tresult PLUGIN_API start (ProgressType type, const tchar *optionalDescription, ID &outID)=0
virtual tresult PLUGIN_API update (ID id, ParamValue normValue)=0
virtual tresult PLUGIN_API finish (ID id)=0
Public Member Functions inherited from Steinberg::FUnknown
virtual tresult PLUGIN_API queryInterface (const TUID _iid, void **obj)=0
virtual uint32 PLUGIN_API addRef ()=0
virtual uint32 PLUGIN_API release ()=0

Static Public Attributes

static const FUID iid
Static Public Attributes inherited from Steinberg::FUnknown
static const FUID iid

Detailed Description

Extended host callback interface for an edit controller: Vst::IProgress

Allows the plug-in to request the host to create a progress for some specific tasks which take some time. The host can visualize the progress as read-only UI elements. For example, after loading a project where a plug-in needs to load extra data (e.g. samples) in a background thread, this enables the host to get and visualize the current status of the loading progress and to inform the user when the loading is finished. Note: During the progress, the host can unload the plug-in at any time. Make sure that the plug-in supports this use case.

Example

//--------------------------------------
// we are in the editcontroller:
// as member: IProgress::ID mProgressID;
FUnknownPtr<IProgress> progress (componentHandler);
if (progress)
progress->start (IProgress::ProgressType::UIBackgroundTask, STR ("Load Samples..."), mProgressID);
// ...
myProgressValue += incProgressStep;
FUnknownPtr<IProgress> progress (componentHandler);
if (progress)
progress->update (mProgressID, myProgressValue);
// ...
FUnknownPtr<IProgress> progress (componentHandler);
if (progress)
progress->finish (mProgressID);
Definition funknown.h:403
@ UIBackgroundTask
a plug-in task triggered by a UI action
Definition ivsteditcontroller.h:361
#define STR(x)
Definition fstrdefs.h:39
See also
IComponentHandler

Member Typedef Documentation

◆ ID

Member Enumeration Documentation

◆ ProgressType

Enumerator
AsyncStateRestoration 

plug-in state is restored async (in a background Thread)

UIBackgroundTask 

a plug-in task triggered by a UI action

Member Function Documentation

◆ finish()

virtual tresult PLUGIN_API Steinberg::Vst::IProgress::finish ( ID id)
pure virtual

Finish the progress associated to the given id

◆ start()

virtual tresult PLUGIN_API Steinberg::Vst::IProgress::start ( ProgressType type,
const tchar * optionalDescription,
ID & outID )
pure virtual

Start a new progress of a given type and optional Description. outID is as ID created by the host to identify this newly created progress (for update and finish method)

◆ update()

virtual tresult PLUGIN_API Steinberg::Vst::IProgress::update ( ID id,
ParamValue normValue )
pure virtual

Update the progress value (normValue between [0, 1]) associated to the given id

Member Data Documentation

◆ iid

const FUID Steinberg::Vst::IProgress::iid
static

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