Reenable the correct sort column and type when redisplaying regions
[ardour.git] / gtk2_ardour / transport_control.h
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 _gtkardour_transport_control_h_
20 #define _gtkardour_transport_control_h_
21
22 #include <gtkmm/widget.h>
23 #include "pbd/controllable.h"
24
25 /* This is an API implemenetd by AROUR_UI,
26  * and made available to transport-control-UIs
27  */
28 class TransportControlProvider
29 {
30 public:
31         TransportControlProvider ();
32         virtual ~TransportControlProvider () {}
33
34         /* show metronome preferences */
35         virtual bool click_button_clicked (GdkEventButton *) = 0;
36
37         struct TransportControllable : public PBD::Controllable {
38                 enum ToggleType {
39                         Roll = 0,
40                         Stop,
41                         RecordEnable,
42                         GotoStart,
43                         GotoEnd,
44                         AutoLoop,
45                         PlaySelection,
46                 };
47
48                 TransportControllable (std::string name, ToggleType);
49                 void set_value (double, PBD::Controllable::GroupControlDisposition group_override);
50                 double get_value (void) const { return 0; }
51
52                 ToggleType type;
53         };
54
55         boost::shared_ptr<TransportControllable> roll_controllable;
56         boost::shared_ptr<TransportControllable> stop_controllable;
57         boost::shared_ptr<TransportControllable> goto_start_controllable;
58         boost::shared_ptr<TransportControllable> goto_end_controllable;
59         boost::shared_ptr<TransportControllable> auto_loop_controllable;
60         boost::shared_ptr<TransportControllable> play_selection_controllable;
61         boost::shared_ptr<TransportControllable> rec_controllable;
62 };
63
64 #endif