2 grob-info.cc -- implement Grob_info
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 #include "grob-info.hh"
12 #include "translator-group.hh"
18 Grob_info::Grob_info (Translator *t, Grob *g)
24 Grob_info::Grob_info ()
31 Grob_info::music_cause ()
33 SCM cause = grob_->get_property ("cause");
34 return unsmob_music (cause);
38 Grob_info::origin_contexts (Translator *end) const
40 Context *t = origin_trans_->context ();
41 Link_array<Context> r;
45 t = t->get_parent_context ();
47 while (t && t != end->context ());
54 Grob_info::context () const
56 return origin_trans_->context ();
60 Grob_info::spanner () const
62 return dynamic_cast<Spanner*> (grob_);
66 Grob_info::item () const
68 return dynamic_cast<Item*> (grob_);