diff options
author | Robin Gareus <robin@gareus.org> | 2017-12-22 20:20:59 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2017-12-22 22:15:50 +0100 |
commit | aab787f686e6287a06ba94ed8c87b524c4690f0f (patch) | |
tree | 274012a8cb968252dff99735c2be9b4e59a7a988 /gtk2_ardour/transport_control_ui.h | |
parent | 34a926fc510ebe356d8212ec3d0070124e16eb08 (diff) |
Separate and consolidate Transport-Control-UI code
Diffstat (limited to 'gtk2_ardour/transport_control_ui.h')
-rw-r--r-- | gtk2_ardour/transport_control_ui.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/gtk2_ardour/transport_control_ui.h b/gtk2_ardour/transport_control_ui.h new file mode 100644 index 0000000000..97476ea07f --- /dev/null +++ b/gtk2_ardour/transport_control_ui.h @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2017 Robin Gareus <robin@gareus.org> + * Copyright (C) 2013 Paul Davis + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef _transport_control_ui_h_ +#define _transport_control_ui_h_ + +#include <gtkmm/box.h> + +#include "pbd/signals.h" +#include "ardour/session_handle.h" +#include "widgets/ardour_button.h" + +namespace ARDOUR { + class Session; +} + +class TransportControlProvider; + +class TransportControlUI : public ARDOUR::SessionHandlePtr, public Gtk::HBox +{ +public: + TransportControlUI (); + + void setup (TransportControlProvider*); + void map_actions (); + void set_session (ARDOUR::Session *s); + + ArdourWidgets::ArdourButton& size_button () { return stop_button; } + +protected: + + void parameter_changed (std::string p); + + void blink_rec_enable (bool onoff); + void set_loop_sensitivity (); + void set_transport_sensitivity (bool); + void map_transport_state (); + void step_edit_status_change (bool yn); + + bool click_button_scroll (GdkEventScroll* ev); + + ArdourWidgets::ArdourButton roll_button; + ArdourWidgets::ArdourButton stop_button; + ArdourWidgets::ArdourButton goto_start_button; + ArdourWidgets::ArdourButton goto_end_button; + ArdourWidgets::ArdourButton auto_loop_button; + ArdourWidgets::ArdourButton play_selection_button; + ArdourWidgets::ArdourButton rec_button; + ArdourWidgets::ArdourButton midi_panic_button; + ArdourWidgets::ArdourButton click_button; + +private: + PBD::ScopedConnection config_connection; +}; + +#endif |