2 text-item.cc -- implement Text_item
4 source file of the LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
10 #include "musical-request.hh"
11 #include "paper-def.hh"
12 #include "text-item.hh"
14 #include "molecule.hh"
17 Text_item::Text_item(Text_def *tdef_l, int d)
22 tdef_p_ = new Text_def(*tdef_l);
32 Text_item::~Text_item()
38 Text_item::set_default_index()
40 pos_i_ = get_position_i(tdef_p_->create_atom().extent().y );
44 Text_item::do_pre_processing()
48 tdef_p_->pdef_l_ = paper();
52 Text_item::do_post_processing()
59 Text_item::brew_molecule_p() const
61 Atom a(tdef_p_->create_atom());
64 a.sym.dim.x = tdef_p_->width();
66 Molecule* mol_p = new Molecule(a);
68 if(dir_i_<0 ) // should do something better anyway.
69 mol_p->translate(Offset(0, -mol_p->extent().y.left ));
70 mol_p->translate(Offset(0, pos_i_ * paper()->internote()));
75 IMPLEMENT_STATIC_NAME(Text_item);