2 sustain-pedal.cc -- implement Sustain_pedal
4 source file of the GNU LilyPond music typesetter
6 (c) 2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "sustain-pedal.hh"
11 #include "side-position-interface.hh"
12 #include "molecule.hh"
14 #include "staff-symbol-referencer.hh"
17 Sustain_pedal::after_line_breaking ()
20 UGH. Should work automatically via offset callback.
22 Side_position_interface i (this);
23 Direction d = i.get_direction ();
28 Sustain_pedal::do_brew_molecule () const
31 SCM glyph = get_elt_property ("text");
32 if (glyph == SCM_UNDEFINED)
34 String text = ly_scm2string (glyph);
36 for (int i = 0; i < text.length_i (); i++)
38 String idx ("pedal-");
39 if (text.cut_str (i, i + 2) == "Ped")
45 idx += String (&text.byte_C ()[i], 1);
46 Molecule m = lookup_l ()->afm_find (idx);
48 mol.add_at_edge (X_AXIS, RIGHT, m, 0);
54 Sustain_pedal ::Sustain_pedal(SCM s )