]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/note-column.cc
release: 1.3.50
[lilypond.git] / lily / note-column.cc
index 8dca8fc0610632b10737a4d088423cf70256438c..1f424860feaaaab8a140d1625bd20a6a43f45549 100644 (file)
@@ -7,7 +7,7 @@
 */
 #include <math.h>              // ceil
 
-
+#include "axis-group-interface.hh"
 #include "dot-column.hh"
 #include "note-column.hh"
 #include "beam.hh"
@@ -42,7 +42,9 @@ Note_column::Note_column()
 {
   set_elt_property ("rests", SCM_EOL);
   set_elt_property ("note-heads", SCM_EOL);  
-  set_axes (X_AXIS, Y_AXIS);
+  Axis_group_interface (this).set_interface ();
+  Axis_group_interface (this).set_axes (X_AXIS, Y_AXIS);
+  Group_interface (this, "interfaces").add_thing (ly_symbol2scm ("Note_column"));
 }
 
 Stem *
@@ -92,7 +94,7 @@ Note_column::set_stem (Stem * stem_l)
   set_elt_property ("stem", stem_l->self_scm_);
 
   add_dependency (stem_l);
-  add_element (stem_l);
+  Axis_group_interface (this).add_element (stem_l);
 }
 
 
@@ -110,7 +112,7 @@ Note_column::add_head (Rhythmic_head *h)
       Group_interface gi (this, "note-heads");
       gi.add_element (nh);
     }
-  add_element (h);
+  Axis_group_interface (this).add_element (h);
 }
 
 /**
@@ -133,7 +135,7 @@ Note_column::translate_rests (int dy_i)
 void
 Note_column::set_dotcol (Dot_column *d)
 {
-  add_element (d);
+  Axis_group_interface (this).add_element (d);
 }
 
 /*
@@ -147,7 +149,7 @@ Note_column::set_dotcol (Dot_column *d)
 */
 
 void
-Note_column::do_post_processing ()
+Note_column::after_line_breaking ()
 {
   if (!stem_l () || !rest_b ())
     return;
@@ -172,12 +174,12 @@ Note_column::do_post_processing ()
     beam_y = gh_scm2double (s);
 
   
-  Real x0 = b->first_visible_stem ()->hpos_f ();
-  Real dx = b->last_visible_stem ()->hpos_f () - x0;
+  Real x0 = b->first_visible_stem ()->relative_coordinate (0, X_AXIS);
+  Real dx = b->last_visible_stem ()->relative_coordinate (0, X_AXIS) - x0;
   Real dydx = beam_dy && dx ? beam_dy/dx : 0;
 
   Direction d = stem_l ()->get_direction ();
-  Real beamy = (stem_l ()->hpos_f () - x0) * dydx + beam_y;
+  Real beamy = (stem_l ()->relative_coordinate (0, X_AXIS) - x0) * dydx + beam_y;
 
   s = get_elt_property ("rests");
   Score_element * se = unsmob_element (gh_car (s));