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 "ardour_button.h"
26 #include "ardour_knob.h"
27 #include "ardour_display.h"
28 #include "axis_view.h"
29 #include "level_meter.h"
37 class VolumeController;
39 class MonitorSection : public RouteUI
42 MonitorSection (ARDOUR::Session*);
45 void set_session (ARDOUR::Session*);
46 static void setup_knob_images ();
48 Gtkmm2ext::TearOff& tearoff() const { return *_tearoff; }
50 std::string state_id() const;
55 Gtk::VBox upper_packer;
56 Gtk::VBox lower_packer;
57 Gtkmm2ext::TearOff* _tearoff;
59 Gtk::HBox channel_table_packer;
60 Gtk::HBox table_hpacker;
61 Gtk::Table channel_table;
62 Gtk::Table channel_table_header;
63 Gtk::ScrolledWindow channel_table_scroller;
64 Gtk::Viewport channel_table_viewport;
65 Glib::RefPtr<Gtk::SizeGroup> channel_size_group;
67 struct ChannelButtonSet {
76 typedef std::vector<ChannelButtonSet*> ChannelButtons;
77 ChannelButtons _channel_buttons;
79 ArdourKnob* gain_control;
80 ArdourKnob* dim_control;
81 ArdourKnob* solo_boost_control;
82 ArdourKnob* solo_cut_control;
84 ArdourDisplay* gain_display;
85 ArdourDisplay* dim_display;
86 ArdourDisplay* solo_boost_display;
87 ArdourDisplay* solo_cut_display;
89 void populate_buttons ();
92 boost::shared_ptr<ARDOUR::MonitorProcessor> _monitor;
93 boost::shared_ptr<ARDOUR::Route> _route;
95 static Glib::RefPtr<Gtk::ActionGroup> monitor_actions;
96 void register_actions ();
98 static Glib::RefPtr<Gdk::Pixbuf> big_knob_pixbuf;
99 static Glib::RefPtr<Gdk::Pixbuf> little_knob_pixbuf;
101 void cut_channel (uint32_t);
102 void dim_channel (uint32_t);
103 void solo_channel (uint32_t);
104 void invert_channel (uint32_t);
108 void toggle_exclusive_solo ();
109 void set_button_names () {}
110 void toggle_mute_overrides_solo ();
111 void dim_level_changed ();
112 void solo_boost_changed ();
113 void gain_value_changed ();
115 ArdourButton solo_in_place_button;
116 ArdourButton afl_button;
117 ArdourButton pfl_button;
118 Gtk::HBox solo_model_box;
120 void solo_use_in_place ();
121 void solo_use_afl ();
122 void solo_use_pfl ();
124 ArdourButton cut_all_button;
125 ArdourButton dim_all_button;
126 ArdourButton mono_button;
127 ArdourButton rude_solo_button;
128 ArdourButton rude_iso_button;
129 ArdourButton rude_audition_button;
130 ArdourButton exclusive_solo_button;
131 ArdourButton solo_mute_override_button;
133 void do_blink (bool);
134 void solo_blink (bool);
135 void audition_blink (bool);
136 bool cancel_solo (GdkEventButton*);
137 bool cancel_isolate (GdkEventButton*);
138 bool cancel_audition (GdkEventButton*);
139 void update_solo_model ();
140 void parameter_changed (std::string);
141 void isolated_changed ();
143 PBD::ScopedConnection config_connection;
144 PBD::ScopedConnectionList control_connections;
146 bool _inhibit_solo_model_update;
148 void assign_controllables ();