diff options
author | Carl Hetherington <carl@carlh.net> | 2012-01-21 20:32:13 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-01-21 20:32:13 +0000 |
commit | eac552b549126fc69e8a08721c4f46f186d59456 (patch) | |
tree | a47d55eee76ce0bc04e203286f163d81617a6a15 /gtk2_ardour/processor_box.h | |
parent | 4381b590bbc6e5e6c3f8d5b4e8d88d8a085280b1 (diff) |
Allow individual plugin controls to be shown / hidden.
git-svn-id: svn://localhost/ardour2/branches/3.0@11294 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/processor_box.h')
-rw-r--r-- | gtk2_ardour/processor_box.h | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h index 364ab7b116..c4047cdc83 100644 --- a/gtk2_ardour/processor_box.h +++ b/gtk2_ardour/processor_box.h @@ -101,7 +101,7 @@ private: class ProcessorEntry : public Gtkmm2ext::DnDVBoxChild, public sigc::trackable { public: - ProcessorEntry (boost::shared_ptr<ARDOUR::Processor>, Width); + ProcessorEntry (ProcessorBox *, boost::shared_ptr<ARDOUR::Processor>, Width); ~ProcessorEntry (); Gtk::EventBox& action_widget (); @@ -128,6 +128,7 @@ public: void add_control_state (XMLNode *) const; void set_control_state (XMLNode const *); std::string state_id () const; + Gtk::Menu* build_controls_menu (); static void setup_slider_pix (); @@ -147,6 +148,7 @@ private: std::string name (Width) const; void setup_tooltip (); + ProcessorBox* _parent; boost::shared_ptr<ARDOUR::Processor> _processor; Width _width; Gtk::StateType _visual_state; @@ -158,11 +160,19 @@ private: Control (Glib::RefPtr<Gdk::Pixbuf>, boost::shared_ptr<ARDOUR::AutomationControl>, std::string const &); void set_pixel_width (int); - void show (); - void hide (); + void set_visible (bool); void add_state (XMLNode *) const; void set_state (XMLNode const *); void hide_things (); + void hide_label (); + + bool visible () const { + return _visible; + } + + std::string name () const { + return _name; + } Gtk::VBox box; @@ -178,21 +188,24 @@ private: bool _ignore_slider_adjustment; PBD::ScopedConnection _connection; bool _visible; + std::string _name; }; std::list<Control*> _controls; + + void toggle_control_visibility (Control *); }; class BlankProcessorEntry : public ProcessorEntry { public: - BlankProcessorEntry (Width w); + BlankProcessorEntry (ProcessorBox *, Width w); }; class PluginInsertProcessorEntry : public ProcessorEntry { public: - PluginInsertProcessorEntry (boost::shared_ptr<ARDOUR::PluginInsert>, Width); + PluginInsertProcessorEntry (ProcessorBox *, boost::shared_ptr<ARDOUR::PluginInsert>, Width); void hide_things (); @@ -246,6 +259,8 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD Gtk::Window* get_processor_ui (boost::shared_ptr<ARDOUR::Processor>) const; void toggle_edit_processor (boost::shared_ptr<ARDOUR::Processor>); + void update_gui_object_state (ProcessorEntry *); + sigc::signal<void,boost::shared_ptr<ARDOUR::Processor> > ProcessorSelected; sigc::signal<void,boost::shared_ptr<ARDOUR::Processor> > ProcessorUnselected; @@ -289,9 +304,6 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD Gtk::Menu * build_processor_menu (); void show_processor_menu (int); Gtk::Menu* build_possible_aux_menu(); - Gtk::Menu* build_controls_menu (boost::shared_ptr<ARDOUR::Processor>); - - void show_or_hide_all_controls (boost::weak_ptr<ARDOUR::Processor>, bool); void choose_aux (boost::weak_ptr<ARDOUR::Route>); void choose_send (); @@ -393,7 +405,6 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD void mixer_strip_delivery_changed (boost::weak_ptr<ARDOUR::Delivery>); - void update_gui_object_state (ProcessorEntry *); XMLNode* entry_gui_object_state (ProcessorEntry *); }; |