Ardour  9.0-pre0-582-g084a23a80d
mixer_strip.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2006 Taybin Rutkin <taybin@taybin.com>
3  * Copyright (C) 2005-2017 Paul Davis <paul@linuxaudiosystems.com>
4  * Copyright (C) 2006-2011 David Robillard <d@drobilla.net>
5  * Copyright (C) 2006 Nick Mainsbridge <mainsbridge@gmail.com>
6  * Copyright (C) 2007-2011 Carl Hetherington <carl@carlh.net>
7  * Copyright (C) 2013-2019 Robin Gareus <robin@gareus.org>
8  * Copyright (C) 2014-2017 Ben Loftis <ben@harrisonconsoles.com>
9  * Copyright (C) 2016-2017 Julien "_FrnchFrgg_" RIVAUD <frnchfrgg@free.fr>
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License along
22  * with this program; if not, write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  */
25 
26 #ifndef __ardour_mixer_strip__
27 #define __ardour_mixer_strip__
28 
29 #include <vector>
30 
31 #include <cmath>
32 
33 #include <gtkmm/adjustment.h>
34 #include <gtkmm/button.h>
35 #include <gtkmm/box.h>
36 #include <gtkmm/eventbox.h>
37 #include <gtkmm/frame.h>
38 #include <gtkmm/label.h>
39 #include <gtkmm/menu.h>
40 #include <gtkmm/sizegroup.h>
41 #include <gtkmm/textview.h>
42 #include <gtkmm/togglebutton.h>
43 
44 #include "pbd/stateful.h"
45 
46 #include "ardour/types.h"
47 #include "ardour/ardour.h"
48 #include "ardour/processor.h"
49 
50 #include "pbd/fastlog.h"
51 
52 #include "widgets/ardour_button.h"
53 #include "widgets/ardour_knob.h"
54 
55 #include "axis_view.h"
56 #include "control_slave_ui.h"
57 #include "io_button.h"
58 #include "route_ui.h"
59 #include "gain_meter.h"
60 #include "panner_ui.h"
61 #include "enums.h"
62 #include "processor_box.h"
63 #include "triggerbox_ui.h"
64 #include "trigger_master.h"
65 #include "visibility_group.h"
66 
67 namespace ARDOUR {
68  class Route;
69  class Send;
70  class Processor;
71  class Session;
72  class PortInsert;
73  class Bundle;
74  class Plugin;
75  class TriggerBox;
76 }
77 namespace Gtk {
78  class Window;
79  class Style;
80 }
81 
82 class Mixer_UI;
83 class MotionController;
84 class RouteGroupMenu;
85 class ArdourWindow;
87 class TriggerBoxWidget;
88 
89 class MixerStrip : public AxisView, public RouteUI, public Gtk::EventBox
90 {
91 public:
92  MixerStrip (Mixer_UI&, ARDOUR::Session*, std::shared_ptr<ARDOUR::Route>, bool in_mixer = true);
93  MixerStrip (Mixer_UI&, ARDOUR::Session*, bool in_mixer = true);
95 
96  std::string name() const;
97  Gdk::Color color () const;
98  bool marked_for_display () const;
100 
101  std::shared_ptr<ARDOUR::Stripable> stripable() const { return RouteUI::stripable(); }
102 
103  void set_width_enum (Width, void* owner);
104  Width get_width_enum () const { return _width; }
105  void* width_owner () const { return _width_owner; }
106 
107  GainMeter& gain_meter() { return gpm; }
108  PannerUI& panner_ui() { return panners; }
110 
111  void fast_update ();
112  void set_embedded (bool);
113 
114  void set_route (std::shared_ptr<ARDOUR::Route>);
116  void show_send (std::shared_ptr<ARDOUR::Send>);
118 
122  std::shared_ptr<ARDOUR::Delivery> current_delivery () const {
123  return _current_delivery;
124  }
125 
126  bool mixer_owned () const {
127  return _mixer_owned;
128  }
129 
130  /* used for screenshots */
131  void hide_master_spacer (bool);
132 
133  void hide_things ();
134 
135  sigc::signal<void> WidthChanged;
136 
138  PBD::Signal<void(std::weak_ptr<ARDOUR::Delivery> )> DeliveryChanged;
139 
141 
142  std::string state_id() const;
143 
144  void parameter_changed (std::string);
146 
148  void cut_processors ();
152  bool delete_processors (); //note: returns false if nothing was deleted
154  void ab_plugins ();
155 
156  void set_selected (bool yn);
157 
158  void set_trigger_display (std::shared_ptr<ARDOUR::TriggerBox>);
159 
161 
162 protected:
163  friend class Mixer_UI;
164  void set_packed (bool yn);
165  bool packed () { return _packed; }
166 
168 
169 private:
171 
172  void init ();
173 
174  bool _embedded;
175  bool _packed;
179 
185 
186  void hide_clicked();
188 
191 
195 
196  Glib::RefPtr<Gtk::SizeGroup> button_size_group;
197 
203 
204  void vca_assign (std::shared_ptr<ARDOUR::VCA>);
205  void vca_unassign (std::shared_ptr<ARDOUR::VCA>);
206 
207  void meter_changed ();
210 
213 
215 
217 
220 
221  std::string longest_label;
222 
226 
229 
230  /*Trigger widget*/
233 
237 
240  std::shared_ptr<AutomationController> _volume_controller;
241 
243 
246 
249 
251 
254 
257  void connect_to_pan ();
260 
264 
266 
272 
275 
277 
280 
283  void name_changed ();
285  void map_frozen ();
286  void hide_processor_editor (std::weak_ptr<ARDOUR::Processor> processor);
288 
290 
292 
293  virtual void bus_send_display_changed (std::shared_ptr<ARDOUR::Route>);
294 
295  void set_current_delivery (std::shared_ptr<ARDOUR::Delivery>);
296 
297  void drop_send ();
299 
302 
305 
314  std::optional<bool> override_solo_visibility () const;
315  std::optional<bool> override_rec_mon_visibility () const;
316 
318 
321 
330 
332 
334 
336 };
337 
338 #endif /* __ardour_mixer_strip__ */
RouteGroupMenu * group_menu
Definition: mixer_strip.h:248
Gtk::Style * passthru_style
Definition: mixer_strip.h:276
void show_send(std::shared_ptr< ARDOUR::Send >)
void update_trim_control()
PBD::ScopedConnection _level_meter_connection
Definition: mixer_strip.h:329
static MixerStrip * entered_mixer_strip()
Definition: mixer_strip.h:160
void copy_processors()
Gtk::Menu * _master_volume_menu
Definition: mixer_strip.h:238
void add_level_meter_item_point(Gtk::Menu_Helpers::MenuList &, Gtk::RadioMenuItem::Group &, std::string const &, ARDOUR::MeterPoint)
bool set_marked_for_display(bool)
bool _embedded
Definition: mixer_strip.h:174
Gtk::Menu * route_ops_menu
Definition: mixer_strip.h:267
bool _suspend_menu_callbacks
Definition: mixer_strip.h:322
void update_input_display()
void set_button_names()
void hide_redirect_editors()
IOButton output_button
Definition: mixer_strip.h:212
std::string name() const
std::string meter_point_string(ARDOUR::MeterPoint)
Mixer_UI & _mixer
Definition: mixer_strip.h:170
bool _packed
Definition: mixer_strip.h:175
bool level_meter_button_press(GdkEventButton *)
Gtk::VBox global_vpacker
Definition: mixer_strip.h:190
void build_route_ops_menu()
void add_output_port(ARDOUR::DataType)
Gtk::HBox input_button_box
Definition: mixer_strip.h:219
std::shared_ptr< ARDOUR::Delivery > current_delivery() const
Definition: mixer_strip.h:122
IOButton input_button
Definition: mixer_strip.h:211
void list_route_operations()
ArdourWidgets::ArdourButton _comment_button
Definition: mixer_strip.h:235
void monitor_changed()
bool input_active_button_press(GdkEventButton *)
void loudess_analysis_button_clicked()
void add_input_port(ARDOUR::DataType)
void monitor_section_added_or_removed()
void fast_update()
void revert_to_default_display()
void io_changed_proxy()
Gtk::Frame global_frame
Definition: mixer_strip.h:189
VisibilityGroup _visibility
Definition: mixer_strip.h:313
PannerUI panners
Definition: mixer_strip.h:194
void select_all_processors()
bool select_route_group(GdkEventButton *)
void set_packed(bool yn)
void hide_master_spacer(bool)
void meter_changed()
bool mixer_strip_enter_event(GdkEventCrossing *)
Width get_width_enum() const
Definition: mixer_strip.h:104
void map_frozen()
void toggle_processors()
virtual void bus_send_display_changed(std::shared_ptr< ARDOUR::Route >)
void update_track_number_visibility()
void hide_clicked()
void update_output_display()
Width _width
Definition: mixer_strip.h:177
GainMeter & gain_meter()
Definition: mixer_strip.h:107
Gtk::Table master_volume_table
Definition: mixer_strip.h:201
std::optional< bool > override_rec_mon_visibility() const
void vca_assign(std::shared_ptr< ARDOUR::VCA >)
bool input_active_button_release(GdkEventButton *)
ArdourWidgets::ArdourKnob trim_control
Definition: mixer_strip.h:236
Glib::RefPtr< Gtk::SizeGroup > button_size_group
Definition: mixer_strip.h:196
PBD::ScopedConnection panstyle_connection
Definition: mixer_strip.h:256
void set_route(std::shared_ptr< ARDOUR::Route >)
PannerUI & panner_ui()
Definition: mixer_strip.h:108
void update_diskstream_display()
PBD::Signal< void(std::weak_ptr< ARDOUR::Delivery >)> DeliveryChanged
Definition: mixer_strip.h:138
void build_send_action_menu()
void comment_button_resized(Gtk::Allocation &)
gboolean number_button_button_press(GdkEventButton *)
bool _mixer_owned
Definition: mixer_strip.h:176
Gtk::EventBox spacer
Definition: mixer_strip.h:184
ArdourWidgets::ArdourButton width_button
Definition: mixer_strip.h:181
void update_sensitivity()
bool marked_for_display() const
void setup_comment_button()
std::optional< bool > override_solo_visibility() const
bool packed()
Definition: mixer_strip.h:165
std::shared_ptr< AutomationController > _volume_controller
Definition: mixer_strip.h:240
ArdourWidgets::ArdourButton midi_input_enable_button
Definition: mixer_strip.h:218
bool width_button_pressed(GdkEventButton *)
void set_automated_controls_sensitivity(bool yn)
void route_property_changed(const PBD::PropertyChange &)
void midi_input_status_changed()
gint mark_update_safe()
void hide_processor_editor(std::weak_ptr< ARDOUR::Processor > processor)
GainMeter gpm
Definition: mixer_strip.h:193
ArdourWidgets::ArdourButton group_button
Definition: mixer_strip.h:247
sigc::signal< void > WidthChanged
Definition: mixer_strip.h:135
void name_button_resized(Gtk::Allocation &)
void hide_things()
ControlSlaveUI control_slave_ui
Definition: mixer_strip.h:335
void show_passthru_color()
Gtk::Table bottom_button_table
Definition: mixer_strip.h:202
void deselect_all_processors()
Gtk::Table solo_iso_table
Definition: mixer_strip.h:199
void set_width_enum(Width, void *owner)
bool mixer_owned() const
Definition: mixer_strip.h:126
void set_meter_point(ARDOUR::MeterPoint)
ArdourWidgets::ArdourButton name_button
Definition: mixer_strip.h:234
void set_current_delivery(std::shared_ptr< ARDOUR::Delivery >)
void drop_send()
std::string state_id() const
void paste_processors()
Gtk::Table mute_solo_table
Definition: mixer_strip.h:200
void vca_unassign(std::shared_ptr< ARDOUR::VCA >)
void update_speed_display()
void set_meter_type(ARDOUR::MeterType)
FittedCanvasWidget _tmaster_widget
Definition: mixer_strip.h:231
ArdourWidgets::ArdourButton number_label
Definition: mixer_strip.h:182
std::string longest_label
Definition: mixer_strip.h:221
Gtk::HBox width_hide_box
Definition: mixer_strip.h:183
PBD::ScopedConnectionList _config_connection
Definition: mixer_strip.h:317
void set_selected(bool yn)
ProcessorBox processor_box
Definition: mixer_strip.h:192
Gtk::Menu * send_action_menu
Definition: mixer_strip.h:252
MixerStrip(Mixer_UI &, ARDOUR::Session *, std::shared_ptr< ARDOUR::Route >, bool in_mixer=true)
void add_level_meter_item_type(Gtk::Menu_Helpers::MenuList &, Gtk::RadioMenuItem::Group &, std::string const &, ARDOUR::MeterType)
void route_active_changed()
void parameter_changed(std::string)
bool delete_processors()
gboolean name_button_button_press(GdkEventButton *)
ArdourWidgets::ArdourButton * _loudess_analysis_button
Definition: mixer_strip.h:239
void reset_strip_style()
void ab_plugins()
PBD::ScopedConnection panstate_connection
Definition: mixer_strip.h:255
bool volume_controller_button_pressed(GdkEventButton *)
bool ignore_speed_adjustment
Definition: mixer_strip.h:289
void popup_level_meter_menu(GdkEventButton *)
void * width_owner() const
Definition: mixer_strip.h:105
void init()
PBD::ScopedConnection send_gone_connection
Definition: mixer_strip.h:298
void name_changed()
void connect_to_pan()
void * _width_owner
Definition: mixer_strip.h:178
PluginSelector * plugin_selector()
static PBD::Signal< void(MixerStrip *)> CatchDeletion
Definition: mixer_strip.h:140
void update_panner_choices()
guint32 mode_switch_in_progress
Definition: mixer_strip.h:228
void route_group_changed()
void set_trigger_display(std::shared_ptr< ARDOUR::TriggerBox >)
Gdk::Color color() const
void route_color_changed()
TriggerMaster * _tmaster
Definition: mixer_strip.h:232
void cut_processors()
void set_embedded(bool)
MixerStrip(Mixer_UI &, ARDOUR::Session *, bool in_mixer=true)
ArdourWidgets::ArdourButton * monitor_section_button
Definition: mixer_strip.h:214
static MixerStrip * _entered_mixer_strip
Definition: mixer_strip.h:291
ArdourWidgets::ArdourButton hide_button
Definition: mixer_strip.h:180
bool mixer_strip_leave_event(GdkEventCrossing *)
void set_stuff_from_route()
Gtk::Table rec_mon_table
Definition: mixer_strip.h:198
std::shared_ptr< ARDOUR::Stripable > stripable() const
Definition: mixer_strip.h:101
std::shared_ptr< ARDOUR::Stripable > stripable() const
std::shared_ptr< ARDOUR::Delivery > _current_delivery
Definition: route_ui.h:207
Definition: Window.h:41
Definition: ardour_ui.h:188