2 engraver.cc -- implement Engraver
4 Sourcefile of GNU LilyPond music type setter
6 (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 #include "music-list.hh"
10 #include "musical-request.hh"
11 #include "engraver.hh"
12 #include "engraver-group-engraver.hh"
14 #include "paper-def.hh"
15 #include "score-element.hh"
16 #include "group-interface.hh"
20 Engraver::announce_element (Score_element_info inf
)
22 daddy_grav_l()->announce_element (inf
);
26 Engraver::announce_element (Score_element
* e
, Music
*m
)
28 if (e
->get_elt_property ("interfaces") == SCM_EOL
)
29 Group_interface (e
, "interfaces").add_thing (ly_symbol2scm (e
->name()));
31 if (m
&& m
->origin ()->location_str ().length_i ())
33 e
->set_elt_property ("origin", m
->get_mus_property ("origin"));
36 Score_element_info
i (e
, m
);
37 if (!i
.origin_trans_l_
)
38 i
.origin_trans_l_
= this;
39 daddy_grav_l()->announce_element (i
);
45 Engraver::typeset_element (Score_element
*p
)
47 daddy_grav_l()->typeset_element (p
);
52 Engraver::paper_l () const
54 return dynamic_cast<Paper_def
*>(output_def_l_
);
57 Engraver_group_engraver
*
58 Engraver::daddy_grav_l () const
60 return (daddy_trans_l_
)
61 ? dynamic_cast<Engraver_group_engraver
*> (daddy_trans_l_
)