@@ -140,6 +140,12 @@ protected: | |||||
*/ | */ | ||||
virtual void d_uiIdle() {} | virtual void d_uiIdle() {} | ||||
/** | |||||
File browser selected function. | |||||
@see Window::fileBrowserSelected(const char*) | |||||
*/ | |||||
virtual void d_uiFileBrowserSelected(const char* filename); | |||||
/** | /** | ||||
OpenGL window reshape function, called when parent window is resized. | OpenGL window reshape function, called when parent window is resized. | ||||
You can reimplement this function for a custom OpenGL state. | You can reimplement this function for a custom OpenGL state. | ||||
@@ -90,6 +90,10 @@ void UI::d_sampleRateChanged(double) {} | |||||
/* ------------------------------------------------------------------------------------------------------------ | /* ------------------------------------------------------------------------------------------------------------ | ||||
* UI Callbacks (optional) */ | * UI Callbacks (optional) */ | ||||
void UI::d_uiFileBrowserSelected(const char*) | |||||
{ | |||||
} | |||||
void UI::d_uiReshape(uint width, uint height) | void UI::d_uiReshape(uint width, uint height) | ||||
{ | { | ||||
glEnable(GL_BLEND); | glEnable(GL_BLEND); | ||||
@@ -170,16 +170,23 @@ public: | |||||
} | } | ||||
protected: | protected: | ||||
// custom window reshape | |||||
void onReshape(uint width, uint height) override | void onReshape(uint width, uint height) override | ||||
{ | { | ||||
DISTRHO_SAFE_ASSERT_RETURN(fUI != nullptr,); | DISTRHO_SAFE_ASSERT_RETURN(fUI != nullptr,); | ||||
// custom window reshape | |||||
fUI->d_uiReshape(width, height); | fUI->d_uiReshape(width, height); | ||||
fIsReady = true; | fIsReady = true; | ||||
} | } | ||||
// custom file-browser selected | |||||
void fileBrowserSelected(const char* filename) override | |||||
{ | |||||
DISTRHO_SAFE_ASSERT_RETURN(fUI != nullptr,); | |||||
fUI->d_uiFileBrowserSelected(filename); | |||||
} | |||||
private: | private: | ||||
UI* const fUI; | UI* const fUI; | ||||
bool fIsReady; | bool fIsReady; | ||||