]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/text-spanner.cc
release: 1.1.28
[lilypond.git] / lily / text-spanner.cc
index c23bb7e645e3ad1d40988579e6a9cca83d95a058..05491f7c4b7267ac38316e235d9f5887dff4eb5b 100644 (file)
@@ -3,28 +3,35 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+  (c)  1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "molecule.hh"
-#include "boxes.hh"
+#include "box.hh"
 #include "text-spanner.hh"
 #include "text-def.hh"
 #include "debug.hh"
 #include "paper-def.hh"
-#include "atom.hh"
+
 
 
 void
 Text_spanner::set_support (Directional_spanner*d)
 {
   if (support_span_l_)
-       remove_dependency (support_span_l_);
+    remove_dependency (support_span_l_);
   
   support_span_l_ =d;
   add_dependency (d);
 }
 
+void
+Text_spanner::do_add_processing ()
+{
+  set_bounds (LEFT, support_span_l_->spanned_drul_[LEFT]);
+  set_bounds (RIGHT, support_span_l_->spanned_drul_[RIGHT]);
+}
+
 Text_spanner::Text_spanner()
 {
   spec_p_ = 0;
@@ -32,7 +39,7 @@ Text_spanner::Text_spanner()
 }
 
 
-IMPLEMENT_IS_TYPE_B1(Text_spanner,Spanner);
+
 
 void
 Text_spanner::do_print() const
@@ -48,13 +55,13 @@ Text_spanner::do_post_processing()
 }
 
 Molecule*
-Text_spanner::brew_molecule_p() const
+Text_spanner::do_brew_molecule_p() const
 {
-  Atom tsym (spec_p_->get_atom (paper(),CENTER));
+  Molecule tsym (spec_p_->get_molecule (paper(),CENTER));
   tsym.translate (text_off_);
 
   Molecule*output = new Molecule;
-  output->add (tsym);
+  output->add_molecule (tsym);
   return output;
 }
 
@@ -67,14 +74,14 @@ Text_spanner::do_pre_processing()
 Interval
 Text_spanner::height() const
 {
-  return brew_molecule_p()->extent ().y ();
+  return do_brew_molecule_p()->extent ().y ();
 }
 
 void
-Text_spanner::do_substitute_dependency (Score_elem* o, Score_elem*n)
+Text_spanner::do_substitute_dependency (Score_element* o, Score_element*n)
 {
   if (support_span_l_ == o) 
-       support_span_l_ = (Directional_spanner*) (n?n->spanner():0);
+       support_span_l_ = (Directional_spanner*) (n?dynamic_cast <Spanner *> (n):0);
 }