]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/text-engraver.cc
patch::: 1.3.18.jcn3
[lilypond.git] / lily / text-engraver.cc
index 40646392ed5a4923bacddde0d0207c7fb22052fb..3c18529ed74477ad328db1edfb42ebbd10b6bfd5 100644 (file)
@@ -6,10 +6,10 @@
   (c) 1998--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
-#include "dimension-cache.hh"
 
+#include "dimension-cache.hh"
 #include "engraver.hh"
-#include "staff-side.hh"
+#include "side-position-interface.hh"
 #include "text-item.hh"
 #include "musical-request.hh"
 #include "note-head.hh"
@@ -34,6 +34,7 @@ protected:
   virtual void acknowledge_element (Score_element_info);
 };
 
+ADD_THIS_TRANSLATOR (Text_engraver);
 
 bool
 Text_engraver::do_try_music (Music *m)
@@ -82,7 +83,7 @@ Text_engraver::do_process_requests ()
       Side_position_interface stafy (text);
 
       SCM axisprop = get_property ("scriptHorizontal",0);
-      if (gh_boolean_p (axisprop) && gh_scm2bool (axisprop))
+      if (to_boolean (axisprop))
        {
          stafy.set_axis (X_AXIS);
          //      text->set_parent (ss, Y_AXIS);
@@ -96,13 +97,14 @@ Text_engraver::do_process_requests ()
       if (r->get_direction ())
        stafy.set_direction (r->get_direction ());
       
-      text->text_str_ = r->text_str_;
+      text->set_elt_property ("text",
+                             ly_str02scm ( r->text_str_.ch_C ()));
       
       if (r->style_str_.length_i ())
        text->set_elt_property ("style", ly_str02scm (r->style_str_.ch_C()));
       
       SCM empty = get_property ("textEmptyDimension", 0);
-      if (gh_boolean_p (empty) && gh_scm2bool (empty))
+      if (to_boolean (empty))
        {
          text->set_empty (X_AXIS);
        }
@@ -128,5 +130,3 @@ Text_engraver::do_post_move_processing ()
   reqs_.clear ();
 }
 
-ADD_THIS_TRANSLATOR(Text_engraver);
-