From 40944574c620868b43872f64600a8a42d382a6a1 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 4 May 2013 22:02:05 -0400 Subject: the big rework of window management. probably not complete at thsi point, but this is mostly functional --- gtk2_ardour/processor_box.h | 48 +++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 21 deletions(-) (limited to 'gtk2_ardour/processor_box.h') diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h index 157cdbf27e..44d6a0ab6a 100644 --- a/gtk2_ardour/processor_box.h +++ b/gtk2_ardour/processor_box.h @@ -53,8 +53,8 @@ #include "io_selector.h" #include "send_ui.h" #include "enums.h" -#include "window_proxy.h" #include "ardour_button.h" +#include "window_manager.h" class MotionController; class PluginSelector; @@ -75,28 +75,26 @@ namespace ARDOUR { class ProcessorBox; -/** A WindowProxy for Processor UI windows; it knows how to ask a ProcessorBox - * to create a UI window for a particular processor. - */ -class ProcessorWindowProxy : public WindowProxy +class ProcessorWindowProxy : public WindowManager::ProxyBase { -public: - ProcessorWindowProxy (std::string const &, XMLNode const *, ProcessorBox *, boost::weak_ptr); + public: + ProcessorWindowProxy (std::string const &, ProcessorBox *, boost::weak_ptr); - void show (); - bool rc_configured () const { - return false; - } + Gtk::Window* get (bool create = false); + + boost::weak_ptr processor () const { + return _processor; + } - boost::weak_ptr processor () const { - return _processor; - } + ARDOUR::SessionHandlePtr* session_handle(); + void toggle(); - bool marked; + bool marked; -private: - ProcessorBox* _processor_box; - boost::weak_ptr _processor; + private: + ProcessorBox* _processor_box; + boost::weak_ptr _processor; + bool is_custom; }; class ProcessorEntry : public Gtkmm2ext::DnDVBoxChild, public sigc::trackable @@ -255,9 +253,15 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD void hide_things (); + /* Everything except a WindowProxy object should use this to get the window */ Gtk::Window* get_processor_ui (boost::shared_ptr) const; - void toggle_edit_processor (boost::shared_ptr); - void toggle_edit_generic_processor (boost::shared_ptr); + + /* a WindowProxy object can use this */ + Gtk::Window* get_editor_window (boost::shared_ptr); + Gtk::Window* get_generic_editor_window (boost::shared_ptr); + + void edit_processor (boost::shared_ptr); + void generic_edit_processor (boost::shared_ptr); void update_gui_object_state (ProcessorEntry *); @@ -393,7 +397,9 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD void route_property_changed (const PBD::PropertyChange&); std::string generate_processor_title (boost::shared_ptr pi); - std::list _processor_window_proxies; + std::list _processor_window_info; + ProcessorWindowProxy* find_window_proxy (boost::shared_ptr) const; + void set_processor_ui (boost::shared_ptr, Gtk::Window *); void maybe_add_processor_to_ui_list (boost::weak_ptr); -- cgit v1.2.3