2 time_signature-reg.cc -- implement Time_signature_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 #include "time-signature-engraver.hh"
10 #include "time-signature.hh"
11 #include "command-request.hh"
12 #include "timing-engraver.hh"
13 #include "engraver-group.hh"
15 Time_signature_engraver::Time_signature_engraver()
21 Time_signature_engraver::do_process_requests()
24 daddy_grav_l()->get_simple_translator (Timing_engraver::static_name ()); // ugh
28 warning (_ ("lost in time") + ": " + _ ("can't find")
29 + " Timing_translator");
33 Timing_engraver * timing_grav_l= dynamic_cast<Timing_engraver *> (result);
35 Time_signature_change_req *req = timing_grav_l->time_signature_req_l();
39 args.push (req->beats_i_);
40 args.push (req->one_beat_i_);
42 time_signature_p_ = new Time_signature ();
43 time_signature_p_->args_ = args;
44 time_signature_p_->break_priority_i_ = 1; // ugh
48 if (time_signature_p_)
49 announce_element (Score_element_info (time_signature_p_, req));
53 Time_signature_engraver::do_pre_move_processing()
55 if (time_signature_p_)
57 Scalar sigstyle = get_property ("timeSignatureStyle");
58 if (sigstyle.length_i ())
60 time_signature_p_->time_sig_type_str_ = sigstyle;
63 typeset_element (time_signature_p_);
69 ADD_THIS_TRANSLATOR(Time_signature_engraver);
70 IMPLEMENT_IS_TYPE_B1(Time_signature_engraver,Engraver);