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