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>
10 #include "bar-number-engraver.hh"
11 #include "timing-translator.hh"
12 #include "timing-engraver.hh"
13 #include "engraver-group-engraver.hh"
14 #include "text-item.hh"
16 Bar_number_engraver::Bar_number_engraver()
25 Bar_number_engraver::do_process_requests ()
27 Translator
*tr
= daddy_grav_l ()->get_simple_translator ("Timing_engraver");
28 Timing_translator
*time
= dynamic_cast<Timing_translator
*>(tr
);
30 // todo include (&&!time->cadenza_b_ )
31 SCM bn
= get_property("currentBarNumber");
33 if (gh_number_p (bn
) &&
34 !time
->measure_position () && now_mom () > Moment (0))
39 text_p_
->set_elt_property ("text",
40 ly_str02scm (to_str (gh_scm2int (bn
)).ch_C()));
45 ADD_THIS_TRANSLATOR(Bar_number_engraver
);