]> git.donarmstrong.com Git - lilypond.git/blob - lily/grob-info.cc
release: 1.5.30
[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--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8 #include "grob.hh"
9 #include "grob-info.hh"
10 #include "request.hh"
11 #include "translator.hh"
12 #include "translator-group.hh"
13
14 Grob_info::Grob_info (Grob*s_l)
15 {
16   grob_l_ = s_l;
17   origin_trans_l_ = 0;  
18 }
19
20
21 Grob_info::Grob_info ()
22 {
23   grob_l_ = 0;
24   origin_trans_l_ = 0;
25 }
26
27 Music*
28 Grob_info::music_cause ()
29   
30 {
31   SCM cause = grob_l_->get_grob_property ("cause"); 
32   return unsmob_music (cause);
33 }
34
35 Link_array<Translator>
36 Grob_info::origin_trans_l_arr (Translator* end) const
37 {
38   Translator * t = origin_trans_l_;
39   Link_array<Translator> r;
40   do {
41     r.push (t);
42     t = t->daddy_trans_l_;
43   } while (t && t != end->daddy_trans_l_);
44   
45   return r;
46 }
47