2 textitem.cc -- implement Text_item
4 source file of the LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
10 #include "musicalrequest.hh"
11 #include "paper-def.hh"
12 #include "textitem.hh"
14 #include "molecule.hh"
19 Text_item::Text_item(Text_req
* treq_l
, int staffsize_i
)
21 staffsize_i_
= staffsize_i
;
22 dir_i_
= treq_l
->dir_i_
;
25 tdef_l_
= treq_l
->tdef_p_
;
29 Text_item::set_default_index()
31 pos_i_
= (dir_i_
> 0) ? staffsize_i_
+ 2: -4;
35 Text_item::do_pre_processing()
42 Text_item::brew_molecule_p() const
44 Molecule
* mol_p
= new Molecule(tdef_l_
->create_atom(paper()));
45 mol_p
->translate(Offset(0, pos_i_
* paper()->internote()));
48 mol_p
->translate(Offset(0, -mol_p
->extent().y
.length() ));