X-Git-Url: https://main.carlh.net/gitweb/?p=ardour.git;a=blobdiff_plain;f=libs%2Fardour%2Fscene_change.cc;h=e9d319569487073f41c3e506bed9a0c78d8b7d07;hp=eda260382b604c615eb5e28bb305ee0d304de8ab;hb=c8c6bca6587450ff64303dbc994a4cd28d6ce7aa;hpb=6ffd8a954363475fb4b0aa15320fbb10ed3acb71 diff --git a/libs/ardour/scene_change.cc b/libs/ardour/scene_change.cc index eda260382b..e9d3195694 100644 --- a/libs/ardour/scene_change.cc +++ b/libs/ardour/scene_change.cc @@ -19,17 +19,18 @@ #include "ardour/midi_scene_change.h" -#include "i18n.h" +#include "pbd/i18n.h" 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) { - const XMLProperty* prop = node.property (X_("type")); + XMLProperty const * prop = node.property (X_("type")); if (prop->value() == X_("MIDI")) { return boost::shared_ptr (new MIDISceneChange (node, version)); @@ -37,3 +38,31 @@ SceneChange::factory (const XMLNode& node, int version) return boost::shared_ptr(); } + +SceneChange::SceneChange () + : _color (out_of_bound_color) + , _active (true) +{ +} + +void +SceneChange::set_color (uint32_t c) +{ + _color = c; + ColorChanged (); /* EMIT SIGNAL */ +} + +uint32_t +SceneChange::color() const +{ + return _color; +} + +void +SceneChange::set_active (bool yn) +{ + if (_active != yn) { + _active = yn; + ActiveChanged (); /* EMIT SIGNAL */ + } +}