]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.67
authorfred <fred>
Tue, 26 Mar 2002 23:24:06 +0000 (23:24 +0000)
committerfred <fred>
Tue, 26 Mar 2002 23:24:06 +0000 (23:24 +0000)
lily/stem.cc
ly/engraver.ly

index e8fe8b4647e08653252add2ce91dceb65a097141..694be6fde2e9667b81c4a75e8edcdeec936dc92d 100644 (file)
@@ -15,7 +15,7 @@
 #include "stem.hh"
 #include "debug.hh"
 #include "paper-def.hh"
-#include "note-head.hh"
+#include "rhythmic-head.hh"
 #include "lookup.hh"
 #include "molecule.hh"
 #include "paper-column.hh"
@@ -61,10 +61,10 @@ Stem::head_positions () const
     }
 
   
-  Drul_array<Note_head*> e (extremal_heads ());
+  Drul_array<Rhythmic_head*> e (extremal_heads ());
 
-  return Interval (staff_symbol_referencer (e[DOWN]).position_f (),
-                  staff_symbol_referencer( e[UP]).position_f ()); 
+  return Interval (Staff_symbol_referencer_interface (e[DOWN]).position_f (),
+                  Staff_symbol_referencer_interface ( e[UP]).position_f ()); 
 }
 
 
@@ -159,7 +159,7 @@ Stem::heads_i ()const
 /*
   The note head which forms one end of the stem.  
  */
-Note_head*
+Rhythmic_head*
 Stem::first_head () const
 {
   return extremal_heads ()[-get_direction ()];
@@ -168,7 +168,7 @@ Stem::first_head () const
 /*
   START is part where stem reaches `last' head. 
  */
-Drul_array<Note_head*>
+Drul_array<Rhythmic_head*>
 Stem::extremal_heads () const
 {
   const int inf = 1000000;
@@ -176,12 +176,12 @@ Stem::extremal_heads () const
   extpos[DOWN] = inf;
   extpos[UP] = -inf;  
   
-  Drul_array<Note_head *> exthead;
+  Drul_array<Rhythmic_head *> exthead;
   exthead[LEFT] = exthead[RIGHT] =0;
   
   for (SCM s = get_elt_pointer ("heads"); gh_pair_p (s); s = gh_cdr (s))
     {
-      Note_head * n = dynamic_cast<Note_head*> (unsmob_element (gh_car (s)));
+      Rhythmic_head * n = dynamic_cast<Rhythmic_head*> (unsmob_element (gh_car (s)));
       Staff_symbol_referencer_interface si (n);
       
       int p = int(si.position_f ());
@@ -205,12 +205,9 @@ Stem::add_head (Rhythmic_head *n)
   n->set_elt_pointer ("stem", this->self_scm_);
   n->add_dependency (this);
 
-  if (Note_head *nh = dynamic_cast<Note_head *> (n))
+  if (to_boolean (n->get_elt_property ("note-head-interface")))
     {
-      Pointer_group_interface gi (this);
-      gi.name_ = "heads";
-
-      gi.add_element (n);
+      Pointer_group_interface (this, "heads").add_element (n);
     }
   else
     {
@@ -232,7 +229,7 @@ Stem::invisible_b () const
   /*
     UGH. Who determines balltype for stem?
    */
-  Note_head * nh = dynamic_cast<Note_head*> (support_head ());
+  Rhythmic_head * nh = dynamic_cast<Rhythmic_head*> (support_head ());
   return !(heads_i () && nh->balltype_i () >= 1);
 }
 
@@ -476,7 +473,7 @@ Stem::member_brew_molecule () const
   Interval stem_y(y1,y2);
   stem_y.unite (Interval (y2,y1));
 
-  Real dy = staff_symbol_referencer (this).staff_space ()/2.0;
+  Real dy = Staff_symbol_referencer_interface (this).staff_space ()/2.0;
   Real head_wid = 0;
   if (support_head ())
     head_wid = support_head ()->extent (X_AXIS).length ();
@@ -506,7 +503,7 @@ Stem::off_callback (Score_element const* se, Axis)
   Stem *st = dynamic_cast<Stem*> ((Score_element*)se);
 
   Real r=0;
-  if (Note_head * f = st->first_head ())
+  if (Rhythmic_head * f = st->first_head ())
     {
       Interval head_wid(0, f->extent (X_AXIS).length ());
 
index 2fff02a9f84715b1ef63dfad99e47f69986fc198..cb548ddceda9acc52fdd25df12dfb01dbfae882f 100644 (file)
@@ -461,11 +461,10 @@ ScoreContext = \translator {
                (molecule-callback . ,Crescendo::brew_molecule)
        )
        basicDotColumnProperties = #`(
-               (after-line-breaking-callback . ,Dot_column::after_line_breaking)
+               (dot-column-interface . #t)
        )
        basicDotsProperties = #`(
                (molecule-callback . ,Dots::brew_molecule)
-               (after-line-breaking-callback . ,Dots::after_line_breaking)
                (dot-count . 1)
                (dots-interface . #t)
        )
@@ -525,7 +524,7 @@ ScoreContext = \translator {
        basicMultiMeasureRestProperties = #`(
                (molecule-callback . ,Multi_measure_rest::brew_molecule)
                (staff-position . 0)
-               (after-line-breaking-callback . ,Multi_measure_rest::after_line_breaking)
+
        )
        basicNoteColumnProperties = #`(
                (axes 0 1)
@@ -533,8 +532,6 @@ ScoreContext = \translator {
        basicNoteHeadProperties = #`(
                (note-head-interface . #t)
                (molecule-callback . ,Note_head::brew_molecule)
-               (before-line-breaking-callback . ,Note_head::before_line_breaking)
-               (after-line-breaking-callback . ,Rhythmic_head::after_line_breaking)
        )
        basicNoteNameProperties = #`(
                (molecule-callback . ,Text_item::brew_molecule)
@@ -557,7 +554,6 @@ ScoreContext = \translator {
        basicRestProperties = #`(
                (rest-interface . #t)   
                (molecule-callback . ,Rest::brew_molecule)
-               (after-line-breaking-callback . ,Rhythmic_head::after_line_breaking)
                (minimum-beam-collision-distance . 1.5)
        )
        
@@ -611,6 +607,7 @@ ScoreContext = \translator {
        basicStemProperties = #`(
                (before-line-breaking-callback . ,Stem::before_line_breaking)
                (molecule-callback . ,Stem::brew_molecule)
+               (stem-interface . #t)
        )
        staffSymbolBasicProperties = #`(
                (molecule-callback . ,Staff_symbol::brew_molecule)