2 Copyright (C) 2010 Paul Davis
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #include <gtkmm/box.h>
21 #include <gtkmm/table.h>
23 #include "gtkmm2ext/bindable_button.h"
25 #include "axis_view.h"
26 #include "level_meter.h"
34 class MonitorSection : public RouteUI
37 MonitorSection (ARDOUR::Session*);
40 void set_session (ARDOUR::Session*);
41 static void setup_knob_images ();
43 Gtkmm2ext::TearOff& tearoff() const { return *_tearoff; }
48 Gtk::Table main_table;
49 Gtk::VBox upper_packer;
50 Gtk::VBox lower_packer;
51 Gtkmm2ext::TearOff* _tearoff;
53 struct ChannelButtonSet {
54 BindableToggleButton cut;
55 BindableToggleButton dim;
56 BindableToggleButton solo;
57 BindableToggleButton invert;
62 typedef std::vector<ChannelButtonSet*> ChannelButtons;
63 ChannelButtons _channel_buttons;
65 Gtk::Adjustment gain_adjustment;
66 Gtkmm2ext::MotionFeedback* gain_control;
67 Gtk::Adjustment dim_adjustment;
68 Gtkmm2ext::MotionFeedback* dim_control;
69 Gtk::Adjustment solo_boost_adjustment;
70 Gtkmm2ext::MotionFeedback* solo_boost_control;
71 Gtk::Adjustment solo_cut_adjustment;
72 Gtkmm2ext::MotionFeedback* solo_cut_control;
74 void populate_buttons ();
75 void set_button_names ();
78 boost::shared_ptr<ARDOUR::MonitorProcessor> _monitor;
79 boost::shared_ptr<ARDOUR::Route> _route;
81 static Glib::RefPtr<Gtk::ActionGroup> monitor_actions;
82 void register_actions ();
84 static Glib::RefPtr<Gdk::Pixbuf> big_knob_pixbuf;
85 static Glib::RefPtr<Gdk::Pixbuf> little_knob_pixbuf;
87 void cut_channel (uint32_t);
88 void dim_channel (uint32_t);
89 void solo_channel (uint32_t);
90 void invert_channel (uint32_t);
94 void toggle_exclusive_solo ();
95 void toggle_mute_overrides_solo ();
96 void dim_level_changed ();
97 void solo_boost_changed ();
98 void gain_value_changed ();
100 bool nonlinear_gain_printer (Gtk::SpinButton*);
101 bool linear_gain_printer (Gtk::SpinButton*);
103 Gtk::RadioButtonGroup solo_model_group;
104 Gtk::RadioButton solo_in_place_button;
105 Gtk::RadioButton afl_button;
106 Gtk::RadioButton pfl_button;
107 Gtk::HBox solo_model_box;
109 void solo_use_in_place ();
110 void solo_use_afl ();
111 void solo_use_pfl ();
113 BindableToggleButton cut_all_button;
114 BindableToggleButton dim_all_button;
115 BindableToggleButton mono_button;
116 BindableToggleButton rude_solo_button;
117 BindableToggleButton rude_iso_button;
118 BindableToggleButton rude_audition_button;
119 BindableToggleButton exclusive_solo_button;
120 BindableToggleButton solo_mute_override_button;
122 void do_blink (bool);
123 void solo_blink (bool);
124 void audition_blink (bool);
125 bool cancel_solo (GdkEventButton*);
126 bool cancel_isolate (GdkEventButton*);
127 bool cancel_audition (GdkEventButton*);
128 void solo_cut_changed ();
129 void update_solo_model ();
130 void parameter_changed (std::string);
131 void isolated_changed ();
133 PBD::ScopedConnection config_connection;
134 PBD::ScopedConnectionList control_connections;
136 void assign_controllables ();