+void GlSequence::update_annotation_draw_function(
+ std::string type,
+ Drawable::draw_func_ptr draw_func,
+ ColorRef color
+)
+{
+ for(SeqSpanRefList::iterator annot_i = annotation_list->begin();
+ annot_i != annotation_list->end();
+ ++annot_i)
+ {
+ AnnotationsRef metadata( (*annot_i)->annotations() );
+
+ if (metadata->has_key("type") and metadata->get("type") == type) {
+ // we should update
+ DrawableRef d((*annot_i)->drawable());
+ if (!d) {
+ d = default_drawable();
+ (*annot_i)->setDrawable(d);
+ }
+ d->setDrawFunction(draw_func);
+ d->setColor(color);
+ }
+ }
+}