2 text-item.cc -- implement Text_item
4 source file of the GNU LilyPond music typesetter
6 (c) 1998--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "text-item.hh"
12 #include "molecule.hh"
13 #include "paper-def.hh"
15 #include "staff-symbol-referencer.hh"
17 Text_item::Text_item (SCM s)
24 Text_item::do_brew_molecule () const
26 SCM style = get_elt_property ("style");
27 String st = gh_string_p (style) ? ly_scm2string (style) : "";
28 SCM txt = get_elt_property ("text");
29 String t = gh_string_p (txt) ? ly_scm2string (txt) : "";
31 Molecule mol = paper_l ()->lookup_l(0)->text (st, t, paper_l ());
33 SCM s = get_elt_property ("word-space");
38 mol.add_at_edge (X_AXIS, RIGHT, m, gh_scm2double (s)*
39 staff_symbol_referencer (this).staff_space ());