DISTRHO Plugin Framework
 All Classes Functions Variables Modules Pages
Public Member Functions | Protected Member Functions | Friends | List of all members
UI Class Referenceabstract

#include <DistrhoUI.hpp>

Inheritance diagram for UI:

Public Member Functions

 UI (uint width=0, uint height=0)
 
virtual ~UI ()
 
double d_getSampleRate () const noexcept
 
void d_editParameter (const uint32_t index, const bool started)
 
void d_setParameterValue (const uint32_t index, const float value)
 
void d_setState (const char *const key, const char *const value)
 
void d_sendNote (const uint8_t channel, const uint8_t note, const uint8_t velocity)
 
void * d_getPluginInstancePointer () const noexcept
 

Protected Member Functions

virtual void d_parameterChanged (uint32_t index, float value)=0
 
virtual void d_programChanged (uint32_t index)=0
 
virtual void d_stateChanged (const char *key, const char *value)=0
 
virtual void d_sampleRateChanged (double newSampleRate)
 
virtual void d_uiIdle ()
 
virtual void d_uiFileBrowserSelected (const char *filename)
 
virtual void d_uiReshape (uint width, uint height)
 
void onResize (const ResizeEvent &ev) override
 

Friends

class UIExporter
 
class UIExporterWindow
 

Detailed Description

DPF UI class from where UI instances are created.

TODO.

must call setSize during construction,

Constructor & Destructor Documentation

UI::UI ( uint  width = 0,
uint  height = 0 
)

UI class constructor. The UI should be initialized to a default state that matches the plugin side.

virtual UI::~UI ( )
virtual

Destructor.

Member Function Documentation

double UI::d_getSampleRate ( ) const
noexcept

Get the current sample rate used in plugin processing.

See also
d_sampleRateChanged(double)
void UI::d_editParameter ( const uint32_t  index,
const bool  started 
)

TODO: Document this.

void UI::d_setParameterValue ( const uint32_t  index,
const float  value 
)

TODO: Document this.

void UI::d_setState ( const char *const  key,
const char *const  value 
)

TODO: Document this.

void UI::d_sendNote ( const uint8_t  channel,
const uint8_t  note,
const uint8_t  velocity 
)

TODO: Document this.

void* UI::d_getPluginInstancePointer ( ) const
noexcept

TODO: Document this.

virtual void UI::d_parameterChanged ( uint32_t  index,
float  value 
)
protectedpure virtual

A parameter has changed on the plugin side. This is called by the host to inform the UI about parameter changes.

virtual void UI::d_programChanged ( uint32_t  index)
protectedpure virtual

The current program has changed on the plugin side. This is called by the host to inform the UI about program changes.

virtual void UI::d_stateChanged ( const char *  key,
const char *  value 
)
protectedpure virtual

A state has changed on the plugin side. This is called by the host to inform the UI about state changes.

virtual void UI::d_sampleRateChanged ( double  newSampleRate)
protectedvirtual

Optional callback to inform the UI about a sample rate change on the plugin side.

See also
d_getSampleRate()
virtual void UI::d_uiIdle ( )
inlineprotectedvirtual

TODO: Document this.

virtual void UI::d_uiFileBrowserSelected ( const char *  filename)
protectedvirtual

File browser selected function.

See also
Window::fileBrowserSelected(const char*)
virtual void UI::d_uiReshape ( uint  width,
uint  height 
)
protectedvirtual

OpenGL window reshape function, called when parent window is resized. You can reimplement this function for a custom OpenGL state.

See also
Window::onReshape(uint,uint)
void UI::onResize ( const ResizeEvent &  ev)
overrideprotected

OpenGL widget resize function, called when the widget is resized. This is overriden here so the host knows when the UI is resized by you.

See also
Widget::onResize(const ResizeEvent&)

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