17 #ifndef DISTRHO_UI_HPP_INCLUDED
18 #define DISTRHO_UI_HPP_INCLUDED
20 #include "extra/d_leakdetector.hpp"
21 #include "src/DistrhoPluginChecks.h"
23 #if DISTRHO_UI_USE_NANOVG
24 # include "../dgl/NanoVG.hpp"
25 typedef DGL::NanoWidget UIWidget;
27 # include "../dgl/Widget.hpp"
28 typedef DGL::Widget UIWidget;
31 START_NAMESPACE_DISTRHO
43 class UI :
public UIWidget
50 UI(uint width = 0, uint height = 0);
76 #if DISTRHO_PLUGIN_WANT_STATE
80 void d_setState(
const char*
const key,
const char*
const value);
83 #if DISTRHO_PLUGIN_IS_SYNTH
87 void d_sendNote(
const uint8_t channel,
const uint8_t note,
const uint8_t velocity);
90 #if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
110 #if DISTRHO_PLUGIN_WANT_PROGRAMS
118 #if DISTRHO_PLUGIN_WANT_STATE
123 virtual void d_stateChanged(
const char* key,
const char* value) = 0;
164 void onResize(
const ResizeEvent& ev)
override;
170 PrivateData*
const pData;
171 friend class UIExporter;
172 friend class UIExporterWindow;
175 void setAbsoluteX(
int) const noexcept {}
176 void setAbsoluteY(
int) const noexcept {}
177 void setAbsolutePos(
int,
int) const noexcept {}
178 void setAbsolutePos(
const DGL::Point<int>&) const noexcept {}
179 void setNeedsFullViewport(
bool) const noexcept {}
181 DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(
UI)
190 extern UI* createUI();
194 END_NAMESPACE_DISTRHO
196 #endif // DISTRHO_UI_HPP_INCLUDED
virtual void d_sampleRateChanged(double newSampleRate)
void onResize(const ResizeEvent &ev) override
virtual void d_stateChanged(const char *key, const char *value)=0
void * d_getPluginInstancePointer() const noexcept
virtual void d_parameterChanged(uint32_t index, float value)=0
virtual void d_uiFileBrowserSelected(const char *filename)
void d_setState(const char *const key, const char *const value)
virtual void d_programChanged(uint32_t index)=0
UI(uint width=0, uint height=0)
virtual void d_uiIdle()
Definition: DistrhoUI.hpp:141
void d_sendNote(const uint8_t channel, const uint8_t note, const uint8_t velocity)
void d_editParameter(const uint32_t index, const bool started)
Definition: DistrhoUI.hpp:43
double d_getSampleRate() const noexcept
void d_setParameterValue(const uint32_t index, const float value)
virtual void d_uiReshape(uint width, uint height)