]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/tuplet-spanner.cc
patch::: 1.3.9.hwn2
[lilypond.git] / lily / tuplet-spanner.cc
index 8ea56cdd42b9cc41fce0d5d20ab298527ec9b3af..7fed879b85e87ced82b247d42e5aeb05c5b91caf 100644 (file)
@@ -21,6 +21,9 @@
 
 Tuplet_spanner::Tuplet_spanner ()
 {
+  /*
+    -> GUILE
+   */
   parallel_beam_b_ = false;
 }
 
@@ -35,9 +38,13 @@ Tuplet_spanner::do_brew_molecule_p () const
   // Default behaviour: number always, bracket when no beam!
   bool bracket_visibility = !parallel_beam_b_;
   bool number_visibility = true;
-  SCM visibility_sym =get_elt_property (tuplet_visibility_scm_sym);
-  if (visibility_sym != SCM_BOOL_F)
+  SCM visibility_sym =get_elt_property ("tuplet-visibility");
+  if (visibility_sym != SCM_UNDEFINED)
     {
+      /*
+       ARG. Fixme.
+       */
+      
       /* Property values:
         0       show nothing
         1       show number
@@ -45,7 +52,7 @@ Tuplet_spanner::do_brew_molecule_p () const
         3       show number, and bracket-if-no-beam
         4       show number, and bracket
       */
-      int value = gh_scm2int (SCM_CDR(visibility_sym));
+      int value = gh_scm2int ((visibility_sym));
       bracket_visibility = (value == 4 || (value > 1 && !parallel_beam_b_));
       number_visibility = (value > 2 || value == 1 || 
                           (value == 2 && !parallel_beam_b_));
@@ -58,27 +65,27 @@ Tuplet_spanner::do_brew_molecule_p () const
                                     number_str_, paper_l ()));
     num.align_to (X_AXIS, CENTER);
     num.translate_axis (w/2, X_AXIS);
-    Real interline = paper_l ()->get_realvar (interline_scm_sym);
-    Real dy = column_arr_.top ()->extent (Y_AXIS) [dir_]
-      - column_arr_[0]->extent (Y_AXIS) [dir_];
+    Real interline = paper_l ()->get_var ("interline");
+    Real dy = column_arr_.top ()->extent (Y_AXIS) [get_direction ()]
+      - column_arr_[0]->extent (Y_AXIS) [get_direction ()];
     num.align_to (Y_AXIS, CENTER);
-    num.translate_axis (dir_ * interline, Y_AXIS);
+    num.translate_axis (get_direction () * interline, Y_AXIS);
        
     num.translate_axis (dy/2, Y_AXIS);
     
-    Real thick = paper_l ()->get_realvar (tuplet_thick_scm_sym);
+    Real thick = paper_l ()->get_var ("tuplet_thick");
     if (bracket_visibility)      
       {
        Real gap = paper_l () -> get_var ("tuplet_spanner_gap");
        
-       mol_p->add_molecule (lookup_l ()->tuplet_bracket (dy, w, thick, gap, interline, dir_));
+       mol_p->add_molecule (lookup_l ()->tuplet_bracket (dy, w, thick, gap, interline, get_direction ()));
       }
 
     if (number_visibility)
       {
        mol_p->add_molecule (num);
       }
-    mol_p->translate_axis (dir_ * interline, Y_AXIS);
+    mol_p->translate_axis (get_direction () * interline, Y_AXIS);
   }
   return mol_p;
 }
@@ -97,7 +104,7 @@ void
 Tuplet_spanner::do_post_processing ()
 {
   if (column_arr_.size())
-    translate_axis (column_arr_[0]->extent (Y_AXIS)[dir_], Y_AXIS);
+    translate_axis (column_arr_[0]->extent (Y_AXIS)[get_direction ()], Y_AXIS);
 
   if (beam_l_arr_.size () == 1)
     {
@@ -127,9 +134,9 @@ Direction
 Tuplet_spanner::get_default_dir () const
 {
   Direction d = UP;
-  SCM dir_sym =get_elt_property (dir_forced_scm_sym);
-  if (dir_sym != SCM_BOOL_F) {
-    d= (Direction) gh_scm2int (SCM_CDR(dir_sym));
+  SCM dir_sym =get_elt_property ("dir-forced");
+  if (dir_sym != SCM_UNDEFINED) {
+    d= (Direction) gh_scm2int (dir_sym);
     if (d != CENTER)
       return d;
   }
@@ -159,3 +166,4 @@ Tuplet_spanner::add_column (Note_column*n)
   add_dependency (n);
 }
 
+