]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/staff-symbol-engraver.cc
(class Phrasing_slur_engraver):
[lilypond.git] / lily / staff-symbol-engraver.cc
index 73c63f1dd739cab00e8b0c722591b6771c6d4943..32179bb746818dc5b44281b5a01c1c4d21cf4750 100644 (file)
@@ -45,17 +45,11 @@ Staff_symbol_engraver::process_music ()
       span_ = 0;
     }
 
-  if (span_events_[START])
+  if (span_events_[START]
+      || (first_start_ && !span_events_[STOP]))
     start_spanner ();
 }
 
-
-void
-Staff_symbol_engraver::initialize ()
-{
-  start_spanner ();
-}
-
 void
 Staff_symbol_engraver::start_spanner ()
 {
@@ -99,23 +93,29 @@ Staff_symbol_engraver::finalize ()
   stop_spanner ();
 }
 
+/*
+  Todo: staff-symbol-referencer iface.
+ */
 void
 Staff_symbol_engraver::acknowledge_grob (Grob_info s)
 {
-
   /*
     Perhaps should try to take SeparationItem as bound of the staff
     symbol?
    */
-  if (span_)
-    s.grob_->set_property ("staff-symbol", span_->self_scm ());
+  if (span_  || finished_span_ )
+    {
+      Spanner *my = span_ ? span_ : finished_span_;
+      s.grob ()->set_object ("staff-symbol", my->self_scm ());
+    }
 }
 
+#include "translator.icc"
+ADD_ACKNOWLEDGER (Staff_symbol_engraver,grob);
 ADD_TRANSLATOR (Staff_symbol_engraver,
-               /* descr */ "Create the constellation of five (default) "
+               /* doc */ "Create the constellation of five (default) "
                "staff lines.",
-               /* creats*/ "StaffSymbol",
-               /* accepts */ "staff-span-event",
-               /* acks  */ "grob-interface",
-               /* reads */ "",
+               /* create */ "StaffSymbol",
+               /* accept */ "staff-span-event",
+               /* read */ "",
                /* write */ "");