]> git.donarmstrong.com Git - lilypond.git/blob - lily/grob-info.cc
*** empty log message ***
[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--2003 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 Grob_info::Grob_info (Grob*s)
15 {
16   grob_ = s;
17   origin_trans_ = 0;  
18 }
19
20
21 Grob_info::Grob_info ()
22 {
23   grob_ = 0;
24   origin_trans_ = 0;
25 }
26
27 Music*
28 Grob_info::music_cause ()
29   
30 {
31   SCM cause = grob_->get_grob_property ("cause"); 
32   return unsmob_music (cause);
33 }
34
35 Link_array<Translator>
36 Grob_info::origin_transes (Translator* end) const
37 {
38   Translator * t = origin_trans_;
39   Link_array<Translator> r;
40   do {
41     r.push (t);
42     t = t->daddy_trans_;
43   } while (t && t != end->daddy_trans_);
44   
45   return r;
46 }
47