lilypond-1.3.28
[lilypond.git] / lily / engraver.cc
blob40bc87f9c1b649e976aba629e106f3cd4db9bc65
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"
18 void
19 Engraver::fill_staff_info (Staff_info&)
24 void
25 Engraver::announce_element (Score_element_info i)
27 Score_element * e = i.elem_l_;
28 group (e, "interfaces").add_thing (ly_symbol2scm (e->name()));
30 if (!i.origin_trans_l_)
31 i.origin_trans_l_ = this;
32 daddy_grav_l()->announce_element (i);
35 void
36 Engraver::typeset_element (Score_element*p)
38 daddy_grav_l()->typeset_element (p);
42 Paper_def*
43 Engraver::paper_l () const
45 return dynamic_cast<Paper_def*>(output_def_l_);
49 Staff_info
50 Engraver::get_staff_info() const
52 if (daddy_grav_l())
53 return daddy_grav_l()->get_staff_info();
54 Staff_info info;
55 return info;
62 Engraver_group_engraver*
63 Engraver::daddy_grav_l () const
65 return (daddy_trans_l_ )
66 ? dynamic_cast<Engraver_group_engraver *> (daddy_trans_l_)
67 : 0;