bool has_control_master() const;
bool slaved () const;
+ uint32_t rgba () const { return _rgba; }
+
+ /** set route-group color and notify UI about change */
+ void set_rgba (uint32_t);
+
+ /* directly set color only, used to convert old 5.x gui-object-state
+ * to libardour color */
+ void migrate_rgba (uint32_t color) { _rgba = color; }
+
private:
boost::shared_ptr<RouteList> routes;
boost::shared_ptr<Route> subgroup_bus;
void post_set (PBD::PropertyChange const &);
void push_to_groups ();
+
+ uint32_t _rgba;
};
} /* namespace */
, _rec_enable_group (new ControlGroup (RecEnableAutomation))
, _gain_group (new GainControlGroup ())
, _monitoring_group (new ControlGroup (MonitoringAutomation))
+ , _rgba (0)
{
_xml_node_name = X_("RouteGroup");
return -1;
}
+void
+RouteGroup::set_rgba (uint32_t color) {
+ _rgba = color;
+
+ PBD::PropertyChange change;
+ change.add (Properties::color);
+ PropertyChanged (change);
+
+ if (!is_color ()) {
+ return;
+ }
+
+ for (RouteList::const_iterator i = routes->begin(); i != routes->end(); ++i) {
+ (*i)->presentation_info().PropertyChanged (Properties::color);
+ }
+}
XMLNode&
RouteGroup::get_state ()
XMLNode *node = new XMLNode ("RouteGroup");
node->set_property ("id", id());
+ node->set_property ("rgba", _rgba);
add_properties (*node);
set_id (node);
set_values (node);
+ node.get_property ("rgba", _rgba);
std::string routes;
if (node.get_property ("routes", routes)) {