X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fmonitor_section.h;h=8a3c23a6c615f6cca1d11d21ab917ffbaf36d2aa;hb=bc38f2c48969be068b93525bdbcce6c1ff4e1d7c;hp=da20857aead13c7506ac05492e0d441e1ee4def5;hpb=e69aca28426dd17a0f82ea01c7c98e217b4fdcc3;p=ardour.git diff --git a/gtk2_ardour/monitor_section.h b/gtk2_ardour/monitor_section.h index da20857aea..8a3c23a6c6 100644 --- a/gtk2_ardour/monitor_section.h +++ b/gtk2_ardour/monitor_section.h @@ -19,109 +19,171 @@ #include #include +#include #include "gtkmm2ext/bindable_button.h" +#include "gtkmm2ext/bindings.h" -#include "axis_view.h" +#include "ardour_button.h" +#include "ardour_knob.h" +#include "ardour_display.h" #include "level_meter.h" #include "route_ui.h" +#include "monitor_selector.h" + +#include "plugin_selector.h" +#include "route_processor_selection.h" +#include "processor_box.h" namespace Gtkmm2ext { - class TearOff; + class TearOff; } -class VolumeController; - -class MonitorSection : public RouteUI +class MonitorSection : public RouteUI, public Gtk::EventBox { public: - MonitorSection (ARDOUR::Session*); - ~MonitorSection (); + MonitorSection (ARDOUR::Session*); + ~MonitorSection (); - void set_session (ARDOUR::Session*); - static void setup_knob_images (); + void set_session (ARDOUR::Session*); - Gtkmm2ext::TearOff& tearoff() const { return *_tearoff; } + Gtkmm2ext::TearOff& tearoff() const { return *_tearoff; } - private: - Gtk::VBox vpacker; - Gtk::HBox hpacker; - Gtk::Table main_table; - Gtk::VBox upper_packer; - Gtk::VBox lower_packer; - Gtkmm2ext::TearOff* _tearoff; - - struct ChannelButtonSet { - BindableToggleButton cut; - BindableToggleButton dim; - BindableToggleButton solo; - BindableToggleButton invert; - - ChannelButtonSet (); - }; - - typedef std::vector ChannelButtons; - ChannelButtons _channel_buttons; - - Gtk::Adjustment gain_adjustment; - VolumeController* gain_control; - Gtk::Adjustment dim_adjustment; - VolumeController* dim_control; - Gtk::Adjustment solo_boost_adjustment; - VolumeController* solo_boost_control; - Gtk::Adjustment solo_cut_adjustment; - VolumeController* solo_cut_control; - - void populate_buttons (); - void set_button_names (); - void map_state (); - - boost::shared_ptr _monitor; - boost::shared_ptr _route; + std::string state_id() const; + + PluginSelector* plugin_selector() { return _plugin_selector; } + + private: + Gtk::HBox hpacker; + Gtk::VBox vpacker; + Gtkmm2ext::TearOff* _tearoff; + + Gtk::HBox channel_table_packer; + Gtk::HBox table_hpacker; + Gtk::HBox master_packer; + Gtk::Table channel_table; + Gtk::Table channel_table_header; + Gtk::ScrolledWindow channel_table_scroller; + Gtk::Viewport channel_table_viewport; + Glib::RefPtr channel_size_group; + + struct ChannelButtonSet { + ArdourButton cut; + ArdourButton dim; + ArdourButton solo; + ArdourButton invert; + + ChannelButtonSet (); + }; + + typedef std::vector ChannelButtons; + ChannelButtons _channel_buttons; + + ArdourKnob* gain_control; + ArdourKnob* dim_control; + ArdourKnob* solo_boost_control; + ArdourKnob* solo_cut_control; + + ArdourDisplay* gain_display; + ArdourDisplay* dim_display; + ArdourDisplay* solo_boost_display; + ArdourDisplay* solo_cut_display; + + std::list > output_menu_bundles; + Gtk::Menu output_menu; + MonitorSelectorWindow *_output_selector; + ArdourButton* output_button; + + void maybe_add_bundle_to_output_menu (boost::shared_ptr, ARDOUR::BundleList const &); + void bundle_output_chosen (boost::shared_ptr); + void update_output_display (); + void disconnect_output (); + void edit_output_configuration (); + + void populate_buttons (); + void map_state (); + + boost::shared_ptr _monitor; + boost::shared_ptr _route; static Glib::RefPtr monitor_actions; - void register_actions (); - - static Glib::RefPtr big_knob_pixbuf; - static Glib::RefPtr little_knob_pixbuf; - - void cut_channel (uint32_t); - void dim_channel (uint32_t); - void solo_channel (uint32_t); - void invert_channel (uint32_t); - void dim_all (); - void cut_all (); - void mono (); - void dim_level_changed (); - void solo_boost_changed (); - void gain_value_changed (); - - bool nonlinear_gain_printer (Gtk::SpinButton*); - bool linear_gain_printer (Gtk::SpinButton*); - - Gtk::RadioButtonGroup solo_model_group; - Gtk::RadioButton solo_in_place_button; - Gtk::RadioButton afl_button; - Gtk::RadioButton pfl_button; - Gtk::HBox solo_model_box; - - void solo_use_in_place (); - void solo_use_afl (); - void solo_use_pfl (); - - BindableToggleButton cut_all_button; - BindableToggleButton dim_all_button; - BindableToggleButton mono_button; - BindableToggleButton rude_solo_button; - - void solo_blink (bool); - bool cancel_solo (GdkEventButton*); - void solo_cut_changed (); - void update_solo_model (); - void parameter_changed (std::string); - - PBD::ScopedConnection config_connection; - PBD::ScopedConnectionList control_connections; - - void assign_controllables (); + void register_actions (); + void connect_actions (); + + void cut_channel (uint32_t); + void dim_channel (uint32_t); + void solo_channel (uint32_t); + void invert_channel (uint32_t); + void dim_all (); + void cut_all (); + void mono (); + void toggle_exclusive_solo (); + void set_button_names () {} + void toggle_mute_overrides_solo (); + void dim_level_changed (); + void solo_boost_changed (); + void gain_value_changed (); + gint output_press (GdkEventButton *); + gint output_release (GdkEventButton *); + + ArdourButton solo_in_place_button; + ArdourButton afl_button; + ArdourButton pfl_button; + Gtk::VBox solo_model_box; + + void solo_use_in_place (); + void solo_use_afl (); + void solo_use_pfl (); + + ArdourButton cut_all_button; + ArdourButton dim_all_button; + ArdourButton mono_button; + ArdourButton rude_solo_button; + ArdourButton rude_iso_button; + ArdourButton rude_audition_button; + ArdourButton exclusive_solo_button; + ArdourButton solo_mute_override_button; + ArdourButton toggle_processorbox_button; + + void do_blink (bool); + void solo_blink (bool); + void audition_blink (bool); + bool cancel_solo (GdkEventButton*); + bool cancel_isolate (GdkEventButton*); + bool cancel_audition (GdkEventButton*); + void update_solo_model (); + void parameter_changed (std::string); + void isolated_changed (); + + PBD::ScopedConnection config_connection; + PBD::ScopedConnectionList control_connections; + PBD::ScopedConnection _output_changed_connection; + + bool _inhibit_solo_model_update; + + void assign_controllables (); + + void port_connected_or_disconnected (boost::weak_ptr, boost::weak_ptr); + + void update_processor_box (); + + void route_property_changed (const PBD::PropertyChange&) {} + + ProcessorBox* insert_box; + PluginSelector* _plugin_selector; + RouteProcessorSelection _rr_selection; + void help_count_processors (boost::weak_ptr p, uint32_t* cnt) const; + uint32_t count_processors (); + + void processors_changed (ARDOUR::RouteProcessorChange); + Glib::RefPtr proctoggle; + bool _ui_initialized; + + private: + Gtkmm2ext::ActionMap myactions; + Gtkmm2ext::Bindings* bindings; + + void load_bindings (); + bool enter_handler (GdkEventCrossing*); + bool leave_handler (GdkEventCrossing*); };