#include "directional-element-interface.hh"
#include "engraver.hh"
+#include "rhythmic-head.hh"
#include "side-position-interface.hh"
#include "stem.hh"
-#include "rhythmic-head.hh"
+#include "stream-event.hh"
#include "text-interface.hh"
+#include "translator.icc"
+
/**
typeset directions that are plain text.
*/
class Text_engraver : public Engraver
{
- Link_array__Music_ evs_;
- Link_array__Item_ texts_;
+ vector<Stream_event *> evs_;
+ vector<Item*> texts_;
public:
TRANSLATOR_DECLARATIONS (Text_engraver);
protected:
- virtual bool try_music (Music *m);
void stop_translation_timestep ();
void process_acknowledged ();
+ DECLARE_TRANSLATOR_LISTENER (text_script);
DECLARE_ACKNOWLEDGER (stem_tremolo);
DECLARE_ACKNOWLEDGER (stem);
DECLARE_ACKNOWLEDGER (rhythmic_head);
};
-bool
-Text_engraver::try_music (Music *m)
+IMPLEMENT_TRANSLATOR_LISTENER (Text_engraver, text_script);
+void
+Text_engraver::listen_text_script (Stream_event *ev)
{
- if (m->is_mus_type ("text-script-event"))
- {
- evs_.push_back (m);
- return true;
- }
- return false;
+ evs_.push_back (ev);
}
void
return;
for (vsize i = 0; i < evs_.size (); i++)
{
- Music *r = evs_[i];
+ Stream_event *r = evs_[i];
// URG: Text vs TextScript
Item *text = make_item ("TextScript", r->self_scm ());
{
}
-#include "translator.icc"
-
ADD_ACKNOWLEDGER (Text_engraver, stem);
ADD_ACKNOWLEDGER (Text_engraver, stem_tremolo);
ADD_ACKNOWLEDGER (Text_engraver, rhythmic_head);