]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/grob.cc
Merge branch 'lilypond/translation' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond
[lilypond.git] / lily / grob.cc
index 9479f17f41179cb3fbdc3cf6769fb533ffbbde9a..e37fc94302bba8e1c2012db54952ee0287fa5e63 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 1997--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "grob.hh"
@@ -702,7 +702,17 @@ Grob::stencil_width (SCM smob)
   return grob_stencil_extent (me, X_AXIS);
 }
 
+Stream_event*
+Grob::event_cause ()
+{
+  SCM cause = get_property ("cause");
+  if (to_boolean (Stream_event::smob_p (cause)))
+    return unsmob_stream_event (cause);
+  else if (to_boolean (Grob::smob_p (cause)))
+    return unsmob_grob (cause)->event_cause ();
 
+  return 0;
+}
 
 Grob *
 common_refpoint_of_list (SCM elist, Grob *common, Axis a)