@@ -60,6 +60,7 @@ all: $(STATIC) | |||||
clean: | clean: | ||||
rm -f $(OBJS) $(SHARED) $(STATIC) | rm -f $(OBJS) $(SHARED) $(STATIC) | ||||
rm -f moc_*.cpp | |||||
debug: | debug: | ||||
$(MAKE) DEBUG=true | $(MAKE) DEBUG=true | ||||
@@ -89,7 +90,7 @@ distrho-3bandsplitter.cpp.o: distrho-3bandsplitter.cpp | |||||
distrho-pingpongpan.cpp.o: distrho-pingpongpan.cpp | distrho-pingpongpan.cpp.o: distrho-pingpongpan.cpp | ||||
$(CXX) $< $(BUILD_CXX_FLAGS) -Ipingpongpan -DDISTRHO_NAMESPACE=DISTRHO_PingPongPan -c -o $@ | $(CXX) $< $(BUILD_CXX_FLAGS) -Ipingpongpan -DDISTRHO_NAMESPACE=DISTRHO_PingPongPan -c -o $@ | ||||
distrho-notes.cpp.o: distrho-notes.cpp | |||||
distrho-notes.cpp.o: distrho-notes.cpp moc_DistrhoUINotes.cpp moc_ParamProgressBar.cpp | |||||
$(CXX) $< $(BUILD_CXX_FLAGS) -Inotes -DDISTRHO_NAMESPACE=DISTRHO_Notes -c -o $@ | $(CXX) $< $(BUILD_CXX_FLAGS) -Inotes -DDISTRHO_NAMESPACE=DISTRHO_Notes -c -o $@ | ||||
zynaddsubfx.cpp.o: zynaddsubfx.cpp | zynaddsubfx.cpp.o: zynaddsubfx.cpp | ||||
@@ -100,5 +101,8 @@ zynaddsubfx-src.cpp.o: zynaddsubfx-src.cpp | |||||
# -------------------------------------------------------------- | # -------------------------------------------------------------- | ||||
moc_%.cpp: %.hpp | |||||
moc_DistrhoUINotes.cpp: notes/DistrhoUINotes.hpp | |||||
$(MOC) $< -o $@ | |||||
moc_ParamProgressBar.cpp: notes/ParamProgressBar.hpp | |||||
$(MOC) $< -o $@ | $(MOC) $< -o $@ |
@@ -21,11 +21,17 @@ | |||||
#include "notes/DistrhoPluginNotes.cpp" | #include "notes/DistrhoPluginNotes.cpp" | ||||
#include "notes/DistrhoUINotes.cpp" | #include "notes/DistrhoUINotes.cpp" | ||||
// FIXME - link to widgets | |||||
#include "notes/ParamProgressBar.cpp" | |||||
#include "moc_ParamProgressBar.cpp" | |||||
// Carla DISTRHO Plugin | // Carla DISTRHO Plugin | ||||
#include "distrho/DistrhoPluginCarla.cpp" | #include "distrho/DistrhoPluginCarla.cpp" | ||||
START_NAMESPACE_DISTRHO | START_NAMESPACE_DISTRHO | ||||
#include "moc_DistrhoUINotes.cpp" | |||||
// ----------------------------------------------------------------------- | // ----------------------------------------------------------------------- | ||||
static const PluginDescriptor notesDesc = { | static const PluginDescriptor notesDesc = { | ||||
@@ -15,7 +15,7 @@ | |||||
* For a full copy of the GNU General Public License see the COPYING file | * For a full copy of the GNU General Public License see the COPYING file | ||||
*/ | */ | ||||
#include "ParamProgressBar.h" | |||||
#include "ParamProgressBar.hpp" | |||||
#include <QtGui/QMouseEvent> | #include <QtGui/QMouseEvent> | ||||
@@ -104,6 +104,7 @@ public: | |||||
fHandle2(nullptr), | fHandle2(nullptr), | ||||
fDescriptor(nullptr), | fDescriptor(nullptr), | ||||
fIsProcessing(false), | fIsProcessing(false), | ||||
fIsUiVisible(false), | |||||
fAudioInBuffers(nullptr), | fAudioInBuffers(nullptr), | ||||
fAudioOutBuffers(nullptr), | fAudioOutBuffers(nullptr), | ||||
fMidiEventCount(0) | fMidiEventCount(0) | ||||
@@ -128,6 +129,9 @@ public: | |||||
if (fDescriptor != nullptr) | if (fDescriptor != nullptr) | ||||
{ | { | ||||
if (fIsUiVisible) | |||||
fDescriptor->ui_show(fHandle, false); | |||||
if (fDescriptor->deactivate != nullptr && kData->activeBefore) | if (fDescriptor->deactivate != nullptr && kData->activeBefore) | ||||
{ | { | ||||
if (fHandle != nullptr) | if (fHandle != nullptr) | ||||
@@ -487,6 +491,8 @@ public: | |||||
else if (fDescriptor->ui_show != nullptr) | else if (fDescriptor->ui_show != nullptr) | ||||
fDescriptor->ui_show(fHandle, yesNo); | fDescriptor->ui_show(fHandle, yesNo); | ||||
} | } | ||||
fIsUiVisible = yesNo; | |||||
} | } | ||||
void idleGui() | void idleGui() | ||||
@@ -494,7 +500,7 @@ public: | |||||
CARLA_ASSERT(fDescriptor != nullptr); | CARLA_ASSERT(fDescriptor != nullptr); | ||||
CARLA_ASSERT(fHandle != nullptr); | CARLA_ASSERT(fHandle != nullptr); | ||||
if (fDescriptor != nullptr && fHandle != nullptr && fDescriptor->ui_idle != nullptr) | |||||
if (fIsUiVisible) | |||||
fDescriptor->ui_idle(fHandle); | fDescriptor->ui_idle(fHandle); | ||||
} | } | ||||
@@ -1641,6 +1647,7 @@ protected: | |||||
void handleUiClosed() | void handleUiClosed() | ||||
{ | { | ||||
kData->engine->callback(CALLBACK_SHOW_GUI, fId, 0, 0, 0.0f, nullptr); | kData->engine->callback(CALLBACK_SHOW_GUI, fId, 0, 0, 0.0f, nullptr); | ||||
fIsUiVisible = false; | |||||
} | } | ||||
public: | public: | ||||
@@ -1750,6 +1757,7 @@ private: | |||||
const PluginDescriptor* fDescriptor; | const PluginDescriptor* fDescriptor; | ||||
bool fIsProcessing; | bool fIsProcessing; | ||||
bool fIsUiVisible; | |||||
float** fAudioInBuffers; | float** fAudioInBuffers; | ||||
float** fAudioOutBuffers; | float** fAudioOutBuffers; | ||||