2 bar-number-grav.cc -- implement Bar_number_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 #include "bar-number-engraver.hh"
10 #include "engraver-group-engraver.hh"
11 #include "text-item.hh"
14 Bar_number_engraver::Bar_number_engraver()
23 Bar_number_engraver::do_process_music ()
25 // todo include (&&!time->cadenza_b_ )
26 SCM bn = get_property("currentBarNumber");
27 SCM smp = get_property ("measurePosition");
28 Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
30 if (gh_number_p (bn) &&
31 !mp && now_mom () > Moment (0))
36 text_p_->set_elt_property ("text",
37 ly_str02scm (to_str (gh_scm2int (bn)).ch_C()));
42 ADD_THIS_TRANSLATOR(Bar_number_engraver);