globally remove all trailing whitespace from ardour code base.
[ardour.git] / libs / surfaces / tranzport / bling.cc
1 /*
2  *   Copyright (C) 2006 Paul Davis
3  *   Copyright (C) 2007 Michael Taht
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
21 /* The Bling class theoretically knows nothing about the device it's blinging
22    and depends on the overlying implementation to tell it about the format of the
23    device. Maybe this will become a template or people will inherit from it */
24
25 /* Bling is where all the bad, bad, marketing driven ideas go */
26
27 class bling {
28 public:
29         enum BlingMode {
30                 BlingOff = 0,
31                 BlingOn = 1,
32                 BlingEnter = 2,
33                 BlingExit = 4,
34                 // Light Specific Stuff
35                 BlingKit = 8,
36                 BlingRotating = 16,
37                 BlingPairs = 32,
38                 BlingRows = 64,
39                 BlingColumns = 128,
40                 BlingFlashAllLights = 256,
41                 // Screen Specific Stuff
42                 // Slider Specific Stuff
43                 BlingSliderMax,
44                 BlingSliderMid,
45                 BlingSliderMin,
46                 // Random stuff
47                 BlingRandomLight,
48                 BlingRandomSlider,
49                 BlingRandomScreen,
50                 BlingAllSliders
51         };
52         bling();
53         ~bling();
54         set(BlingMode);
55         unset(BlingMode);
56         run();
57         next();
58         prev();
59         msg(string&);
60         scrollmsg(string&);
61
62 protected:
63 // The as yet undefined "advanced_ui" class provides methods to find out at run time
64 // what the heck is what
65         BlingMode blingmode;
66         advancedUI *intf;
67         int last_light;
68 // I don't think these actually need to be part of the public definition of the class
69         enter();
70         exit();
71         rotate();
72 // etc
73 };
74
75 // make absolutely sure we have the pointer to the interface
76 // something like this
77
78 #define BLING_INTFA(a) (intf)? 0:intf->a
79 #define BLING_INTF(a) { if (intf) { intf->a; } else { return 0; } }
80
81 // Should any of these bother to return a status code?
82
83 bling::rotate() {
84         BLING_INTF(light(last_light,off));
85         last_light = BLING_INTFA(next_light(last_light));
86         BLING_INTF(light(last_light,on));
87 }
88
89 bling::enter() {
90 }
91
92 bling::exit() {
93 }
94
95 bling::flashall() {
96 }
97
98 bling::rows() {
99 }
100
101 bling::columns() {
102 }
103
104 bling::msg() {
105 }
106
107 bling::scrollmsg() {
108 }
109
110 // Based on the current bling mode, do whatever it is you are going to do
111 bling::run() {
112         
113 }
114
115 // etc