summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_scene_change.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-11-10 21:17:39 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2014-11-10 23:16:59 -0500
commit70960a5a0055019b576e32acc1acf2094f4e4141 (patch)
tree9980007afe84c6520d4bad19fcbc0d18347c1849 /libs/ardour/midi_scene_change.cc
parent3d0efb8bf7b5fe2c3d73359f278bb74eaa7ddc41 (diff)
add color property to MIDISceneChange
Diffstat (limited to 'libs/ardour/midi_scene_change.cc')
-rw-r--r--libs/ardour/midi_scene_change.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/libs/ardour/midi_scene_change.cc b/libs/ardour/midi_scene_change.cc
index edcc8a658d..db7e826384 100644
--- a/libs/ardour/midi_scene_change.cc
+++ b/libs/ardour/midi_scene_change.cc
@@ -32,6 +32,7 @@ MIDISceneChange::MIDISceneChange (int c, int b, int p)
: _bank (b)
, _program (p)
, _channel (c & 0xf)
+ , _color (0x00000000) /* note: zero alpha means invisible, which acts as out-of-bound signal */
{
if (_bank > 16384) {
_bank = -1;
@@ -148,3 +149,16 @@ MIDISceneChange::operator==(const MIDISceneChange& other) const
_bank == other._bank &&
_channel == other._channel;
}
+
+void
+MIDISceneChange::set_color (uint32_t c)
+{
+ _color = c;
+ ColorChanged (); /* EMIT SIGNAL */
+}
+
+uint32_t
+MIDISceneChange::color() const
+{
+ return _color;
+}