X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=gtk2_ardour%2Fmixer_ui.h;h=16e6d35c3fd1895862e8fdb07347cbc5b62cb606;hb=46bbe834009d51a652e03a7fd4fa57bfb6457e38;hp=a96ce697345cccd20eb06f389ebdd955620bc4ba;hpb=cc82fc675b096c3dfec76d0c45671b78c85007cf;p=ardour.git diff --git a/gtk2_ardour/mixer_ui.h b/gtk2_ardour/mixer_ui.h index a96ce69734..16e6d35c3f 100644 --- a/gtk2_ardour/mixer_ui.h +++ b/gtk2_ardour/mixer_ui.h @@ -1,21 +1,26 @@ /* - Copyright (C) 2000 Paul Davis - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ + * Copyright (C) 2005-2007 Taybin Rutkin + * Copyright (C) 2005-2018 Paul Davis + * Copyright (C) 2006 Nick Mainsbridge + * Copyright (C) 2007-2009 David Robillard + * Copyright (C) 2009-2012 Carl Hetherington + * Copyright (C) 2013-2019 Robin Gareus + * Copyright (C) 2014-2018 Ben Loftis + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ #ifndef __ardour_mixer_ui_h__ #define __ardour_mixer_ui_h__ @@ -26,10 +31,12 @@ #include #include #include +#include #include #include #include #include +#include #include #include "pbd/stateful.h" @@ -43,11 +50,14 @@ #include #include "gtkmm2ext/dndtreeview.h" -#include -#include "gtkmm2ext/tabbable.h" #include "gtkmm2ext/treeutils.h" +#include "widgets/pane.h" +#include "widgets/tabbable.h" + +#include "axis_provider.h" #include "enums.h" +#include "monitor_section.h" #include "route_processor_selection.h" namespace ARDOUR { @@ -57,6 +67,7 @@ namespace ARDOUR { }; class AxisView; +class FoldbackStrip; class MixerStrip; class PluginSelector; class MixerGroupTabs; @@ -76,9 +87,9 @@ protected: virtual bool row_drop_possible_vfunc (const Gtk::TreeModel::Path&, const Gtk::SelectionData&) const; }; -class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr +class Mixer_UI : public ArdourWidgets::Tabbable, public PBD::ScopedConnectionList, public ARDOUR::SessionHandlePtr, public AxisViewProvider { - public: +public: static Mixer_UI* instance(); ~Mixer_UI(); @@ -95,8 +106,7 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p XMLNode& get_state (); int set_state (const XMLNode&, int /* version */); - void show_mixer_list (bool yn); - void show_monitor_section (bool); + void save_plugin_order_file (); void show_strip (MixerStrip *); void hide_strip (MixerStrip *); @@ -104,14 +114,14 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p void maximise_mixer_space(); void restore_mixer_space(); - MonitorSection* monitor_section() const { return _monitor_section; } + MonitorSection& monitor_section() { return _monitor_section; } void deselect_all_strip_processors(); void delete_processors(); - void select_strip (MixerStrip&, bool add=false); void select_none (); - bool window_not_visible () const; + void select_next_strip (); + void select_prev_strip (); void do_vca_assign (boost::shared_ptr); void do_vca_unassign (boost::shared_ptr); @@ -121,15 +131,35 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p sigc::signal1 > show_spill_change; RouteProcessorSelection& selection() { return _selection; } + + void show_editor_window () const; + void register_actions (); - void load_bindings (); - Gtkmm2ext::Bindings* bindings; + void load_bindings (); + Gtkmm2ext::Bindings* bindings; + + void toggle_mixer_list (); + void showhide_mixer_list (bool yn); + + void toggle_monitor_section (); + void showhide_monitor_section (bool); + + void toggle_vcas (); + void showhide_vcas (bool on); - protected: +#ifdef MIXBUS + void toggle_mixbuses (); + void showhide_mixbusses (bool on); +#endif + + bool screenshot (std::string const&); + +protected: void set_axis_targets_for_operation (); + ARDOUR::AutomationControlSet selected_gaincontrols (); - private: +private: Mixer_UI (); static Mixer_UI* _instance; Gtk::VBox _content; @@ -141,7 +171,6 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p Gtk::VBox mixer_scroller_vpacker; Gtk::VBox list_vpacker; Gtk::Label group_display_button_label; - Gtk::Button group_display_button; Gtk::ScrolledWindow track_display_scroller; Gtk::ScrolledWindow group_display_scroller; Gtk::ScrolledWindow favorite_plugins_scroller; @@ -149,9 +178,12 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p Gtk::Frame track_display_frame; Gtk::Frame group_display_frame; Gtk::Frame favorite_plugins_frame; - Gtkmm2ext::VPane rhs_pane1; - Gtkmm2ext::VPane rhs_pane2; - Gtkmm2ext::HPane inner_pane; + Gtk::VBox favorite_plugins_vbox; + Gtk::ComboBoxText favorite_plugins_tag_combo; + ArdourWidgets::VPane rhs_pane1; + ArdourWidgets::VPane rhs_pane2; + ArdourWidgets::HPane inner_pane; + Gtk::VBox strip_group_box; Gtk::HBox strip_packer; Gtk::ScrolledWindow vca_scroller; Gtk::HBox vca_hpacker; @@ -160,11 +192,14 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p Gtk::Label vca_label; Gtk::EventBox vca_scroller_base; Gtk::HBox out_packer; - Gtkmm2ext::HPane list_hpane; + ArdourWidgets::HPane list_hpane; + Gtk::Button add_button; // should really be an ArdourButton + Gtk::Button add_vca_button; MixerGroupTabs* _group_tabs; bool on_scroll_event (GdkEventScroll*); + bool on_vca_scroll_event (GdkEventScroll*); std::list strips; @@ -173,32 +208,27 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p bool masters_scroller_button_release (GdkEventButton*); void scroll_left (); void scroll_right (); + void vca_scroll_left (); + void vca_scroll_right (); void toggle_midi_input_active (bool flip_others); + void move_vca_into_view (boost::shared_ptr); void move_stripable_into_view (boost::shared_ptr); void add_stripables (ARDOUR::StripableList&); void add_routes (ARDOUR::RouteList&); void remove_strip (MixerStrip *); - + void remove_foldback (FoldbackStrip *); void add_masters (ARDOUR::VCAList&); void remove_master (VCAMasterStrip*); + void new_masters_created (); MixerStrip* strip_by_route (boost::shared_ptr) const; MixerStrip* strip_by_stripable (boost::shared_ptr) const; - AxisView* axis_by_stripable (boost::shared_ptr) const; - - void hide_all_strips (bool with_select); - void unselect_all_strips(); - void select_all_strips (); - void unselect_all_audiotrack_strips (); - void select_all_audiotrack_strips (); - void unselect_all_audiobus_strips (); - void select_all_audiobus_strips (); - void strip_select_op (bool audiotrack, bool select); - void select_strip_op (MixerStrip*, bool select); + AxisView* axis_view_by_stripable (boost::shared_ptr) const; + AxisView* axis_view_by_control (boost::shared_ptr) const; gint start_updating (); gint stop_updating (); @@ -238,7 +268,6 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p ARDOUR::PluginPresetPtr selected_plugin (); void initial_track_display (); - void show_track_list_menu (); void set_all_strips_visibility (bool yn); void set_all_audio_midi_visibility (int, bool); @@ -273,8 +302,9 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p void track_column_click (gint); void build_track_menu (); - MonitorSection* _monitor_section; - PluginSelector *_plugin_selector; + MonitorSection _monitor_section; + PluginSelector *_plugin_selector; + FoldbackStrip * foldback_strip; void stripable_property_changed (const PBD::PropertyChange& what_changed, boost::weak_ptr ws); void route_group_property_changed (ARDOUR::RouteGroup *, const PBD::PropertyChange &); @@ -333,8 +363,10 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p void group_display_selection_changed (); bool strip_button_release_event (GdkEventButton*, MixerStrip*); + bool vca_button_release_event (GdkEventButton*, VCAMasterStrip*); Width _strip_width; + double _spill_scroll_position; void presentation_info_changed (PBD::PropertyChange const &); void sync_treeview_from_presentation_info (PBD::PropertyChange const &); @@ -352,8 +384,8 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p static const int32_t default_height = 765; /** true if we are rebuilding the route group list, or clearing - it during a session teardown. - */ + * it during a session teardown. + */ bool _in_group_rebuild_or_clear; bool _route_deletion_in_progress; @@ -363,13 +395,19 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p friend class MixerGroupTabs; void monitor_section_going_away (); - void monitor_section_attached (); void monitor_section_detached (); void store_current_favorite_order(); void refiller (ARDOUR::PluginInfoList& result, const ARDOUR::PluginInfoList& plugs); + + void plugin_list_changed (); + void refill_favorite_plugins (); + void refill_tag_combo (); + + void tag_combo_changed (); + void sync_treeview_from_favorite_order (); void sync_treeview_favorite_ui_state (const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator&); void save_favorite_ui_state (const Gtk::TreeModel::iterator& iter, const Gtk::TreeModel::Path& path); @@ -377,14 +415,12 @@ class Mixer_UI : public Gtkmm2ext::Tabbable, public PBD::ScopedConnectionList, p /// true if we are in fullscreen mode bool _maximised; - // true if mixer list is visible - bool _show_mixer_list; + bool _strip_selection_change_without_scroll; mutable boost::weak_ptr spilled_strip; void escape (); - Gtkmm2ext::ActionMap myactions; RouteProcessorSelection _selection; AxisViewSelection _axis_targets;