Optimize automation-event process splitting
[ardour.git] / gtk2_ardour / big_transport_window.cc
1 /*
2  * Copyright (C) 2017 Robin Gareus <robin@gareus.org>
3  * Copyright (C) 2013 Paul Davis
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18  */
19
20 #include <gtkmm/box.h>
21
22 #include "ardour_ui.h"
23 #include "big_transport_window.h"
24 #include "utils.h"
25
26 #include "pbd/i18n.h"
27
28 using namespace Glib;
29 using namespace Gtk;
30
31 BigTransportWindow::BigTransportWindow ()
32         : ArdourWindow (_("Transport Controls"))
33 {
34         transport_ctrl.setup (ARDOUR_UI::instance ());
35         transport_ctrl.map_actions ();
36
37         set_keep_above (true);
38         VBox* vbox = manage (new VBox);
39         vbox->pack_start (transport_ctrl, true, true);
40         add (*vbox);
41         vbox->show_all();
42 }
43
44 void
45 BigTransportWindow::on_unmap ()
46 {
47         ArdourWindow::on_unmap ();
48         ARDOUR_UI::instance()->reset_focus (this);
49 }
50
51 bool
52 BigTransportWindow::on_key_press_event (GdkEventKey* ev)
53 {
54         return ARDOUR_UI_UTILS::relay_key_press (ev, this);
55 }