X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Froute_ui.h;h=d0b9d406c61f4dcf21eb7a6f9c1688920d6ceff4;hb=b157034e832f8f01f2ea46a849fb133a402b3733;hp=461419c8480d1b7f13ceade57554aeb753e2f8fd;hpb=9e5b7db89f381c70232fab35dc21fd885863f998;p=ardour.git diff --git a/gtk2_ardour/route_ui.h b/gtk2_ardour/route_ui.h index 461419c848..d0b9d406c6 100644 --- a/gtk2_ardour/route_ui.h +++ b/gtk2_ardour/route_ui.h @@ -31,14 +31,16 @@ #include "ardour/ardour.h" #include "ardour/mute_master.h" -#include "ardour/session_event.h" #include "ardour/session.h" +#include "ardour/session_event.h" +#include "ardour/session_handle.h" #include "ardour/route.h" #include "ardour/route_group.h" #include "ardour/track.h" #include "axis_view.h" #include "selectable.h" +#include "window_manager.h" namespace ARDOUR { class AudioTrack; @@ -54,16 +56,32 @@ namespace Gtk { class ArdourButton; class ArdourWindow; class IOSelectorWindow; +class ControlSlaveUI; + +class RoutePinWindowProxy : public WM::ProxyBase +{ + public: + RoutePinWindowProxy (std::string const &, boost::shared_ptr); + ~RoutePinWindowProxy(); + + Gtk::Window* get (bool create = false); + ARDOUR::SessionHandlePtr* session_handle(); + + private: + boost::weak_ptr _route; + + void route_going_away (); + PBD::ScopedConnection going_away_connection; +}; -class RouteUI : public virtual AxisView +class RouteUI : public virtual ARDOUR::SessionHandlePtr, public virtual PBD::ScopedConnectionList, public virtual Selectable, public virtual sigc::trackable { public: - RouteUI(ARDOUR::Session*); - RouteUI(boost::shared_ptr, ARDOUR::Session*); + RouteUI (ARDOUR::Session*); virtual ~RouteUI(); - Gdk::Color color () const; + boost::shared_ptr stripable() const; virtual void set_route (boost::shared_ptr); virtual void set_button_names () = 0; @@ -80,15 +98,14 @@ class RouteUI : public virtual AxisView boost::shared_ptr audio_track() const; boost::shared_ptr midi_track() const; - std::string name() const; - // protected: XXX sigh this should be here boost::shared_ptr _route; void request_redraw (); - virtual void set_color (const Gdk::Color & c); + virtual void set_color (uint32_t c); + Gdk::Color route_color () const; void choose_color (); bool ignore_toggle; @@ -106,8 +123,9 @@ class RouteUI : public virtual AxisView Glib::RefPtr solo_safe_pixbuf; - ArdourButton* solo_safe_led; - ArdourButton* solo_isolated_led; + ArdourButton* solo_safe_led; + ArdourButton* solo_isolated_led; + Gtk::Label monitor_input_button_label; Gtk::Label monitor_disk_button_label; @@ -137,7 +155,6 @@ class RouteUI : public virtual AxisView bool monitor_input_release(GdkEventButton*); bool monitor_disk_press(GdkEventButton*); bool monitor_disk_release(GdkEventButton*); - void monitoring_changed (); void update_monitoring_display (); void edit_input_configuration (); @@ -167,8 +184,8 @@ class RouteUI : public virtual AxisView void solo_isolated_toggle (void*, Gtk::CheckMenuItem*); void toggle_solo_isolated (Gtk::CheckMenuItem*); - bool solo_isolate_button_release (GdkEventButton*); - bool solo_safe_button_release (GdkEventButton*); + bool solo_isolate_button_release (GdkEventButton*); + bool solo_safe_button_release (GdkEventButton*); void solo_safe_toggle (void*, Gtk::CheckMenuItem*); void toggle_solo_safe (Gtk::CheckMenuItem*); @@ -189,20 +206,27 @@ class RouteUI : public virtual AxisView void route_rename(); - virtual void property_changed (const PBD::PropertyChange&); + void manage_pins (); + void maybe_add_route_print_mgr (); + void fan_out (bool to_busses = true, bool group = true); + + virtual void route_property_changed (const PBD::PropertyChange&) = 0; void route_removed (); virtual void route_active_changed () {} void set_route_active (bool, bool); void duplicate_selected_routes (); - Gtk::Menu* record_menu; - void build_record_menu (); + Gtk::Menu* record_menu; + void build_record_menu (); Gtk::CheckMenuItem *step_edit_item; void toggle_step_edit (); virtual void step_edit_changed (bool); + Gtk::CheckMenuItem *rec_safe_item; + void toggle_rec_safe (); + virtual void polarity_changed (); Gtk::CheckMenuItem *denormal_menu_item; @@ -222,12 +246,11 @@ class RouteUI : public virtual AxisView void adjust_latency (); bool process_save_template_prompter (ArdourPrompter& prompter, const std::string& dir); void save_as_template (); - void open_remote_control_id_dialog (); - static Gtkmm2ext::ActiveState solo_active_state (boost::shared_ptr); - static Gtkmm2ext::ActiveState solo_isolate_active_state (boost::shared_ptr); - static Gtkmm2ext::ActiveState solo_safe_active_state (boost::shared_ptr); - static Gtkmm2ext::ActiveState mute_active_state (ARDOUR::Session*, boost::shared_ptr); + static Gtkmm2ext::ActiveState solo_active_state (boost::shared_ptr); + static Gtkmm2ext::ActiveState solo_isolate_active_state (boost::shared_ptr); + static Gtkmm2ext::ActiveState solo_safe_active_state (boost::shared_ptr); + static Gtkmm2ext::ActiveState mute_active_state (ARDOUR::Session*, boost::shared_ptr); /** Emitted when a bus has been set or unset from `display sends to this bus' mode * by a click on the `Sends' button. The parameter is the route that the sends are @@ -255,31 +278,35 @@ class RouteUI : public virtual AxisView PBD::ScopedConnectionList route_connections; bool self_destruct; - void init (); - void reset (); + void init (); + void reset (); void self_delete (); - virtual void start_step_editing () {} - virtual void stop_step_editing() {} + virtual void start_step_editing () {} + virtual void stop_step_editing() {} - void set_invert_sensitive (bool); + void set_invert_sensitive (bool); bool verify_new_route_name (const std::string& name); - void route_gui_changed (std::string); + void route_gui_changed (PBD::PropertyChange const&); virtual void route_color_changed () {} + void check_rec_enable_sensitivity (); + virtual void bus_send_display_changed (boost::shared_ptr); static std::string program_port_prefix; + bool mark_hidden (bool yn); + private: - void check_rec_enable_sensitivity (); - void parameter_changed (std::string const &); + void parameter_changed (std::string const&); void relabel_solo_button (); void track_mode_changed (); std::string route_state_id () const; + protected: struct SoloMuteRelease { SoloMuteRelease (bool was_active) : active (was_active) @@ -296,6 +323,9 @@ class RouteUI : public virtual AxisView SoloMuteRelease* _solo_release; SoloMuteRelease* _mute_release; + ControlSlaveUI* csu; + +private: void setup_invert_buttons (); void set_invert_button_state (); void invert_menu_toggled (uint32_t);