+class ProcessorBox;
+
+class ProcessorWindowProxy : public WM::ProxyBase
+{
+ public:
+ ProcessorWindowProxy (std::string const &, ProcessorBox *, boost::weak_ptr<ARDOUR::Processor>);
+ ~ProcessorWindowProxy();
+
+ Gtk::Window* get (bool create = false);
+
+ boost::weak_ptr<ARDOUR::Processor> processor () const {
+ return _processor;
+ }
+
+ ARDOUR::SessionHandlePtr* session_handle();
+ void toggle();
+ void set_custom_ui_mode(bool use_custom) { want_custom = use_custom; }
+
+ bool marked;
+ bool valid () const;
+
+ void set_state (const XMLNode&);
+ XMLNode& get_state () const;
+
+ private:
+ ProcessorBox* _processor_box;
+ boost::weak_ptr<ARDOUR::Processor> _processor;
+ bool is_custom;
+ bool want_custom;
+ bool _valid;
+
+ void processor_going_away ();
+ PBD::ScopedConnection going_away_connection;
+};
+
+class ProcessorEntry : public Gtkmm2ext::DnDVBoxChild, public sigc::trackable
+{
+public:
+ ProcessorEntry (ProcessorBox *, boost::shared_ptr<ARDOUR::Processor>, Width);
+ ~ProcessorEntry ();
+
+ Gtk::EventBox& action_widget ();
+ Gtk::Widget& widget ();
+ std::string drag_text () const;
+ void set_visual_state (Gtkmm2ext::VisualState, bool);
+
+ enum Position {
+ PreFader,
+ Fader,
+ PostFader
+ };
+
+ void set_position (Position);
+ boost::shared_ptr<ARDOUR::Processor> processor () const;
+ void set_enum_width (Width);
+
+ /** Hide any widgets that should be hidden */
+ virtual void hide_things ();
+
+ void show_all_controls ();
+ void hide_all_controls ();
+ void add_control_state (XMLNode *) const;
+ void set_control_state (XMLNode const *);
+ std::string state_id () const;
+ Gtk::Menu* build_controls_menu ();
+
+protected:
+ ArdourButton _button;
+ Gtk::VBox _vbox;
+ Position _position;
+
+ virtual void setup_visuals ();
+
+private:
+ void led_clicked();
+ void processor_active_changed ();
+ void processor_property_changed (const PBD::PropertyChange&);
+ std::string name (Width) const;
+ void setup_tooltip ();
+
+ ProcessorBox* _parent;
+ boost::shared_ptr<ARDOUR::Processor> _processor;
+ Width _width;
+ Gtk::StateType _visual_state;
+ PBD::ScopedConnection active_connection;
+ PBD::ScopedConnection name_connection;
+
+ class Control : public sigc::trackable {
+ public:
+ Control (boost::shared_ptr<ARDOUR::AutomationControl>, std::string const &);
+
+ 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;
+
+ private:
+ void slider_adjusted ();
+ void button_clicked ();
+ void control_changed ();
+ std::string state_id () const;
+ void set_tooltip ();
+
+ boost::weak_ptr<ARDOUR::AutomationControl> _control;
+ /* things for a slider */
+ Gtk::Adjustment _adjustment;
+ Gtkmm2ext::HSliderController _slider;
+ Gtk::Label _label;
+ Gtkmm2ext::PersistentTooltip _slider_persistant_tooltip;
+ /* things for a button */
+ ArdourButton _button;
+ bool _ignore_ui_adjustment;
+ PBD::ScopedConnection _connection;
+ bool _visible;
+ std::string _name;
+ };
+
+ std::list<Control*> _controls;
+
+ void toggle_control_visibility (Control *);
+};
+
+class BlankProcessorEntry : public ProcessorEntry
+{
+ public:
+ BlankProcessorEntry (ProcessorBox *, Width w);
+};
+
+class PluginInsertProcessorEntry : public ProcessorEntry
+{
+public:
+ PluginInsertProcessorEntry (ProcessorBox *, boost::shared_ptr<ARDOUR::PluginInsert>, Width);
+
+ void hide_things ();
+
+private:
+ void setup_visuals ();
+ void plugin_insert_splitting_changed ();
+
+ /* XXX: this seems a little ridiculous just for a simple scaleable icon */
+ class SplittingIcon : public Gtk::DrawingArea {
+ private:
+ bool on_expose_event (GdkEventExpose *);
+ };
+
+ boost::shared_ptr<ARDOUR::PluginInsert> _plugin_insert;
+ SplittingIcon _splitting_icon;
+ PBD::ScopedConnection _splitting_connection;
+};
+
+class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARDOUR::SessionHandlePtr