2 lyric-engraver.cc -- implement Lyric_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 Jan Nieuwenhuizen <janneke@gnu.org>
10 #include "lyric-engraver.hh"
11 #include "musical-request.hh"
13 #include "paper-def.hh"
15 #include "side-position-interface.hh"
17 ADD_THIS_TRANSLATOR (Lyric_engraver);
20 Lyric_engraver::Lyric_engraver()
27 Lyric_engraver::do_try_music (Music*r)
29 if (Lyric_req* l = dynamic_cast <Lyric_req *> (r))
40 Lyric_engraver::do_process_music()
44 text_p_= new Item (get_property ("basicLyricTextProperties"));
46 text_p_->set_elt_property ("text",
47 // ly_str02scm ((req_l_->text_str_ + " ").ch_C ()));
48 ly_str02scm ((req_l_->text_str_).ch_C ()));
50 text_p_->add_offset_callback (&Side_position::aligned_on_self,X_AXIS);
52 We can't reach the notehead where we're centered from here. So
55 (UGH UGH, pulled amount of space out of thin air value )
58 text_p_->translate_axis (paper_l()->get_var ("staffspace")*0.66, X_AXIS);
60 announce_element (text_p_, req_l_);
65 Lyric_engraver::do_pre_move_processing()
69 typeset_element (text_p_);
75 Lyric_engraver::do_post_move_processing ()