(all-grob-descriptions): remove gap from
[lilypond.git] / lily / dot-column-engraver.cc
blob8ee88506141568720460658042e10f4067281003
1 /*
2 dot-column-engraver.cc -- implement Dot_column_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1998--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
8 */
11 #include "rhythmic-head.hh"
12 #include "dot-column.hh"
13 #include "side-position-interface.hh"
14 #include "engraver.hh"
15 #include "stem.hh"
17 class Dot_column_engraver : public Engraver
19 Grob *dotcol_ ;
20 Grob * stem_;
21 Link_array<Item> heads_;
22 public:
23 TRANSLATOR_DECLARATIONS (Dot_column_engraver );
25 protected:
26 virtual void acknowledge_grob (Grob_info);
27 virtual void stop_translation_timestep ();
31 Dot_column_engraver::Dot_column_engraver ()
33 dotcol_ =0;
34 stem_ = 0;
37 void
38 Dot_column_engraver::stop_translation_timestep ()
40 if (dotcol_)
44 Add the stem to the support so dots stay clear of flags.
46 See [Ross, p 171]
48 if (stem_)
49 dotcol_->set_property ("stem", stem_->self_scm ());
51 typeset_grob (dotcol_);
52 dotcol_ =0;
54 heads_.clear ();
55 stem_ =0;
58 void
59 Dot_column_engraver::acknowledge_grob (Grob_info info)
61 Grob *d = unsmob_grob (info.grob_->get_property ("dot"));
62 if (d)
64 if (!dotcol_)
66 dotcol_ = make_item ("DotColumn");
67 announce_grob (dotcol_, SCM_EOL);
70 Dot_column::add_head (dotcol_, info.grob_);
72 else if (Stem::has_interface (info.grob_))
74 stem_ = info.grob_;
81 ENTER_DESCRIPTION (Dot_column_engraver,
82 /* descr */ " Engraves dots on dotted notes shifted to the right of the note.\n"
83 "If omitted, then dots appear on top of the notes.",
84 /* creats*/ "DotColumn",
85 /* accepts */ "",
86 /* acks */ "rhythmic-head-interface dot-column-interface stem-interface",
87 /* reads */ "",
88 /* write */ "");