X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fprocessor_box.h;h=bd5f18b947dc432abb3b9b76ac3c0af1f2d75b8d;hb=d0227fe5b7c30271cd2950a71d429cf03b0db2db;hp=9273a750521c044e51054c0b52c51341eaf83e27;hpb=579fcb70e2b3b0a1ef2af9fc88edebff6d7e6dd3;p=ardour.git diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h index 9273a75052..bd5f18b947 100644 --- a/gtk2_ardour/processor_box.h +++ b/gtk2_ardour/processor_box.h @@ -29,11 +29,11 @@ #include #include #include -#include -#include -#include -#include -#include +#include "gtkmm2ext/dndtreeview.h" +#include "gtkmm2ext/auto_spin.h" +#include "gtkmm2ext/click_box.h" +#include "gtkmm2ext/dndvbox.h" +#include "gtkmm2ext/pixfader.h" #include "pbd/stateful.h" #include "pbd/signals.h" @@ -83,6 +83,9 @@ public: ProcessorWindowProxy (std::string const &, XMLNode const *, ProcessorBox *, boost::weak_ptr); void show (); + bool rc_configured () const { + return false; + } boost::weak_ptr processor () const { return _processor; @@ -103,13 +106,28 @@ public: Gtk::EventBox& action_widget (); Gtk::Widget& widget (); std::string drag_text () const; + void set_visual_state (Gtk::StateType); + + enum Position { + PreFader, + Fader, + PostFader + }; + + void set_position (Position); boost::shared_ptr processor () const; void set_enum_width (Width); virtual void set_pixel_width (int) {} + /** Hide any widgets that should be hidden */ + virtual void hide_things () {} + protected: + virtual void setup_visuals (); + Gtk::VBox _vbox; + Position _position; private: @@ -117,13 +135,15 @@ private: void processor_active_changed (); void processor_property_changed (const PBD::PropertyChange&); std::string name () const; - + + Gtk::Frame _frame; Gtk::EventBox _event_box; Gtk::Label _name; Gtk::HBox _hbox; Gtk::CheckButton _active; boost::shared_ptr _processor; Width _width; + Gtk::StateType _visual_state; PBD::ScopedConnection active_connection; PBD::ScopedConnection name_connection; }; @@ -151,6 +171,28 @@ private: static Glib::RefPtr _slider; }; +class PluginInsertProcessorEntry : public ProcessorEntry +{ +public: + PluginInsertProcessorEntry (boost::shared_ptr, 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 _plugin_insert; + SplittingIcon _splitting_icon; + PBD::ScopedConnection _splitting_connection; +}; + class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARDOUR::SessionHandlePtr { public: @@ -169,8 +211,10 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD void select_all_inserts (); void select_all_sends (); + void hide_things (); + Gtk::Window* get_processor_ui (boost::shared_ptr) const; - void edit_processor (boost::shared_ptr); + void toggle_edit_processor (boost::shared_ptr); sigc::signal > ProcessorSelected; sigc::signal > ProcessorUnselected; @@ -186,7 +230,8 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD MixerStrip* _parent_strip; // null if in RouteParamsUI bool _owner_is_mixer; bool ab_direction; - PBD::ScopedConnectionList connections; + PBD::ScopedConnectionList _mixer_strip_connections; + PBD::ScopedConnectionList _route_connections; boost::function _get_plugin_selector; @@ -200,8 +245,6 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD void selection_changed (); - Gtk::EventBox processor_eventbox; - Gtk::HBox processor_hpacker; Gtkmm2ext::DnDVBox processor_display; Gtk::ScrolledWindow processor_scroller; @@ -241,6 +284,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD void redisplay_processors (); void add_processor_to_display (boost::weak_ptr); void reordered (); + void report_failed_reorder (); void route_processors_changed (ARDOUR::RouteProcessorChange); void processors_reordered (const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator&, int*); @@ -274,6 +318,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD static Glib::RefPtr cut_action; static Glib::RefPtr paste_action; static Glib::RefPtr rename_action; + static Glib::RefPtr edit_action; void paste_processor_state (const XMLNodeList&, boost::shared_ptr); void activate_processor (boost::shared_ptr); @@ -286,6 +331,8 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD void weird_plugin_dialog (ARDOUR::Plugin& p, ARDOUR::Route::ProcessorStreams streams); void on_size_allocate (Gtk::Allocation &); + void setup_entry_positions (); + static ProcessorBox* _current_processor_box; static void rb_choose_aux (boost::weak_ptr); @@ -313,6 +360,11 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD std::list _processor_window_proxies; void set_processor_ui (boost::shared_ptr, Gtk::Window *); void maybe_add_processor_to_ui_list (boost::weak_ptr); + + bool one_processor_can_be_edited (); + bool processor_can_be_edited (boost::shared_ptr); + + void mixer_strip_delivery_changed (boost::weak_ptr); }; #endif /* __ardour_gtk_processor_box__ */