Add API to dispatch keyboard events to VST Plugins
[ardour.git] / gtk2_ardour / transport_control_ui.h
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 #ifndef _transport_control_ui_h_
21 #define _transport_control_ui_h_
22
23 #include <gtkmm/box.h>
24
25 #include "pbd/signals.h"
26 #include "ardour/session_handle.h"
27 #include "widgets/ardour_button.h"
28
29 namespace ARDOUR {
30         class Session;
31 }
32
33 class TransportControlProvider;
34
35 class TransportControlUI : public ARDOUR::SessionHandlePtr, public Gtk::HBox
36 {
37 public:
38         TransportControlUI ();
39
40         void setup (TransportControlProvider*);
41         void map_actions ();
42         void set_session (ARDOUR::Session *s);
43
44         ArdourWidgets::ArdourButton& size_button () { return stop_button; }
45
46 protected:
47
48         void parameter_changed (std::string p);
49
50         void blink_rec_enable (bool onoff);
51         void set_loop_sensitivity ();
52         void set_transport_sensitivity (bool);
53         void map_transport_state ();
54         void step_edit_status_change (bool yn);
55
56         bool click_button_scroll (GdkEventScroll* ev);
57
58         ArdourWidgets::ArdourButton roll_button;
59         ArdourWidgets::ArdourButton stop_button;
60         ArdourWidgets::ArdourButton goto_start_button;
61         ArdourWidgets::ArdourButton goto_end_button;
62         ArdourWidgets::ArdourButton auto_loop_button;
63         ArdourWidgets::ArdourButton play_selection_button;
64         ArdourWidgets::ArdourButton rec_button;
65         ArdourWidgets::ArdourButton midi_panic_button;
66         ArdourWidgets::ArdourButton click_button;
67
68 private:
69         PBD::ScopedConnection config_connection;
70 };
71
72 #endif