VKeybd: Pass on primary (Ctrl/Cmd) shortcuts
[ardour.git] / gtk2_ardour / big_transport_window.cc
1 /*
2  * Copyright (C) 2017 Robin Gareus <robin@gareus.org>
3  *
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.
8  *
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.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18
19 #include <gtkmm/box.h>
20
21 #include "ardour_ui.h"
22 #include "big_transport_window.h"
23 #include "utils.h"
24
25 #include "pbd/i18n.h"
26
27 using namespace Glib;
28 using namespace Gtk;
29
30 BigTransportWindow::BigTransportWindow ()
31         : ArdourWindow (_("Transport Controls"))
32 {
33         transport_ctrl.setup (ARDOUR_UI::instance ());
34         transport_ctrl.map_actions ();
35
36         set_keep_above (true);
37         VBox* vbox = manage (new VBox);
38         vbox->pack_start (transport_ctrl, true, true);
39         add (*vbox);
40         vbox->show_all();
41 }
42
43 void
44 BigTransportWindow::on_unmap ()
45 {
46         ArdourWindow::on_unmap ();
47         ARDOUR_UI::instance()->reset_focus (this);
48 }
49
50 bool
51 BigTransportWindow::on_key_press_event (GdkEventKey* ev)
52 {
53         return ARDOUR_UI_UTILS::relay_key_press (ev, this);
54 }