X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Ftext-spanner.cc;h=05491f7c4b7267ac38316e235d9f5887dff4eb5b;hb=refs%2Ftags%2Frelease%2F1.1.28;hp=c23bb7e645e3ad1d40988579e6a9cca83d95a058;hpb=86d86173c41d3a4b832ce67768d58c6416c71d4e;p=lilypond.git diff --git a/lily/text-spanner.cc b/lily/text-spanner.cc index c23bb7e645..05491f7c4b 100644 --- a/lily/text-spanner.cc +++ b/lily/text-spanner.cc @@ -3,28 +3,35 @@ source file of the GNU LilyPond music typesetter - (c) 1997 Han-Wen Nienhuys + (c) 1997--1998 Han-Wen Nienhuys */ #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 (n):0); }