light solo button, and do cancel_all_solo() when it is pressed
[ardour.git] / libs / surfaces / push2 / buttons.cc
1 #include "ardour/session.h"
2
3 #include "push2.h"
4
5 using namespace ArdourSurface;
6
7 void
8 Push2::button_play ()
9 {
10         if (session->transport_rolling ()) {
11                 transport_stop ();
12         } else {
13                 transport_play ();
14         }
15 }
16
17 void
18 Push2::button_recenable ()
19 {
20         rec_enable_toggle ();
21 }
22
23 void
24 Push2::button_up ()
25 {
26         scroll_up_1_track ();
27 }
28
29 void
30 Push2::button_down ()
31 {
32         scroll_dn_1_track ();
33 }
34
35 void
36 Push2::button_right ()
37 {
38         ScrollTimeline (0.75);
39 }
40
41 void
42 Push2::button_left ()
43 {
44         ScrollTimeline (-0.75);
45 }
46
47 void
48 Push2::button_repeat ()
49 {
50         loop_toggle ();
51 }
52
53 void
54 Push2::button_metronome ()
55 {
56         toggle_click ();
57 }
58
59 void
60 Push2::button_solo ()
61 {
62         cancel_all_solo ();
63 }