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 void stop_translation_timestep ();
28 virtual bool try_music (Music *);
29 void process_music ();
36 Glissando_engraver::Glissando_engraver ()
38 last_line_ = line_ = 0;
43 Glissando_engraver::try_music (Music *m)
54 Glissando_engraver::process_music ()
57 line_ = make_spanner ("Glissando", event_->self_scm ());
61 Glissando_engraver::acknowledge_rhythmic_head (Grob_info info)
63 Grob *g = info.grob ();
65 line_->set_bound (LEFT, g);
68 last_line_->set_bound (RIGHT, g);
72 Glissando_engraver::stop_translation_timestep ()
74 if (last_line_ && last_line_->get_bound (RIGHT))
79 programming_error ("overwriting glissando");
87 Glissando_engraver::finalize ()
91 string msg = _ ("unterminated glissando");
94 event_->origin ()->warning (msg);
103 #include "translator.icc"
105 ADD_ACKNOWLEDGER (Glissando_engraver, rhythmic_head);
106 ADD_TRANSLATOR (Glissando_engraver,
107 /* doc */ "Engrave a glissandi",
108 /* create */ "Glissando",
109 /* accept */ "glissando-event",
110 /* read */ "followVoice",