protected:
Item *text_;
protected:
- virtual void stop_translation_timestep ();
- virtual void acknowledge_grob (Grob_info);
+ void stop_translation_timestep ();
+ DECLARE_ACKNOWLEDGER (bar_line);
void create_items (Music *);
virtual bool try_music (Music *ev);
- virtual void process_music ();
+ void process_music ();
private:
Music *mark_ev_;
}
void
-Mark_engraver::acknowledge_grob (Grob_info inf)
+Mark_engraver::acknowledge_bar_line (Grob_info inf)
{
Grob *s = inf.grob ();
- if (text_ && Bar_line::has_interface (s))
+ if (text_)
{
/*
TODO: make this configurable. RehearsalMark cannot be
if (text_)
{
SCM lst = get_property ("stavesFound");
- text_->set_property ("side-support-elements", lst);
+ text_->set_object ("side-support-elements", lst);
text_ = 0;
}
mark_ev_ = 0;
int mark_count = scm_to_int (m);
mark_count++;
context ()->set_property ("rehearsalMark",
- scm_int2num (mark_count));
+ scm_from_int (mark_count));
}
if (scm_is_number (m))
}
}
+#include "translator.icc"
+
+ADD_ACKNOWLEDGER (Mark_engraver,bar_line);
ADD_TRANSLATOR (Mark_engraver,
/* descr */ "This engraver will create RehearsalMark objects. "
"It puts them on top of all staves (which is taken from "
"end up on the same Y-location",
/* creats*/ "RehearsalMark",
/* accepts */ "mark-event",
- /* acks */ "bar-line-interface",
/* reads */ "rehearsalMark markFormatter stavesFound",
/* write */ "");