]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/grace-align-item.cc
release: 1.3.62
[lilypond.git] / lily / grace-align-item.cc
index 0ddf8481b7476d78f75d3879d4bb4932b1768e49..e4467a9e3fe1bb0a6fe6d2af12f18fcdf9362cac 100644 (file)
@@ -8,20 +8,27 @@
  */
 
 #include "grace-align-item.hh"
+#include "align-interface.hh"
 #include "lookup.hh"
 #include "paper-column.hh"
 #include "paper-def.hh"
 
-Grace_align_item::Grace_align_item ()
+Grace_align_item::Grace_align_item (SCM s)
+  : Item (s)
 {
   set_elt_property ("stacking-dir", gh_int2scm (RIGHT));
-  set_axis (X_AXIS);
+  Align_interface (this).set_interface();
+  Align_interface (this).set_axis (X_AXIS);
 }
-  
-void
-Grace_align_item::before_line_breaking ()
+
+/*
+  TODO: cfg-able
+ */
+GLUE_SCORE_ELEMENT(Grace_align_item,before_line_breaking);
+SCM
+Grace_align_item::member_before_line_breaking ()
 {
-  Real nhw = // lookup_l ()->notehead (2, "").dim_[X_AXIS].length();
+  Real nhw = // lookup_l ()->notehead (2, "")..extent (X_AXIS).length();
     paper_l ()->get_var ("quartwidth");
   
   set_elt_property ("threshold",
@@ -29,9 +36,8 @@ Grace_align_item::before_line_breaking ()
                             gh_double2scm (infinity_f)));
   column_l ()->set_elt_property ("contains-grace", SCM_BOOL_T);
 
-  
-  Axis_align_item::before_line_breaking ();
-  //  translate_axis (-0.5* nhw, X_AXIS); // ugh.
+  return SCM_UNDEFINED;
+
 }