2 note-head-line-engraver.cc -- implement Note_head_line_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 2000--2005 Jan Nieuwenhuizen <janneke@gnu.org>
11 #include "rhythmic-head.hh"
12 #include "engraver.hh"
15 Create line-spanner grobs for glissandi lines that connect note
18 class Glissando_engraver : public Engraver
21 TRANSLATOR_DECLARATIONS (Glissando_engraver);
24 virtual void acknowledge_grob (Grob_info);
25 virtual void finalize ();
26 virtual void stop_translation_timestep ();
27 virtual bool try_music (Music *);
28 virtual void process_music ();
35 Glissando_engraver::Glissando_engraver ()
37 last_line_ = line_ = 0;
42 Glissando_engraver::try_music (Music* m)
53 Glissando_engraver::process_music ()
57 line_ = make_spanner ("Glissando", event_->self_scm ());
63 Glissando_engraver::acknowledge_grob (Grob_info info)
65 if (Rhythmic_head::has_interface (info.grob_))
67 Grob * g = info.grob_;
69 line_->set_bound (LEFT, g);
72 last_line_->set_bound (RIGHT, g);
78 Glissando_engraver::stop_translation_timestep ()
80 if (last_line_ && last_line_->get_bound (RIGHT))
87 programming_error ("Overwriting glissando.");
95 Glissando_engraver::finalize ()
99 String msg = _("Unterminated glissando.");
102 event_->origin ()->warning (msg);
113 ADD_TRANSLATOR (Glissando_engraver,
114 /* descr */ "Engrave a glissandi",
115 /* creats*/ "Glissando",
116 /* accepts */ "glissando-event",
117 /* acks */ "rhythmic-head-interface",
118 /* reads */ "followVoice",