diff options
author | Carl Hetherington <carl@carlh.net> | 2010-08-18 02:20:15 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-08-18 02:20:15 +0000 |
commit | 579fcb70e2b3b0a1ef2af9fc88edebff6d7e6dd3 (patch) | |
tree | b03f1c1b9a12e5e76aaf23b8ed6ad04cf663633f /gtk2_ardour/processor_box.h | |
parent | 8d8bc9baca511399f89c0f4b0657b2d2f957824c (diff) |
First go at saving window visibility and position state across saves.
git-svn-id: svn://localhost/ardour2/branches/3.0@7644 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/processor_box.h')
-rw-r--r-- | gtk2_ardour/processor_box.h | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h index 1e4257d22b..9273a75052 100644 --- a/gtk2_ardour/processor_box.h +++ b/gtk2_ardour/processor_box.h @@ -52,6 +52,7 @@ #include "io_selector.h" #include "send_ui.h" #include "enums.h" +#include "window_proxy.h" class MotionController; class PluginSelector; @@ -71,6 +72,29 @@ namespace ARDOUR { class Session; } +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<Gtk::Window> +{ +public: + ProcessorWindowProxy (std::string const &, XMLNode const *, ProcessorBox *, boost::weak_ptr<ARDOUR::Processor>); + + void show (); + + boost::weak_ptr<ARDOUR::Processor> processor () const { + return _processor; + } + + bool marked; + +private: + ProcessorBox* _processor_box; + boost::weak_ptr<ARDOUR::Processor> _processor; +}; + class ProcessorEntry : public Gtkmm2ext::DnDVBoxChild, public sigc::trackable { public: @@ -145,12 +169,19 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD void select_all_inserts (); void select_all_sends (); + Gtk::Window* get_processor_ui (boost::shared_ptr<ARDOUR::Processor>) const; + void edit_processor (boost::shared_ptr<ARDOUR::Processor>); + sigc::signal<void,boost::shared_ptr<ARDOUR::Processor> > ProcessorSelected; sigc::signal<void,boost::shared_ptr<ARDOUR::Processor> > ProcessorUnselected; static void register_actions(); private: + + /* prevent copy construction */ + ProcessorBox (ProcessorBox const &); + boost::shared_ptr<ARDOUR::Route> _route; MixerStrip* _parent_strip; // null if in RouteParamsUI bool _owner_is_mixer; @@ -212,8 +243,6 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD void reordered (); void route_processors_changed (ARDOUR::RouteProcessorChange); - void remove_processor_gui (boost::shared_ptr<ARDOUR::Processor>); - void processors_reordered (const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator&, int*); void compute_processor_sort_keys (); @@ -249,7 +278,6 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD void activate_processor (boost::shared_ptr<ARDOUR::Processor>); void deactivate_processor (boost::shared_ptr<ARDOUR::Processor>); - void edit_processor (boost::shared_ptr<ARDOUR::Processor>); void hide_processor_editor (boost::shared_ptr<ARDOUR::Processor>); void rename_processor (boost::shared_ptr<ARDOUR::Processor>); @@ -281,6 +309,10 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD void route_property_changed (const PBD::PropertyChange&); std::string generate_processor_title (boost::shared_ptr<ARDOUR::PluginInsert> pi); + + std::list<ProcessorWindowProxy*> _processor_window_proxies; + void set_processor_ui (boost::shared_ptr<ARDOUR::Processor>, Gtk::Window *); + void maybe_add_processor_to_ui_list (boost::weak_ptr<ARDOUR::Processor>); }; #endif /* __ardour_gtk_processor_box__ */ |