From 9254e80c396265f484adb3b7bf5f0b502d096107 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 10 Nov 2014 21:44:02 -0500 Subject: refactor MIDISceneChange color property addition by moving it into SceneChange to anticipate other types of SceneChange objects (e.g. OSC) --- libs/ardour/scene_change.cc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'libs/ardour/scene_change.cc') diff --git a/libs/ardour/scene_change.cc b/libs/ardour/scene_change.cc index eda260382b..6560a7ca2f 100644 --- a/libs/ardour/scene_change.cc +++ b/libs/ardour/scene_change.cc @@ -25,6 +25,7 @@ using namespace PBD; using namespace ARDOUR; std::string SceneChange::xml_node_name = X_("SceneChange"); +const uint32_t SceneChange::out_of_bound_color = 0x00000000; /* note: zero alpha means invisible, which acts as out-of-bound signal */ boost::shared_ptr SceneChange::factory (const XMLNode& node, int version) @@ -37,3 +38,21 @@ SceneChange::factory (const XMLNode& node, int version) return boost::shared_ptr(); } + +SceneChange::SceneChange () + : _color (out_of_bound_color) +{ +} + +void +SceneChange::set_color (uint32_t c) +{ + _color = c; + ColorChanged (); /* EMIT SIGNAL */ +} + +uint32_t +SceneChange::color() const +{ + return _color; +} -- cgit v1.2.3