]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/chord-name-engraver.cc
release: 1.3.0
[lilypond.git] / lily / chord-name-engraver.cc
index 95784a44bcfdbbbe74734792b45a43836f0f6f36..d0005c89833380089873a782a1255e9143631311 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 19981999 Jan Nieuwenhuizen <janneke@gnu.org>
+  (c) 1998--1999 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 #include "chord-name-engraver.hh"
@@ -14,7 +14,7 @@
 #include "paper-def.hh"
 #include "main.hh"
 #include "dimensions.hh"
-#include "g-text-item.hh"
+#include "text-item.hh"
 
 ADD_THIS_TRANSLATOR (Chord_name_engraver);
 
@@ -56,8 +56,8 @@ Chord_name_engraver::do_process_requests ()
 
   Chord chord (pitch_arr_);
   Musical_pitch* inversion = 0;
-  Scalar chord_inversion = get_property ("chordInversion", 0);
-  if (chord_inversion.to_bool ())
+  SCM chord_inversion = get_property ("chordInversion", 0);
+  if (gh_boolean_p (chord_inversion) && gh_scm2bool (chord_inversion))
     {
       int tonic_i = tonic_req_
        ? chord.find_notename_i (tonic_req_->pitch_) : chord.find_tonic_i ();
@@ -69,23 +69,23 @@ Chord_name_engraver::do_process_requests ()
        }
     }
     
-  G_text_item* item_p =  new G_text_item;
+  Text_item* item_p =  new Text_item;
 
   /*
    TODO:
      - switch on property, add american (?) chordNameStyle:
        Chord::american_str (...)
 
-  Scalar chordNameStyle = get_property ("chordNameStyle", 0);
+  SCM chordNameStyle = get_property ("chordNameStyle", 0);
   if (chordNameStyle == "Banter")
     item_p->text_str_ = chord.banter_str (inversion);
    */
 
   item_p->text_str_ = chord.banter_str (inversion);
   
-  Scalar style = get_property ("textstyle", 0);
-  if (style.length_i ())
-    item_p->style_str_ = style;
+  SCM style = get_property ("textStyle", 0);
+  if (gh_string_p (style))
+    item_p->style_str_ = ly_scm2string (style);
   
   text_p_arr_.push (item_p);
   announce_element (Score_element_info (item_p, 0));