2 text-item.cc -- implement Text_item
4 source file of the GNU 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)
21 tdef_p_ = new Text_def(*tdef_l);
31 Text_item::~Text_item()
37 Text_item::set_default_index()
39 pos_i_ = get_position_i(tdef_p_->create_atom().extent().y );
43 Text_item::do_pre_processing()
47 tdef_p_->pdef_l_ = paper();
51 Text_item::do_post_processing()
58 Text_item::brew_molecule_p() const
60 Atom a(tdef_p_->create_atom());
63 a.sym.dim.x = tdef_p_->width();
65 Molecule* mol_p = new Molecule(a);
67 if(dir_i_<0 ) // should do something better anyway.
68 mol_p->translate(Offset(0, -mol_p->extent().y.left ));
69 mol_p->translate(Offset(0, pos_i_ * paper()->internote_f()));
74 IMPLEMENT_STATIC_NAME(Text_item);