2 repeat-engraver.cc -- implement Repeat_tie_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
11 #include "engraver.hh"
13 #include "pointer-group-interface.hh"
14 #include "stream-event.hh"
16 #include "translator.icc"
18 class Repeat_tie_engraver : public Engraver
21 Grob *semi_tie_column_;
22 vector<Grob*> semi_ties_;
24 void stop_translation_timestep ();
25 DECLARE_ACKNOWLEDGER (note_head);
26 DECLARE_TRANSLATOR_LISTENER (repeat_tie);
29 TRANSLATOR_DECLARATIONS (Repeat_tie_engraver);
32 Repeat_tie_engraver::Repeat_tie_engraver ()
39 Repeat_tie_engraver::stop_translation_timestep ()
46 IMPLEMENT_TRANSLATOR_LISTENER (Repeat_tie_engraver, repeat_tie);
48 Repeat_tie_engraver::listen_repeat_tie (Stream_event *ev)
50 ASSIGN_EVENT_ONCE (event_, ev);
54 Repeat_tie_engraver::acknowledge_note_head (Grob_info inf)
59 if (!semi_tie_column_)
61 semi_tie_column_ = make_item ("RepeatTieColumn", event_->self_scm ());
64 Grob *semi_tie = make_item ("RepeatTie", event_->self_scm ());
65 semi_tie->set_object ("note-head", inf.grob ()->self_scm ());
67 Pointer_group_interface::add_grob (semi_tie_column_, ly_symbol2scm ("ties"),
69 semi_tie->set_parent (semi_tie_column_, Y_AXIS);
70 semi_ties_.push_back (semi_tie);
73 ADD_ACKNOWLEDGER (Repeat_tie_engraver, note_head);
74 ADD_TRANSLATOR (Repeat_tie_engraver,
75 /* doc */ "Create Laissez vibrer items.",