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 getSampleRate () const noexcept
 
void editParameter (const uint32_t index, const bool started)
 
void setParameterValue (const uint32_t index, const float value)
 
void setState (const char *const key, const char *const value)
 
void sendNote (const uint8_t channel, const uint8_t note, const uint8_t velocity)
 
void * getPluginInstancePointer () const noexcept
 

Protected Member Functions

virtual void parameterChanged (uint32_t index, float value)=0
 
virtual void programChanged (uint32_t index)=0
 
virtual void stateChanged (const char *key, const char *value)=0
 
virtual void sampleRateChanged (double newSampleRate)
 
virtual void uiIdle ()
 
virtual void uiFileBrowserSelected (const char *filename)
 
virtual void 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::getSampleRate ( ) const
noexcept

Get the current sample rate used in plugin processing.

See also
sampleRateChanged(double)
void UI::editParameter ( const uint32_t  index,
const bool  started 
)

TODO: Document this.

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

TODO: Document this.

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

TODO: Document this.

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

TODO: Document this.

void* UI::getPluginInstancePointer ( ) const
noexcept

TODO: Document this.

virtual void UI::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::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::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::sampleRateChanged ( double  newSampleRate)
protectedvirtual

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

See also
getSampleRate()
virtual void UI::uiIdle ( )
inlineprotectedvirtual

TODO: Document this.

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

File browser selected function.

See also
Window::fileBrowserSelected(const char*)
virtual void UI::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: