diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-04-08 00:15:32 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-04-08 00:15:32 +0200 |
commit | 057ef1d83ba263fb2adf1aa86f8e281ab0065c43 (patch) | |
tree | 31c1f237e3a9df9fc241d87527f7dd4245665d43 /plugingui/plugingui.h | |
parent | b530ac02af61e320e137a392decef1b3cc5af2c4 (diff) |
Refactoring to finally get rid of MessageHandler/Receiver in favor of the new Settings mechanism.
Diffstat (limited to 'plugingui/plugingui.h')
-rw-r--r-- | plugingui/plugingui.h | 36 |
1 files changed, 7 insertions, 29 deletions
diff --git a/plugingui/plugingui.h b/plugingui/plugingui.h index ca31c41..04b0a29 100644 --- a/plugingui/plugingui.h +++ b/plugingui/plugingui.h @@ -26,24 +26,20 @@ */ #pragma once +#include <settings.h> +#include <notifier.h> + #include "dgwindow.h" #include "eventhandler.h" - #include "pluginconfig.h" -#include <settings.h> - -#include "messagereceiver.h" -#include "notifier.h" - namespace GUI { class PluginGUI - : public MessageReceiver - , public Listener + : public Listener { public: - PluginGUI(void* native_window = nullptr); + PluginGUI(Settings& settings, void* native_window = nullptr); virtual ~PluginGUI(); //! Process all events and messages in queue @@ -56,9 +52,6 @@ public: void show(); void hide(); - - void handleMessage(Message* msg); - DGWindow* window{nullptr}; EventHandler* eventhandler{nullptr}; @@ -66,21 +59,6 @@ public: Notifier<> closeNotifier; - // Setting notifiers: - Notifier<bool> enable_velocity_modifier_notifier; - Notifier<float> velocity_modifier_falloff_notifier; - Notifier<float> velocity_modifier_weight_notifier; - - Notifier<bool> enable_velocity_randomiser_notifier; - Notifier<float> velocity_randomiser_weight_notifier; - - Notifier<double> samplerate_notifier; - - Notifier<bool> enable_resampling_notifier; - - Notifier<float> drumkit_file_progress_notifier; - //Notifier<std::string> current_file_notifier; - // Support old interface a little while longer.. void setWindowClosedCallback(void (*handler)(void*), void* ptr); @@ -97,8 +75,8 @@ private: void (*windowClosedHandler)(void *){nullptr}; void *windowClosedPtr{nullptr}; - Settings settings; - SettingsGetter getter{settings}; + Settings& settings; + SettingsNotifier settings_notifier{settings}; }; } // GUI:: |