Use scalar instead of embedded_scm for context mod overrides.
[lilypond/mpolesky.git] / lily / grid-point-engraver.cc
blob95899aa25a7afdfd3fef9d3bda5f2163a142ce58
1 /*
2 grid-line-engraver.cc -- implement Grid_point_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 2005--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
9 #include "engraver.hh"
10 #include "item.hh"
11 #include "moment.hh"
13 #include "translator.icc"
15 class Grid_point_engraver : public Engraver
17 public:
18 TRANSLATOR_DECLARATIONS (Grid_point_engraver);
19 protected:
20 void process_music ();
23 void
24 Grid_point_engraver::process_music ()
26 SCM grid_interval = get_property ("gridInterval");
27 if (Moment *mom = unsmob_moment (grid_interval))
29 Moment now = now_mom ();
31 if (!now.main_part_.mod_rat (mom->main_part_))
32 make_item ("GridPoint", SCM_EOL);
36 Grid_point_engraver::Grid_point_engraver ()
40 ADD_TRANSLATOR (Grid_point_engraver,
41 /* doc */
42 "Generate grid points.",
44 /* create */
45 "GridPoint ",
47 /* read */
48 "gridInterval ",
50 /* write */