]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/breathing-sign.cc
release: 1.3.11
[lilypond.git] / lily / breathing-sign.cc
index 923eeeab1e3f4841ae3ec95591ad51b3d5f5d45d..bf1f8dea96e3207c4d7158f0266766a20fe6520a 100644 (file)
@@ -8,6 +8,7 @@
 TODO: --> see breathing-sign-engraver.cc
 
 */
+#include "staff-symbol-referencer.hh"
 
 #include "breathing-sign.hh"
 #include "string.hh"
@@ -21,25 +22,18 @@ TODO: --> see breathing-sign-engraver.cc
 
 Breathing_sign::Breathing_sign ()
 {
-  dir_ = UP;
-  set_elt_property (breakable_scm_sym, SCM_BOOL_T);
-  set_elt_property (visibility_lambda_scm_sym,
-                   ly_ch_C_eval_scm ("non_postbreak_visibility"));
+  set_direction (UP);
+  set_elt_property ("breakable", SCM_BOOL_T);
 }
 
-void
-Breathing_sign::set_vertical_position (Direction updown)
-{
-  assert(updown >= -1 && updown <= +1);
 
-  if(updown != 0)
-    dir_ = updown;
-}
 
 Molecule*
 Breathing_sign::do_brew_molecule_p () const
 {
-  Real dl = staff_line_leading_f();
+  Staff_symbol_referencer_interface si (this);
+  
+  Real dl = si.staff_line_leading_f();
   Interval i1(0, dl / 6), i2(-dl / 2, dl / 2);
   Box b(i1, i2);
 
@@ -51,7 +45,8 @@ Breathing_sign::do_brew_molecule_p () const
 void
 Breathing_sign::do_post_processing()
 {
-  Real dl = staff_line_leading_f();
+  Real dl = Staff_symbol_referencer_interface (this).staff_line_leading_f();
 
-  translate_axis(2.0 * dl * dir_, Y_AXIS);
+  translate_axis(2.0 * dl * get_direction (), Y_AXIS);
 }
+