2 * Copyright (C) 2017-2019 Robin Gareus <robin@gareus.org>
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.
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.
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.
20 #include "ardour_ui.h"
21 #include "transport_control.h"
27 TransportControlProvider::TransportControlProvider ()
28 : roll_controllable (new TransportControllable ("transport roll", TransportControllable::Roll))
29 , stop_controllable (new TransportControllable ("transport stop", TransportControllable::Stop))
30 , goto_start_controllable (new TransportControllable ("transport goto start", TransportControllable::GotoStart))
31 , goto_end_controllable (new TransportControllable ("transport goto end", TransportControllable::GotoEnd))
32 , auto_loop_controllable (new TransportControllable ("transport auto loop", TransportControllable::AutoLoop))
33 , play_selection_controllable (new TransportControllable ("transport play selection", TransportControllable::PlaySelection))
34 , rec_controllable (new TransportControllable ("transport rec-enable", TransportControllable::RecordEnable))
38 TransportControlProvider::TransportControllable::TransportControllable (std::string name, ToggleType tp)
39 : Controllable (name), type(tp)
44 TransportControlProvider::TransportControllable::set_value (double val, PBD::Controllable::GroupControlDisposition /*group_override*/)
47 /* do nothing: these are radio-style actions */
51 const char *action = 0;
61 action = X_("GotoStart");
64 action = X_("GotoEnd");
70 action = X_("PlaySelection");
73 action = X_("Record");
83 Glib::RefPtr<Action> act = ActionManager::get_action ("Transport", action);