2 lyric-engraver.cc -- implement Lyric_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 #include "lyric-engraver.hh"
10 #include "musical-request.hh"
11 #include "text-item.hh"
12 #include "paper-def.hh"
14 #include "paper-def.hh"
17 Lyric_engraver::Lyric_engraver()
24 Lyric_engraver::do_try_request (Request*r)
26 Musical_req * m =r->access_Musical_req ();
27 if (!m || ! m->access_Lyric_req ())
29 lreq_l_ = m->access_Lyric_req ();
35 Lyric_engraver::do_process_requests()
39 Text_def *td_p = new Text_def;
40 td_p->text_str_ = lreq_l_->text_str_;
41 td_p->align_dir_ = LEFT;
42 Scalar style = get_property ("textstyle");
43 if (style.length_i ())
45 td_p->style_str_ = style;
48 lyric_item_p_ = new Text_item (td_p);
50 lyric_item_p_->dir_ = DOWN;
51 lyric_item_p_->fat_b_ = true;
52 announce_element (Score_element_info (lyric_item_p_, lreq_l_));
57 Lyric_engraver::do_post_move_processing()
63 Lyric_engraver::do_pre_move_processing()
67 typeset_element (lyric_item_p_);
73 IMPLEMENT_IS_TYPE_B1(Lyric_engraver,Engraver);
74 ADD_THIS_TRANSLATOR(Lyric_engraver);