]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/dot-column.cc
release: 1.3.47
[lilypond.git] / lily / dot-column.cc
index d085bf401116a6b8dbbdab1086e4eb6452c93b9a..2dc724e9f60cf22c4dad131de8eadf041361c4b1 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "dots.hh"
 #include "rhythmic-head.hh"
 #include "group-interface.hh"
 #include "staff-symbol-referencer.hh"
+#include "directional-element-interface.hh"
+#include "side-position-interface.hh"
+#include "axis-group-interface.hh"
 
+
+// todo: dots and elements duplicate each other.
 void
 Dot_column::add_dots (Dots *d)
 {
@@ -19,7 +24,7 @@ Dot_column::add_dots (Dots *d)
   gi.add_element (d);
 
   add_dependency (d);
-  add_element (d);
+  Axis_group_interface (this).add_element (d);
 }
 
 void
@@ -28,7 +33,7 @@ Dot_column::add_head (Rhythmic_head *r)
   if (!r->dots_l ())
     return ;
 
-  add_support (r);
+  side_position (this).add_support (r);
   add_dots (r->dots_l ());
 }
 
@@ -38,7 +43,6 @@ Dot_column::compare (Dots * const &d1, Dots * const &d2)
 {
   Staff_symbol_referencer_interface s1(d1);
   Staff_symbol_referencer_interface s2(d2);  
-
   
   return int (s1.position_f () - s2.position_f ());
 }
@@ -48,9 +52,10 @@ Dot_column::Dot_column ()
 {
   Group_interface gi (this, "dots");
   gi.set_interface ();
+  directional_element (this).set (RIGHT);
   
-  set_direction (RIGHT);
-  set_axes(X_AXIS,X_AXIS);
+  Axis_group_interface (this).set_interface ();
+  Axis_group_interface (this).set_axes(X_AXIS,X_AXIS);
 }
 
 /*
@@ -69,7 +74,7 @@ Dot_column::Dot_column ()
    Should be smarter.
  */
 void
-Dot_column::do_post_processing ()
+Dot_column::after_line_breaking ()
 {
   Link_array<Dots> dots = Group_interface__extract_elements (this, (Dots*)0 , "dots"); 
   dots.sort (Dot_column::compare);
@@ -107,6 +112,6 @@ Dot_column::do_post_processing ()
 
   for (int i=0; i  <dots.size (); pos += 2, i++)
     {
-      staff_symbol_referencer_interface (dots[i]).set_position(pos);
+      staff_symbol_referencer (dots[i]).set_position(pos);
     }
 }