lilypond-1.3.69
[lilypond.git] / lily / engraver.cc
blob7ef5dda44f2edc40560e39078272707ab2b5fb34
1 /*
2 engraver.cc -- implement Engraver
4 Sourcefile of GNU LilyPond music type setter
6 (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
9 #include "music-list.hh"
10 #include "musical-request.hh"
11 #include "engraver.hh"
12 #include "engraver-group-engraver.hh"
13 #include "debug.hh"
14 #include "paper-def.hh"
15 #include "score-element.hh"
16 #include "group-interface.hh"
19 void
20 Engraver::announce_element (Score_element_info i)
22 Score_element * e = i.elem_l_;
24 if (e->get_elt_property ("interfaces") == SCM_EOL)
25 Group_interface (e, "interfaces").add_thing (ly_symbol2scm (e->name()));
27 if (!i.origin_trans_l_)
28 i.origin_trans_l_ = this;
29 daddy_grav_l()->announce_element (i);
32 void
33 Engraver::typeset_element (Score_element*p)
35 daddy_grav_l()->typeset_element (p);
39 Paper_def*
40 Engraver::paper_l () const
42 return dynamic_cast<Paper_def*>(output_def_l_);
45 Engraver_group_engraver*
46 Engraver::daddy_grav_l () const
48 return (daddy_trans_l_ )
49 ? dynamic_cast<Engraver_group_engraver *> (daddy_trans_l_)
50 : 0;