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 "time-description.hh"
12 #include "timing-engraver.hh"
13 #include "engraver-group.hh"
14 #include "g-text-item.hh"
16 Bar_number_engraver::Bar_number_engraver()
21 = gh_eval_str ("postbreak_only_visibility");
25 Bar_number_engraver::do_process_requests ()
27 Translator
*tr
= daddy_grav_l ()->get_simple_translator ("Timing_engraver");
28 Timing_translator
*timer
= dynamic_cast<Timing_translator
*>(tr
);
29 Time_description
*time
= &timer
->time_
;
31 if (!time
->whole_in_measure_
&& !time
->cadenza_b_
&& now_mom () > Moment (0))
35 text_p_
->text_str_
= to_str (time
->bars_i_
);
36 text_p_
->style_str_
= "roman";
40 ADD_THIS_TRANSLATOR(Bar_number_engraver
);