2 Copyright (C) 2014 Waves Audio Ltd.
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 #ifndef __tracks_master_bus_ui_h__
21 #define __tracks_master_bus_ui_h__
26 #include <gtkmm/table.h>
27 #include <gtkmm/button.h>
28 #include <gtkmm/box.h>
29 #include <gtkmm/menu.h>
30 #include <gtkmm/menuitem.h>
31 #include <gtkmm/radiomenuitem.h>
32 #include <gtkmm/checkmenuitem.h>
33 #include <gtkmm/adjustment.h>
35 #include <gtkmm2ext/selector.h>
36 #include <gtkmm2ext/slider_controller.h>
38 #include "ardour/playlist.h"
39 #include "ardour/types.h"
40 #include "ardour/route_group.h"
44 #include "gain_meter.h"
46 class MasterBusUI : public Gtk::EventBox, public WavesUI
49 MasterBusUI (ARDOUR::Session*, PublicEditor&);
50 void init(ARDOUR::Session* session);
51 virtual ~MasterBusUI ();
54 void set_route (boost::shared_ptr<ARDOUR::Route>);
55 void update_master_bus_selection();
56 static PBD::Signal1<void,MasterBusUI*> CatchDeletion;
59 static int __meter_width;
64 void meter_configuration_changed (ARDOUR::ChanCount);
65 void reset_peak_display ();
66 void reset_route_peak_display (ARDOUR::Route* route);
67 void reset_group_peak_display (ARDOUR::RouteGroup* group);
68 void on_peak_display_button (WavesButton*);
69 void on_master_mute_button (WavesButton*);
70 void on_clear_solo_button (WavesButton*);
71 void on_global_rec_button (WavesButton*);
72 void on_output_connection_mode_changed ();
73 bool on_level_meter_button_press (GdkEventButton*);
74 bool on_master_event_box_button_release (GdkEventButton*);
76 PBD::ScopedConnection _route_meter_connection;
79 void connect_route_state_signals(ARDOUR::RouteList& tracks);
82 // GLOBAL RECORD staff
83 PBD::ScopedConnectionList _route_state_connections;
84 PBD::ScopedConnectionList _session_connections;
86 void record_state_changed ();
87 bool check_all_tracks_are_record_armed ();
90 void route_mute_state_changed (void* );
91 bool check_all_tracks_are_muted();
94 void solo_blink (bool onoff);
95 bool exists_soloed_track();
97 boost::shared_ptr<ARDOUR::Route> _route;
98 PBD::ScopedConnection _mode_connection;
99 PBD::ScopedConnection _output_mode_connection;
101 Gtk::Box& _level_meter_home;
102 LevelMeterHBox _level_meter;
103 WavesButton& _peak_display_button;
104 WavesButton& _master_mute_button;
105 WavesButton& _clear_solo_button;
106 WavesButton& _global_rec_button;
107 Gtk::EventBox& _no_peak_display_box;
108 Gtk::Image& _master_bus_multi_out_mode_icon;
109 Gtk::Container& _master_event_box;
111 PublicEditor& _editor;
114 bool _ignore_mute_upadte;
117 #endif /* __tracks_master_bus_ui_h__ */