From 057ef1d83ba263fb2adf1aa86f8e281ab0065c43 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 8 Apr 2016 00:15:32 +0200 Subject: Refactoring to finally get rid of MessageHandler/Receiver in favor of the new Settings mechanism. --- plugingui/plugingui.h | 36 +++++++----------------------------- 1 file changed, 7 insertions(+), 29 deletions(-) (limited to 'plugingui/plugingui.h') 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 +#include + #include "dgwindow.h" #include "eventhandler.h" - #include "pluginconfig.h" -#include - -#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 enable_velocity_modifier_notifier; - Notifier velocity_modifier_falloff_notifier; - Notifier velocity_modifier_weight_notifier; - - Notifier enable_velocity_randomiser_notifier; - Notifier velocity_randomiser_weight_notifier; - - Notifier samplerate_notifier; - - Notifier enable_resampling_notifier; - - Notifier drumkit_file_progress_notifier; - //Notifier 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:: -- cgit v1.2.3