2 note-head-line-engraver.cc -- implement Note_head_line_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 2000--2006 Jan Nieuwenhuizen <janneke@gnu.org>
10 #include "international.hh"
11 #include "rhythmic-head.hh"
16 Create line-spanner grobs for glissandi lines that connect note
19 class Glissando_engraver : public Engraver
22 TRANSLATOR_DECLARATIONS (Glissando_engraver);
25 DECLARE_ACKNOWLEDGER (rhythmic_head);
26 virtual void finalize ();
27 virtual bool try_music (Music *);
29 void stop_translation_timestep ();
30 void process_music ();
37 Glissando_engraver::Glissando_engraver ()
39 last_line_ = line_ = 0;
44 Glissando_engraver::try_music (Music *m)
55 Glissando_engraver::process_music ()
58 line_ = make_spanner ("Glissando", event_->self_scm ());
62 Glissando_engraver::acknowledge_rhythmic_head (Grob_info info)
64 Grob *g = info.grob ();
66 line_->set_bound (LEFT, g);
69 last_line_->set_bound (RIGHT, g);
73 Glissando_engraver::stop_translation_timestep ()
75 if (last_line_ && last_line_->get_bound (RIGHT))
80 programming_error ("overwriting glissando");
88 Glissando_engraver::finalize ()
92 string msg = _ ("unterminated glissando");
95 event_->origin ()->warning (msg);
104 #include "translator.icc"
106 ADD_ACKNOWLEDGER (Glissando_engraver, rhythmic_head);
107 ADD_TRANSLATOR (Glissando_engraver,
108 /* doc */ "Engrave a glissandi",
109 /* create */ "Glissando",
110 /* accept */ "glissando-event",
111 /* read */ "followVoice",