1 /*
2 * Copyright (C) 2005-2007 Taybin Rutkin <taybin@taybin.com>
3 * Copyright (C) 2006-2018 Paul Davis <paul@linuxaudiosystems.com>
4 * Copyright (C) 2009-2011 David Robillard <d@drobilla.net>
5 * Copyright (C) 2010-2012 Carl Hetherington <carl@carlh.net>
6 * Copyright (C) 2013-2015 Robin Gareus <robin@gareus.org>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 */
22
23 /* This file contains any ARDOUR_UI methods that require knowledge of
24 the mixer, and exists so that no compilation dependency exists
25 between the main ARDOUR_UI modules and the mixer classes. This
26 is to cut down on the nasty compile times for these classes.
27 */
28
29 #include "gtkmm2ext/keyboard.h"
30
31 #include "actions.h"
32 #include "ardour_ui.h"
33 #include "meterbridge.h"
34 #include "mixer_ui.h"
35
36 #include "pbd/i18n.h"
37
38 using namespace ARDOUR;
39 using namespace PBD;
40
41 int
create_mixer()42 ARDOUR_UI::create_mixer ()
43
44 {
45 try {
46 mixer = Mixer_UI::instance ();
47 mixer->StateChange.connect (sigc::mem_fun (*this, &ARDOUR_UI::tabbable_state_change));
48 }
49
50 catch (failed_constructor& err) {
51 return -1;
52 }
53
54 // mixer->signal_event().connect (sigc::bind (sigc::ptr_fun (&Gtkmm2ext::Keyboard::catch_user_event_for_pre_dialog_focus), mixer));
55
56 return 0;
57 }
58
59
60 int
create_meterbridge()61 ARDOUR_UI::create_meterbridge ()
62
63 {
64 try {
65 meterbridge = Meterbridge::instance ();
66 }
67
68 catch (failed_constructor& err) {
69 return -1;
70 }
71
72 return 0;
73 }
74
75