]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/engraver.cc
2003 -> 2004
[lilypond.git] / lily / engraver.cc
index fc10a7d84d1e1e55b97652a274d8fad90a8a9d3a..2badb89cd66a5614f16752bf0b5a1a3857c5004a 100644 (file)
@@ -3,16 +3,17 @@
 
   Sourcefile of GNU LilyPond music type setter
 
-  (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "music.hh"
 #include "engraver.hh"
 #include "engraver-group-engraver.hh"
 #include "grob.hh"
-#include "main.hh"
 #include "score-engraver.hh"
 #include "warn.hh"
+#include "spanner.hh"
+#include "item.hh"
 
 void
 Engraver::announce_grob (Grob_info inf)
@@ -20,6 +21,10 @@ Engraver::announce_grob (Grob_info inf)
   get_daddy_grav ()->announce_grob (inf);
 }
 
+/*
+  CAUSE is the object (typically a Music object)  that
+  was the reason for making E.
+ */
 void
 Engraver::announce_grob (Grob* e, SCM cause)
 {
@@ -27,13 +32,16 @@ Engraver::announce_grob (Grob* e, SCM cause)
     TODO: junk grob-info, and make a cause grob-property to store
     `causes' generically.
   */
-  
   if (unsmob_music (cause) || unsmob_grob (cause))
     e->set_grob_property ("cause", cause);
 
-  Grob_info i (e);
+  Grob_info i;
+  i.grob_ = e;
   if (!i.origin_trans_)
     i.origin_trans_ = this;
+
+
+
   get_daddy_grav ()->announce_grob (i);
 }
 
@@ -60,6 +68,20 @@ Engraver::process_music ()
   
 }
 
+Item*
+Engraver::internal_make_item (SCM x)
+{
+  SCM props = internal_get_property (x);
+  return new Item (props);
+}
+
+Spanner*
+Engraver::internal_make_spanner (SCM x)
+{
+  SCM props = internal_get_property (x);
+  return new Spanner (props);
+}
+
 Engraver::Engraver()
 {
 }