.ly version update.
[lilypond.git] / lily / engraver.cc
blob22a70a68070b6486e2014b7b5ce0c57a03bea13a
1 /*
2 engraver.cc -- implement Engraver
4 Sourcefile of GNU LilyPond music type setter
6 (c) 1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
9 #include "music.hh"
10 #include "engraver.hh"
11 #include "engraver-group-engraver.hh"
12 #include "grob.hh"
13 #include "main.hh"
14 #include "score-engraver.hh"
15 #include "warn.hh"
17 void
18 Engraver::announce_grob (Grob_info inf)
20 get_daddy_grav ()->announce_grob (inf);
24 CAUSE is the object (typically a Music object) that
25 was the reason for making E.
27 void
28 Engraver::announce_grob (Grob* e, SCM cause)
31 TODO: junk grob-info, and make a cause grob-property to store
32 `causes' generically.
35 if (unsmob_music (cause) || unsmob_grob (cause))
36 e->set_grob_property ("cause", cause);
38 Grob_info i (e);
39 if (!i.origin_trans_)
40 i.origin_trans_ = this;
41 get_daddy_grav ()->announce_grob (i);
46 void
47 Engraver::typeset_grob (Grob*p)
49 get_daddy_grav ()->typeset_grob (p);
53 Engraver_group_engraver*
54 Engraver::get_daddy_grav () const
56 return (daddy_trans_)
57 ? dynamic_cast<Engraver_group_engraver *> (daddy_trans_)
58 : 0;
61 void
62 Engraver::process_music ()
67 Engraver::Engraver()
72 Score_engraver*
73 Engraver::top_engraver () const
75 return dynamic_cast<Score_engraver*> (top_translator());
78 ENTER_DESCRIPTION(Engraver,
79 "", "",
80 "",
81 "", "", "");