]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/staff-symbol.cc
release: 1.5.9
[lilypond.git] / lily / staff-symbol.cc
index ff2bfe4a8660c4abb6c328c933a4a2d71af7df88..cbb5784ab188cd1333c2b244f76a7517e6e3043c 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "lookup.hh"
 
 
 
-MAKE_SCHEME_CALLBACK(Staff_symbol,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Staff_symbol,brew_molecule,1);
 
 SCM
 Staff_symbol::brew_molecule (SCM smob)
 {
-  Score_element *me = unsmob_element (smob);
+  Grob *me = unsmob_grob (smob);
   Spanner* sp = dynamic_cast<Spanner*> (me);
-  Score_element * common
+  Grob * common
     = sp->get_bound (LEFT)->common_refpoint (sp->get_bound (RIGHT), X_AXIS);
   
   Real width =
@@ -48,19 +48,19 @@ Staff_symbol::brew_molecule (SCM smob)
       m.add_molecule (a);
     }
 
-  return m.create_scheme();
+  return m.smobbed_copy ();
 }
 
 int
-Staff_symbol::steps_i(Score_element*me) 
+Staff_symbol::steps_i (Grob*me) 
 {
   return line_count (me) * 2;
 }
 
 int
-Staff_symbol::line_count (Score_element*me) 
+Staff_symbol::line_count (Grob*me) 
 {
-  SCM c = me->get_elt_property ("line-count");
+  SCM c = me->get_grob_property ("line-count");
   if (gh_number_p (c))
     return gh_scm2int (c);
   else
@@ -68,18 +68,18 @@ Staff_symbol::line_count (Score_element*me)
 }
 
 Real
-Staff_symbol::staff_space (Score_element*me )
+Staff_symbol::staff_space (Grob*me)
 {
-  Real ss = me->paper_l ()->get_var ("staffspace");
+  Real ss = 1.0;
   
-  SCM s = me->get_elt_property ("staff-space");
+  SCM s = me->get_grob_property ("staff-space");
   if (gh_number_p (s))
     ss *= gh_scm2double (s);
   return ss;
 }
 
 bool
-Staff_symbol::has_interface (Score_element*m)
+Staff_symbol::has_interface (Grob*m)
 {
   return m && m->has_interface (ly_symbol2scm ("staff-symbol-interface"));
 }