+
+Menu *
+ProcessorEntry::build_controls_menu ()
+{
+ using namespace Menu_Helpers;
+ Menu* menu = manage (new Menu);
+ MenuList& items = menu->items ();
+
+ items.push_back (
+ MenuElem (_("Show All Controls"), sigc::mem_fun (*this, &ProcessorEntry::show_all_controls))
+ );
+
+ items.push_back (
+ MenuElem (_("Hide All Controls"), sigc::mem_fun (*this, &ProcessorEntry::hide_all_controls))
+ );
+
+ if (!_controls.empty ()) {
+ items.push_back (SeparatorElem ());
+ }
+
+ for (list<Control*>::iterator i = _controls.begin(); i != _controls.end(); ++i) {
+ items.push_back (CheckMenuElem ((*i)->name ()));
+ CheckMenuItem* c = dynamic_cast<CheckMenuItem*> (&items.back ());
+ c->set_active ((*i)->visible ());
+ c->signal_toggled().connect (sigc::bind (sigc::mem_fun (*this, &ProcessorEntry::toggle_control_visibility), *i));
+ }
+
+ return menu;
+}
+
+void
+ProcessorEntry::toggle_control_visibility (Control* c)
+{
+ c->set_visible (!c->visible ());
+ _parent->update_gui_object_state (this);
+}
+
+ProcessorEntry::Control::Control (Glib::RefPtr<Gdk::Pixbuf> s, Glib::RefPtr<Gdk::Pixbuf> sd, boost::shared_ptr<AutomationControl> c, string const & n)