2 bar-number-grav.cc -- implement Bar_number_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1999 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()
21 = ly_ch_C_eval_scm ("postbreak-only-visibility");
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 if (!time
->measure_position () && now_mom () > Moment (0))
35 text_p_
->text_str_
= to_str (time
->bars_i ());
39 ADD_THIS_TRANSLATOR(Bar_number_engraver
);