]> git.donarmstrong.com Git - lilypond.git/blob - lily/grob-info.cc
2003 -> 2004
[lilypond.git] / lily / grob-info.cc
1 /*
2   grob-info.cc -- implement Grob_info
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9 #include "grob.hh"
10 #include "grob-info.hh"
11 #include "music.hh"
12 #include "translator-group.hh"
13
14
15 Grob_info::Grob_info ()
16 {
17   grob_ = 0;
18   origin_trans_ = 0;
19 }
20
21 Music*
22 Grob_info::music_cause ()
23 {
24   SCM cause = grob_->get_grob_property ("cause"); 
25   return unsmob_music (cause);
26 }
27
28 Link_array<Translator>
29 Grob_info::origin_transes (Translator* end) const
30 {
31   Translator * t = origin_trans_;
32   Link_array<Translator> r;
33   do {
34     r.push (t);
35     t = t->daddy_trans_;
36   } while (t && t != end->daddy_trans_);
37   
38   return r;
39 }
40