Consider accidentals in optical spacing correction.
[lilypond.git] / lily / dot-column-engraver.cc
blob7be2bbdc9009553623ebeac2c4e25a98a86343d2
1 /*
2 dot-column-engraver.cc -- implement Dot_column_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1998--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
9 #include "rhythmic-head.hh"
10 #include "dot-column.hh"
11 #include "side-position-interface.hh"
12 #include "engraver.hh"
13 #include "translator.icc"
14 #include "item.hh"
16 class Dot_column_engraver : public Engraver
18 Grob *dotcol_;
19 public:
20 TRANSLATOR_DECLARATIONS (Dot_column_engraver);
22 protected:
24 DECLARE_ACKNOWLEDGER (rhythmic_head);
26 void stop_translation_timestep ();
29 Dot_column_engraver::Dot_column_engraver ()
31 dotcol_ = 0;
34 void
35 Dot_column_engraver::stop_translation_timestep ()
37 dotcol_ = 0;
40 void
41 Dot_column_engraver::acknowledge_rhythmic_head (Grob_info info)
43 Grob *d = unsmob_grob (info.grob ()->get_object ("dot"));
44 if (d)
46 if (!dotcol_)
47 dotcol_ = make_item ("DotColumn", SCM_EOL);
49 Dot_column::add_head (dotcol_, info.grob ());
54 ADD_ACKNOWLEDGER (Dot_column_engraver, rhythmic_head);
55 ADD_TRANSLATOR (Dot_column_engraver,
56 /* doc */
57 "Engrave dots on dotted notes shifted to the right of the"
58 " note. If omitted, then dots appear on top of the notes.",
60 /* create */
61 "DotColumn ",
63 /* read */
64 "",
66 /* write */