]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/dot-column.cc
release: 1.3.62
[lilypond.git] / lily / dot-column.cc
index 75f8391fe934b16092c5dd2b2aa4d2e9da6c8bb6..1caf93797849862849291611f95fec7c5be9508f 100644 (file)
@@ -20,7 +20,7 @@
 void
 Dot_column::add_dots (Dots *d)
 {
-  Group_interface gi (this, "dots");
+  Pointer_group_interface gi (this, "dots");
   gi.add_element (d);
 
   add_dependency (d);
@@ -48,9 +48,10 @@ Dot_column::compare (Dots * const &d1, Dots * const &d2)
 }
 
 
-Dot_column::Dot_column ()
+Dot_column::Dot_column (SCM s)
+  : Item (s)
 {
-  Group_interface gi (this, "dots");
+  Pointer_group_interface gi (this, "dots");
   gi.set_interface ();
   directional_element (this).set (RIGHT);
   
@@ -73,14 +74,16 @@ Dot_column::Dot_column ()
 
    Should be smarter.
  */
-void
-Dot_column::after_line_breaking ()
+
+GLUE_SCORE_ELEMENT(Dot_column,after_line_breaking);
+SCM
+Dot_column::member_after_line_breaking ()
 {
-  Link_array<Dots> dots = Group_interface__extract_elements (this, (Dots*)0 , "dots"); 
+  Link_array<Dots> dots = Pointer_group_interface__extract_elements (this, (Dots*)0 , "dots"); 
   dots.sort (Dot_column::compare);
   
   if (dots.size () < 2)
-    return;
+    return SCM_UNDEFINED;
   Slice s;
   s.set_empty ();
 
@@ -100,7 +103,8 @@ Dot_column::after_line_breaking ()
     }
 
   if (!conflicts)
-    return;
+  return SCM_UNDEFINED;
+
   
   int  middle = s.center ();
   /*
@@ -110,8 +114,10 @@ Dot_column::after_line_breaking ()
   if (!(pos % 2))
     pos ++;                    // center () rounds down.
 
-  for (int i=0; i  <dots.size (); pos += 2, i++)
+  for (int i=0; i dots.size (); pos += 2, i++)
     {
       staff_symbol_referencer (dots[i]).set_position(pos);
     }
+
+  return SCM_UNDEFINED;
 }