2 * Copyright (C) 2006-2010 David Robillard <d@drobilla.net>
3 * Copyright (C) 2007-2017 Paul Davis <paul@linuxaudiosystems.com>
4 * Copyright (C) 2010 Carl Hetherington <carl@carlh.net>
5 * Copyright (C) 2015 Robin Gareus <robin@gareus.org>
6 * Copyright (C) 2016 Ben Loftis <ben@harrisonconsoles.com>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #ifndef __ardour_basic_ui_h__
24 #define __ardour_basic_ui_h__
29 #include "pbd/signals.h"
31 #include "ardour/types.h"
32 #include "ardour/presentation_info.h"
34 #include "temporal/time.h"
36 #include "control_protocol/visibility.h"
44 class LIBCONTROLCP_API BasicUI {
46 BasicUI (ARDOUR::Session&);
49 void add_marker (const std::string& = std::string());
50 void remove_marker_at_playhead ();
55 void register_thread (std::string name);
57 /* transport control */
60 void loop_location (samplepos_t start, samplepos_t end);
61 void access_action ( std::string action_path );
62 static PBD::Signal2<void,std::string,std::string> AccessAction;
64 void goto_start (bool and_roll = false);
68 void transport_stop ();
69 void transport_play (bool jump_back = false);
70 void set_transport_speed (double speed);
71 double get_transport_speed ();
73 void jump_by_seconds (double sec, ARDOUR::LocateTransportDisposition ltd = ARDOUR::DoTheRightThing);
74 void jump_by_bars (double bars, ARDOUR::LocateTransportDisposition ltd = ARDOUR::DoTheRightThing);
75 void jump_by_beats (double beats, ARDOUR::LocateTransportDisposition ltd = ARDOUR::DoTheRightThing);
77 ARDOUR::samplepos_t transport_sample ();
78 void locate (ARDOUR::samplepos_t sample, ARDOUR::LocateTransportDisposition ltd);
79 void locate (ARDOUR::samplepos_t sample, bool);
88 void toggle_punch_in ();
89 void toggle_punch_out ();
97 void toggle_monitor_mute();
98 void toggle_monitor_dim();
99 void toggle_monitor_mono();
101 void cancel_all_solo ();
103 void quick_snapshot_stay ();
104 void quick_snapshot_switch ();
106 void toggle_roll(bool roll_out_of_bounded_mode=true); //this provides the same operation as the "spacebar", it's a lot smarter than "play".
110 void set_punch_range();
111 void set_loop_range();
112 void set_session_range();
114 void set_record_enable (bool yn);
115 bool get_record_enabled ();
117 //editor visibility stuff (why do we have to make explicit numbers here? because "gui actions" don't accept args
122 void fit_16_tracks();
123 void fit_32_tracks();
124 void fit_all_tracks();
132 void zoom_to_session();
133 void temporal_zoom_in();
134 void temporal_zoom_out();
136 void scroll_up_1_track();
137 void scroll_dn_1_track();
138 void scroll_up_1_page();
139 void scroll_dn_1_page();
141 void rec_enable_toggle ();
142 void toggle_all_rec_enables ();
144 void all_tracks_rec_in ();
145 void all_tracks_rec_out ();
147 void goto_nth_marker (int n);
149 ARDOUR::samplecnt_t timecode_frames_per_hour ();
151 void timecode_time (samplepos_t where, Timecode::Time&);
152 void timecode_to_sample (Timecode::Time& timecode, samplepos_t & sample, bool use_offset, bool use_subframes) const;
153 void sample_to_timecode (samplepos_t sample, Timecode::Time& timecode, bool use_offset, bool use_subframes) const;
155 bool stop_button_onoff() const;
156 bool play_button_onoff() const;
157 bool ffwd_button_onoff() const;
158 bool rewind_button_onoff() const;
159 bool loop_button_onoff() const;
163 ARDOUR::Session* session;
166 #endif /* __ardour_basic_ui_h__ */