2 text-spanner.cc -- implement Text_spanner
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
11 #include "text-spanner.hh"
12 #include "text-def.hh"
14 #include "paper-def.hh"
19 Text_spanner::set_support(Directional_spanner*d)
22 remove_dependency(support);
28 Text_spanner::Text_spanner()
34 IMPLEMENT_STATIC_NAME(Text_spanner);
37 Text_spanner::do_print() const
43 Text_spanner::do_post_processing()
45 text_off_ = support->center() +
46 Offset(0,support->dir_i_ * paper()->internote_f() * 4); // todo
50 Text_spanner::brew_molecule_p() const
52 Atom tsym (spec_p_->get_atom(paper(),0));
53 tsym.translate(text_off_);
55 Molecule*output = new Molecule;
61 Text_spanner::do_pre_processing()
63 right_col_l_ = support->right_col_l_;
64 left_col_l_ = support->left_col_l_;
65 assert(left_col_l_ && right_col_l_);
69 Text_spanner::height()const
71 return brew_molecule_p()->extent().y;
75 Text_spanner::do_substitute_dependency(Score_elem* o, Score_elem*n)
77 Directional_spanner * old = (Directional_spanner*)o->spanner();
79 support = (Directional_spanner*) n->spanner();
83 Text_spanner::~Text_spanner()