mackie: semi-working Sends subview mode
[ardour.git] / libs / surfaces / mackie / mcp_buttons.cc
1 /*
2         Copyright (C) 2006,2007 John Anderson
3         Copyright (C) 2012 Paul Davis
4
5         This program is free software; you can redistribute it and/or modify
6         it under the terms of the GNU General Public License as published by
7         the Free Software Foundation; either version 2 of the License, or
8         (at your option) any later version.
9
10         This program is distributed in the hope that it will be useful,
11         but WITHOUT ANY WARRANTY; without even the implied warranty of
12         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13         GNU General Public License for more details.
14
15         You should have received a copy of the GNU General Public License
16         along with this program; if not, write to the Free Software
17         Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 */
19
20 #include <algorithm>
21
22 #include "pbd/memento_command.h"
23
24 #include "ardour/debug.h"
25 #include "ardour/profile.h"
26 #include "ardour/session.h"
27 #include "ardour/route.h"
28 #include "ardour/location.h"
29 #include "ardour/rc_configuration.h"
30
31 #include "mackie_control_protocol.h"
32 #include "surface.h"
33 #include "fader.h"
34
35 #include "i18n.h"
36
37 /* handlers for all buttons, broken into a separate file to avoid clutter in
38  * mackie_control_protocol.cc
39  */
40
41 using std::string;
42 using namespace ARDOUR;
43 using namespace PBD;
44 using namespace ArdourSurface;
45 using namespace Mackie;
46
47 LedState
48 MackieControlProtocol::shift_press (Button &)
49 {
50         _modifier_state |= MODIFIER_SHIFT;
51         return on;
52 }
53 LedState
54 MackieControlProtocol::shift_release (Button &)
55 {
56         _modifier_state &= ~MODIFIER_SHIFT;
57         return off;
58 }
59 LedState
60 MackieControlProtocol::option_press (Button &)
61 {
62         _modifier_state |= MODIFIER_OPTION;
63         return on;
64 }
65 LedState
66 MackieControlProtocol::option_release (Button &)
67 {
68         _modifier_state &= ~MODIFIER_OPTION;
69         return off;
70 }
71 LedState
72 MackieControlProtocol::control_press (Button &)
73 {
74         _modifier_state |= MODIFIER_CONTROL;
75         DEBUG_TRACE (DEBUG::MackieControl, string_compose ("CONTROL Press: modifier state now set to %1\n", _modifier_state));
76         return on;
77 }
78 LedState
79 MackieControlProtocol::control_release (Button &)
80 {
81         _modifier_state &= ~MODIFIER_CONTROL;
82         DEBUG_TRACE (DEBUG::MackieControl, string_compose ("CONTROL Release: modifier state now set to %1\n", _modifier_state));
83         return off;
84 }
85 LedState
86 MackieControlProtocol::cmd_alt_press (Button &)
87 {
88         _modifier_state |= MODIFIER_CMDALT;
89         return on;
90 }
91 LedState
92 MackieControlProtocol::cmd_alt_release (Button &)
93 {
94         _modifier_state &= ~MODIFIER_CMDALT;
95         return off;
96 }
97
98 LedState
99 MackieControlProtocol::left_press (Button &)
100 {
101         if (_subview_mode != None) {
102                 return none;
103         }
104
105         Sorted sorted = get_sorted_routes();
106         uint32_t strip_cnt = n_strips ();
107
108         DEBUG_TRACE (DEBUG::MackieControl, string_compose ("bank left with current initial = %1 nstrips = %2 tracks/busses = %3\n",
109                                                            _current_initial_bank, strip_cnt, sorted.size()));
110         if (_current_initial_bank > 0) {
111                 switch_banks ((_current_initial_bank - 1) / strip_cnt * strip_cnt);
112         } else {
113                 switch_banks (0);
114         }
115
116
117         return on;
118 }
119
120 LedState
121 MackieControlProtocol::left_release (Button &)
122 {
123         return off;
124 }
125
126 LedState
127 MackieControlProtocol::right_press (Button &)
128 {
129         if (_subview_mode != None) {
130                 return none;
131         }
132
133         Sorted sorted = get_sorted_routes();
134         uint32_t strip_cnt = n_strips();
135         uint32_t route_cnt = sorted.size();
136         uint32_t max_bank = route_cnt / strip_cnt * strip_cnt;
137
138
139         DEBUG_TRACE (DEBUG::MackieControl, string_compose ("bank right with current initial = %1 nstrips = %2 tracks/busses = %3\n",
140                                                            _current_initial_bank, strip_cnt, route_cnt));
141
142         if (_current_initial_bank < max_bank) {
143                 uint32_t new_initial = (_current_initial_bank / strip_cnt * strip_cnt) + strip_cnt;
144
145                 switch_banks (new_initial);
146         } else {
147                 switch_banks (max_bank);
148         }
149
150         return on;
151 }
152
153 LedState
154 MackieControlProtocol::right_release (Button &)
155 {
156         if (zoom_mode()) {
157
158         }
159
160         return off;
161 }
162
163 LedState
164 MackieControlProtocol::cursor_left_press (Button& )
165 {
166         if (zoom_mode()) {
167
168                 if (main_modifier_state() & MODIFIER_OPTION) {
169                         /* reset selected tracks to default vertical zoom */
170                 } else {
171                         ZoomOut (); /* EMIT SIGNAL */
172                 }
173         } else {
174                 float page_fraction;
175                 if (main_modifier_state() == MODIFIER_CONTROL) {
176                         page_fraction = 1.0;
177                 } else if (main_modifier_state() == MODIFIER_OPTION) {
178                         page_fraction = 0.1;
179                 } else if (main_modifier_state() == MODIFIER_SHIFT) {
180                         page_fraction = 2.0;
181                 } else {
182                         page_fraction = 0.25;
183                 }
184
185                 ScrollTimeline (-page_fraction);
186         }
187
188         return off;
189 }
190
191 LedState
192 MackieControlProtocol::cursor_left_release (Button&)
193 {
194         return off;
195 }
196
197 LedState
198 MackieControlProtocol::cursor_right_press (Button& )
199 {
200         if (zoom_mode()) {
201
202                 if (main_modifier_state() & MODIFIER_OPTION) {
203                         /* reset selected tracks to default vertical zoom */
204                 } else {
205                         ZoomIn (); /* EMIT SIGNAL */
206                 }
207         } else {
208                 float page_fraction;
209                 if (main_modifier_state() == MODIFIER_CONTROL) {
210                         page_fraction = 1.0;
211                 } else if (main_modifier_state() == MODIFIER_OPTION) {
212                         page_fraction = 0.1;
213                 } else if (main_modifier_state() == MODIFIER_SHIFT) {
214                         page_fraction = 2.0;
215                 } else {
216                         page_fraction = 0.25;
217                 }
218
219                 ScrollTimeline (page_fraction);
220         }
221
222         return off;
223 }
224
225 LedState
226 MackieControlProtocol::cursor_right_release (Button&)
227 {
228         return off;
229 }
230
231 LedState
232 MackieControlProtocol::cursor_up_press (Button&)
233 {
234         if (zoom_mode()) {
235
236                 if (main_modifier_state() & MODIFIER_CONTROL) {
237                         VerticalZoomInSelected (); /* EMIT SIGNAL */
238                 } else {
239                         VerticalZoomInAll (); /* EMIT SIGNAL */
240                 }
241         } else {
242                 StepTracksUp (); /* EMIT SIGNAL */
243         }
244         return off;
245 }
246
247 LedState
248 MackieControlProtocol::cursor_up_release (Button&)
249 {
250         return off;
251 }
252
253 LedState
254 MackieControlProtocol::cursor_down_press (Button&)
255 {
256         if (zoom_mode()) {
257                 if (main_modifier_state() & MODIFIER_OPTION) {
258                         VerticalZoomOutSelected (); /* EMIT SIGNAL */
259                 } else {
260                         VerticalZoomOutAll (); /* EMIT SIGNAL */
261                 }
262         } else {
263                 StepTracksDown (); /* EMIT SIGNAL */
264         }
265         return off;
266 }
267
268 LedState
269 MackieControlProtocol::cursor_down_release (Button&)
270 {
271         return off;
272 }
273
274 LedState
275 MackieControlProtocol::channel_left_press (Button &)
276 {
277         if (_subview_mode != None) {
278                 return none;
279         }
280         Sorted sorted = get_sorted_routes();
281         if (sorted.size() > n_strips()) {
282                 prev_track();
283                 return on;
284         } else {
285                 return flashing;
286         }
287 }
288
289 LedState
290 MackieControlProtocol::channel_left_release (Button &)
291 {
292         return off;
293 }
294
295 LedState
296 MackieControlProtocol::channel_right_press (Button &)
297 {
298         if (_subview_mode != None) {
299                 return none;
300         }
301         Sorted sorted = get_sorted_routes();
302         if (sorted.size() > n_strips()) {
303                 next_track();
304                 return on;
305         } else {
306                 return flashing;
307         }
308 }
309
310 LedState
311 MackieControlProtocol::channel_right_release (Button &)
312 {
313         return off;
314 }
315
316 Mackie::LedState
317 MackieControlProtocol::zoom_press (Mackie::Button &)
318 {
319         return none;
320 }
321
322 Mackie::LedState
323 MackieControlProtocol::zoom_release (Mackie::Button &)
324 {
325         if (_modifier_state & MODIFIER_ZOOM) {
326                 _modifier_state &= ~MODIFIER_ZOOM;
327         } else {
328                 _modifier_state |= MODIFIER_ZOOM;
329         }
330
331         return (zoom_mode() ? on : off);
332 }
333
334 Mackie::LedState
335 MackieControlProtocol::scrub_press (Mackie::Button &)
336 {
337         if (!surfaces.empty()) {
338                 // surfaces.front()->next_jog_mode ();
339                 _master_surface->next_jog_mode ();
340         }
341         return none;
342 }
343
344 Mackie::LedState
345 MackieControlProtocol::scrub_release (Mackie::Button &)
346 {
347         return none;
348 }
349
350 LedState
351 MackieControlProtocol::undo_press (Button&)
352 {
353         if (main_modifier_state() & MODIFIER_SHIFT) {
354                 Redo(); /* EMIT SIGNAL */
355         } else {
356                 Undo(); /* EMIT SIGNAL */
357         }
358         return off;
359 }
360
361 LedState
362 MackieControlProtocol::undo_release (Button&)
363 {
364         return off;
365 }
366
367 LedState
368 MackieControlProtocol::drop_press (Button &)
369 {
370         session->remove_last_capture();
371         return on;
372 }
373
374 LedState
375 MackieControlProtocol::drop_release (Button &)
376 {
377         return off;
378 }
379
380 LedState
381 MackieControlProtocol::save_press (Button &)
382 {
383         session->save_state ("");
384         return on;
385 }
386
387 LedState
388 MackieControlProtocol::save_release (Button &)
389 {
390         return off;
391 }
392
393 LedState
394 MackieControlProtocol::timecode_beats_press (Button &)
395 {
396         switch (_timecode_type) {
397         case ARDOUR::AnyTime::BBT:
398                 _timecode_type = ARDOUR::AnyTime::Timecode;
399                 break;
400         case ARDOUR::AnyTime::Timecode:
401                 _timecode_type = ARDOUR::AnyTime::BBT;
402                 break;
403         default:
404                 return off;
405         }
406
407         update_timecode_beats_led();
408
409         return on;
410 }
411
412 LedState
413 MackieControlProtocol::timecode_beats_release (Button &)
414 {
415         return off;
416 }
417
418 /////////////////////////////////////
419 // Functions
420 /////////////////////////////////////
421 LedState
422 MackieControlProtocol::marker_press (Button &)
423 {
424         string markername;
425
426         /* Don't add another mark if one exists within 1/100th of a second of
427          * the current position and we're not rolling.
428          */
429
430
431         framepos_t where = session->audible_frame();
432
433         if (session->transport_stopped() && session->locations()->mark_at (where, session->frame_rate() / 100.0)) {
434                 return off;
435         }
436
437         session->locations()->next_available_name (markername,"marker");
438         add_marker (markername);
439
440         return on;
441 }
442
443 LedState
444 MackieControlProtocol::marker_release (Button &)
445 {
446         return off;
447 }
448
449 /////////////////////////////////////
450 // Transport Buttons
451 /////////////////////////////////////
452
453 LedState
454 MackieControlProtocol::stop_press (Button &)
455 {
456         transport_stop ();
457         return on;
458 }
459
460 LedState
461 MackieControlProtocol::stop_release (Button &)
462 {
463         return session->transport_stopped();
464 }
465
466 LedState
467 MackieControlProtocol::play_press (Button &)
468 {
469         /* if we're already rolling at normal speed, and we're pressed
470            again, jump back to where we started last time
471         */
472
473         transport_play (session->transport_speed() == 1.0);
474         return none;
475 }
476
477 LedState
478 MackieControlProtocol::play_release (Button &)
479 {
480         return none;
481 }
482
483 LedState
484 MackieControlProtocol::record_press (Button &)
485 {
486         rec_enable_toggle ();
487         return none;
488 }
489
490 LedState
491 MackieControlProtocol::record_release (Button &)
492 {
493         return none;
494 }
495
496 LedState
497 MackieControlProtocol::rewind_press (Button &)
498 {
499         if (main_modifier_state() == MODIFIER_CONTROL) {
500                 goto_start ();
501         } else {
502                 rewind ();
503         }
504         return none;
505 }
506
507 LedState
508 MackieControlProtocol::rewind_release (Button &)
509 {
510         return none;
511 }
512
513 LedState
514 MackieControlProtocol::ffwd_press (Button &)
515 {
516         if (main_modifier_state() == MODIFIER_CONTROL) {
517                 goto_end();
518         } else {
519                 ffwd ();
520         }
521         return none;
522 }
523
524 LedState
525 MackieControlProtocol::ffwd_release (Button &)
526 {
527         return none;
528 }
529
530 LedState
531 MackieControlProtocol::loop_press (Button &)
532 {
533         bool was_on = session->get_play_loop();
534         session->request_play_loop (!was_on);
535         return was_on ? off : on;
536 }
537
538 LedState
539 MackieControlProtocol::loop_release (Button &)
540 {
541         return none;
542 }
543
544 LedState
545 MackieControlProtocol::clicking_press (Button &)
546 {
547         bool state = !Config->get_clicking();
548         Config->set_clicking (state);
549         return state;
550 }
551
552 LedState
553 MackieControlProtocol::clicking_release (Button &)
554 {
555         return Config->get_clicking();
556 }
557
558 LedState
559 MackieControlProtocol::enter_press (Button &)
560 {
561         Enter(); /* EMIT SIGNAL */
562         return off;
563 }
564
565 LedState
566 MackieControlProtocol::enter_release (Button &)
567 {
568         return off;
569 }
570
571 LedState
572 MackieControlProtocol::bank_release (Button& b, uint32_t basic_bank_num)
573 {
574         if (_subview_mode != None) {
575                 return none;
576         }
577
578         uint32_t bank_num = basic_bank_num;
579
580         if (b.long_press_count() > 0) {
581                 bank_num = 8 + basic_bank_num;
582         }
583
584         switch_banks (n_strips() * bank_num);
585
586         return on;
587 }
588
589 LedState
590 MackieControlProtocol::F1_press (Button &b)
591 {
592         return off;
593 }
594 LedState
595 MackieControlProtocol::F1_release (Button &b)
596 {
597         return bank_release (b, 0);
598 }
599 LedState
600 MackieControlProtocol::F2_press (Button &)
601 {
602         return off;
603 }
604 LedState
605 MackieControlProtocol::F2_release (Button &b)
606 {
607         return bank_release (b, 1);
608 }
609 LedState
610 MackieControlProtocol::F3_press (Button &)
611 {
612         return off;
613 }
614 LedState
615 MackieControlProtocol::F3_release (Button &b)
616 {
617         return bank_release (b, 2);
618 }
619 LedState
620 MackieControlProtocol::F4_press (Button &)
621 {
622         return off;
623 }
624 LedState
625 MackieControlProtocol::F4_release (Button &b)
626 {
627         return bank_release (b, 3);
628 }
629 LedState
630 MackieControlProtocol::F5_press (Button &)
631 {
632         return off;
633 }
634 LedState
635 MackieControlProtocol::F5_release (Button &)
636 {
637         return off;
638 }
639 LedState
640 MackieControlProtocol::F6_press (Button &)
641 {
642         return off;
643 }
644 LedState
645 MackieControlProtocol::F6_release (Button &)
646 {
647         return off;
648 }
649 LedState
650 MackieControlProtocol::F7_press (Button &)
651 {
652         return off;
653 }
654 LedState
655 MackieControlProtocol::F7_release (Button &)
656 {
657         return off;
658 }
659 LedState
660 MackieControlProtocol::F8_press (Button &)
661 {
662         CloseDialog (); /* EMIT SIGNAL */
663         return off;
664 }
665 LedState
666 MackieControlProtocol::F8_release (Button &)
667 {
668         return off;
669 }
670
671 /* UNIMPLEMENTED */
672
673 LedState
674 MackieControlProtocol::pan_press (Button &)
675 {
676         set_pot_mode (Pan);
677         return none;
678 }
679 LedState
680 MackieControlProtocol::pan_release (Button &)
681 {
682         return none;
683 }
684 LedState
685 MackieControlProtocol::plugin_press (Button &)
686 {
687         return off;
688 }
689 LedState
690 MackieControlProtocol::plugin_release (Button &)
691 {
692         set_view_mode (Plugins);
693         return none; /* LED state set by set_view_mode */
694 }
695 LedState
696 MackieControlProtocol::eq_press (Button &)
697 {
698         if (Profile->get_mixbus()) {
699                 boost::shared_ptr<Route> r = first_selected_route ();
700                 if (r && r->eq_band_cnt() > 0) {
701                         set_subview_mode (EQ, r);
702                         return none; /* led state handled by set_subview_mode() */
703                 }
704         }
705         return none;
706
707 }
708 LedState
709 MackieControlProtocol::eq_release (Button &)
710 {
711         return none;
712 }
713 LedState
714 MackieControlProtocol::dyn_press (Button &)
715 {
716         if (Profile->get_mixbus()) {
717                 boost::shared_ptr<Route> r = first_selected_route ();
718
719                 if (r) {
720                         set_subview_mode (Dynamics, r);
721                         return none; /* led state handled by set_subview_mode() */
722                 }
723         }
724
725         return none;
726 }
727
728 LedState
729 MackieControlProtocol::dyn_release (Button &)
730 {
731         return none;
732 }
733 LedState
734 MackieControlProtocol::flip_press (Button &)
735 {
736         if (_flip_mode != Normal) {
737                 set_flip_mode (Normal);
738         } else {
739                 set_flip_mode (Mirror);
740         }
741         return ((_flip_mode != Normal) ? on : off);
742 }
743 LedState
744 MackieControlProtocol::flip_release (Button &)
745 {
746         return none;
747 }
748 LedState
749 MackieControlProtocol::name_value_press (Button &)
750 {
751         return off;
752 }
753 LedState
754 MackieControlProtocol::name_value_release (Button &)
755 {
756         return off;
757 }
758 LedState
759 MackieControlProtocol::touch_press (Button &)
760 {
761         return off;
762 }
763 LedState
764 MackieControlProtocol::touch_release (Button &)
765 {
766         return off;
767 }
768 LedState
769 MackieControlProtocol::cancel_press (Button &)
770 {
771         return off;
772 }
773 LedState
774 MackieControlProtocol::cancel_release (Button &)
775 {
776         return off;
777 }
778 LedState
779 MackieControlProtocol::user_a_press (Button &)
780 {
781         transport_play (session->transport_speed() == 1.0);
782         return off;
783 }
784 LedState
785 MackieControlProtocol::user_a_release (Button &)
786 {
787         return off;
788 }
789 LedState
790 MackieControlProtocol::user_b_press (Button &)
791 {
792         transport_stop();
793         return off;
794 }
795 LedState
796 MackieControlProtocol::user_b_release (Button &)
797 {
798         return off;
799 }
800
801 LedState
802 MackieControlProtocol::master_fader_touch_press (Mackie::Button &)
803 {
804         DEBUG_TRACE (DEBUG::MackieControl, "MackieControlProtocol::master_fader_touch_press\n");
805
806         Fader* master_fader = _master_surface->master_fader();
807
808         boost::shared_ptr<AutomationControl> ac = master_fader->control ();
809
810         master_fader->set_in_use (true);
811         master_fader->start_touch (transport_frame());
812
813         return none;
814 }
815 LedState
816 MackieControlProtocol::master_fader_touch_release (Mackie::Button &)
817 {
818         DEBUG_TRACE (DEBUG::MackieControl, "MackieControlProtocol::master_fader_touch_release\n");
819
820         Fader* master_fader = _master_surface->master_fader();
821
822         master_fader->set_in_use (false);
823         master_fader->stop_touch (transport_frame(), true);
824
825         return none;
826 }
827
828 Mackie::LedState
829 MackieControlProtocol::read_press (Mackie::Button&)
830 {
831         _metering_active = !_metering_active;
832         notify_metering_state_changed ();
833         return _metering_active;
834 }
835 Mackie::LedState
836 MackieControlProtocol::read_release (Mackie::Button&)
837 {
838         return _metering_active;
839 }
840 Mackie::LedState
841 MackieControlProtocol::write_press (Mackie::Button&)
842 {
843         return none;
844 }
845 Mackie::LedState
846 MackieControlProtocol::write_release (Mackie::Button&)
847 {
848         return none;
849 }
850
851 Mackie::LedState
852 MackieControlProtocol::clearsolo_press (Mackie::Button&)
853 {
854         // clears all solos and listens (pfl/afl)
855         session->set_solo (session->get_routes(), false);
856         session->set_listen (session->get_routes(), false);
857         return none;
858 }
859
860 Mackie::LedState
861 MackieControlProtocol::clearsolo_release (Mackie::Button&)
862 {
863         //return session->soloing();
864         return none;
865 }
866
867 Mackie::LedState
868 MackieControlProtocol::track_press (Mackie::Button&)
869 {
870         set_pot_mode (Trim);
871         return none;
872 }
873 Mackie::LedState
874 MackieControlProtocol::track_release (Mackie::Button&)
875 {
876         return none;
877 }
878 Mackie::LedState
879 MackieControlProtocol::send_press (Mackie::Button&)
880 {
881         boost::shared_ptr<Route> r = first_selected_route ();
882         if (r) {
883 #ifndef MIXBUS
884                 if (!r->nth_send (0)) {
885                         /* no sends ... no send subview mode */
886                         if (!surfaces.empty()) {
887                                 surfaces.front()->display_message_for (_("No sends for this track/bus"), 1000);
888                         }
889                         return none;
890                 }
891 #endif
892                 set_subview_mode (Sends, r);
893                 return none; /* led state handled by set_subview_mode() */
894         }
895         return none;
896 }
897 Mackie::LedState
898 MackieControlProtocol::send_release (Mackie::Button&)
899 {
900         return none;
901 }
902 Mackie::LedState
903 MackieControlProtocol::miditracks_press (Mackie::Button&)
904 {
905         return none;
906 }
907 Mackie::LedState
908 MackieControlProtocol::miditracks_release (Mackie::Button&)
909 {
910         set_view_mode (MidiTracks);
911         return none;
912 }
913 Mackie::LedState
914 MackieControlProtocol::inputs_press (Mackie::Button&)
915 {
916         return none;
917 }
918 Mackie::LedState
919 MackieControlProtocol::inputs_release (Mackie::Button&)
920 {
921         return none;
922 }
923 Mackie::LedState
924 MackieControlProtocol::audiotracks_press (Mackie::Button&)
925 {
926         return none;
927 }
928 Mackie::LedState
929 MackieControlProtocol::audiotracks_release (Mackie::Button&)
930 {
931         set_view_mode (AudioTracks);
932         return none;
933 }
934 Mackie::LedState
935 MackieControlProtocol::audioinstruments_press (Mackie::Button& b)
936 {
937         return dyn_press (b);
938 }
939
940 Mackie::LedState
941 MackieControlProtocol::audioinstruments_release (Mackie::Button& b)
942 {
943         return dyn_release (b);
944
945 }
946 Mackie::LedState
947 MackieControlProtocol::aux_press (Mackie::Button&)
948 {
949         return none;
950 }
951 Mackie::LedState
952 MackieControlProtocol::aux_release (Mackie::Button&)
953 {
954         set_view_mode (Auxes);
955         return none;
956 }
957 Mackie::LedState
958 MackieControlProtocol::busses_press (Mackie::Button&)
959 {
960         return none;
961 }
962 Mackie::LedState
963 MackieControlProtocol::busses_release (Mackie::Button&)
964 {
965         set_view_mode (Busses);
966         return none;
967 }
968 Mackie::LedState
969 MackieControlProtocol::outputs_press (Mackie::Button&)
970 {
971         return none;
972 }
973 Mackie::LedState
974 MackieControlProtocol::outputs_release (Mackie::Button&)
975 {
976         set_view_mode (Hidden);
977         return none;
978 }
979 Mackie::LedState
980 MackieControlProtocol::user_press (Mackie::Button&)
981 {
982         return none;
983 }
984 Mackie::LedState
985 MackieControlProtocol::user_release (Mackie::Button&)
986 {
987         set_view_mode (Selected);
988         return none;
989 }
990 Mackie::LedState
991 MackieControlProtocol::trim_press (Mackie::Button&)
992 {
993         return none;
994 }
995 Mackie::LedState
996 MackieControlProtocol::trim_release (Mackie::Button&)
997 {
998         return none;
999 }
1000 Mackie::LedState
1001 MackieControlProtocol::latch_press (Mackie::Button&)
1002 {
1003         return none;
1004 }
1005 Mackie::LedState
1006 MackieControlProtocol::latch_release (Mackie::Button&)
1007 {
1008         return none;
1009 }
1010 Mackie::LedState
1011 MackieControlProtocol::grp_press (Mackie::Button&)
1012 {
1013         return none;
1014 }
1015 Mackie::LedState
1016 MackieControlProtocol::grp_release (Mackie::Button&)
1017 {
1018         return none;
1019 }
1020 Mackie::LedState
1021 MackieControlProtocol::nudge_press (Mackie::Button&)
1022 {
1023         return none;
1024 }
1025 Mackie::LedState
1026 MackieControlProtocol::nudge_release (Mackie::Button&)
1027 {
1028         return none;
1029 }
1030 Mackie::LedState
1031 MackieControlProtocol::replace_press (Mackie::Button&)
1032 {
1033         return none;
1034 }
1035 Mackie::LedState
1036 MackieControlProtocol::replace_release (Mackie::Button&)
1037 {
1038         return none;
1039 }
1040 Mackie::LedState
1041 MackieControlProtocol::click_press (Mackie::Button&)
1042 {
1043         return none;
1044 }
1045 Mackie::LedState
1046 MackieControlProtocol::click_release (Mackie::Button&)
1047 {
1048         return none;
1049 }
1050 Mackie::LedState
1051 MackieControlProtocol::view_press (Mackie::Button&)
1052 {
1053         set_view_mode (Mixer);
1054         return none;
1055 }
1056 Mackie::LedState
1057 MackieControlProtocol::view_release (Mackie::Button&)
1058 {
1059         return none;
1060 }