2 instrument-switch-engraver.cc -- implement
4 source file of the GNU LilyPond music typesetter
6 (c) 2006--2009 Han-Wen Nienhuys <hanwen@lilypond.org>
10 #include "engraver.hh"
12 #include "text-interface.hh"
13 #include "translator.icc"
16 class Instrument_switch_engraver
: public Engraver
19 TRANSLATOR_DECLARATIONS (Instrument_switch_engraver
);
24 void stop_translation_time_step ();
25 void process_music ();
29 Instrument_switch_engraver::Instrument_switch_engraver ()
36 TODO: should use an event.
39 Instrument_switch_engraver::process_music ()
41 SCM cue_text
= get_property ("instrumentCueName");
43 if (!scm_is_eq (cue_name_
, cue_text
))
45 if (Text_interface::is_markup (cue_text
))
47 text_
= make_item ("InstrumentSwitch", SCM_EOL
);
48 text_
->set_property ("text", cue_text
);
55 Instrument_switch_engraver::stop_translation_time_step ()
60 ADD_TRANSLATOR (Instrument_switch_engraver
,
62 "Create a cue text for taking instrument.",