17 #ifndef DISTRHO_UI_HPP_INCLUDED 18 #define DISTRHO_UI_HPP_INCLUDED 20 #include "extra/LeakDetector.hpp" 21 #include "src/DistrhoPluginChecks.h" 24 # include "extra/ExternalWindow.hpp" 25 typedef DISTRHO_NAMESPACE::ExternalWindow UIWidget;
26 #elif DISTRHO_UI_USE_NANOVG 27 # include "../dgl/NanoVG.hpp" 28 typedef DGL_NAMESPACE::NanoWidget UIWidget;
30 # include "../dgl/Widget.hpp" 31 typedef DGL_NAMESPACE::Widget UIWidget;
34 START_NAMESPACE_DISTRHO
50 class UI :
public UIWidget
57 UI(uint width = 0, uint height = 0);
85 #if DISTRHO_PLUGIN_WANT_STATE 90 void setState(
const char* key,
const char* value);
93 #if DISTRHO_PLUGIN_WANT_MIDI_INPUT 99 void sendNote(uint8_t channel, uint8_t note, uint8_t velocity);
102 #if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 113 #if DISTRHO_PLUGIN_HAS_EXTERNAL_UI 124 # if DISTRHO_PLUGIN_HAS_EMBED_UI 144 #if DISTRHO_PLUGIN_WANT_PROGRAMS 152 #if DISTRHO_PLUGIN_WANT_STATE 157 virtual void stateChanged(
const char* key,
const char* value) = 0;
179 #ifndef DGL_FILE_BROWSER_DISABLED 192 virtual void uiReshape(uint width, uint height);
202 void onResize(
const ResizeEvent& ev)
override;
209 PrivateData*
const pData;
210 friend class UIExporter;
211 friend class UIExporterWindow;
215 void setAbsoluteX(
int)
const noexcept {}
216 void setAbsoluteY(
int)
const noexcept {}
217 void setAbsolutePos(
int,
int)
const noexcept {}
218 void setAbsolutePos(
const DGL_NAMESPACE::Point<int>&)
const noexcept {}
221 DISTRHO_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(
UI)
244 END_NAMESPACE_DISTRHO
246 #endif // DISTRHO_UI_HPP_INCLUDED void editParameter(uint32_t index, bool started)
virtual void parameterChanged(uint32_t index, float value)=0
static uintptr_t getNextWindowId() noexcept
void onResize(const ResizeEvent &ev) override
void setParameterValue(uint32_t index, float value)
void * getPluginInstancePointer() const noexcept
virtual void sampleRateChanged(double newSampleRate)
virtual void programLoaded(uint32_t index)=0
void sendNote(uint8_t channel, uint8_t note, uint8_t velocity)
UI(uint width=0, uint height=0)
static const char * getNextBundlePath() noexcept
virtual void stateChanged(const char *key, const char *value)=0
double getSampleRate() const noexcept
void setState(const char *key, const char *value)
virtual void uiFileBrowserSelected(const char *filename)
virtual void uiReshape(uint width, uint height)
Definition: DistrhoUI.hpp:50
virtual void uiIdle()
Definition: DistrhoUI.hpp:177