]> git.donarmstrong.com Git - lilypond.git/blob - lily/text-def.cc
release: 0.0.46.jcn1
[lilypond.git] / lily / text-def.cc
1 #include "debug.hh"
2 #include "lookup.hh"
3 #include "paper-def.hh"
4 #include "molecule.hh"
5 #include "text-def.hh"
6
7 Text_def::Text_def()
8 {   
9     align_i_ = 1;                       // right
10     style_str_ = "roman";
11 }
12 bool
13 Text_def::compare(Text_def const &def)
14 {
15     return align_i_ == def.align_i_ && text_str_ == def.text_str_
16         && style_str_ == def.style_str_;
17 }
18
19 Atom
20 Text_def::create_atom(Paper_def*p) const
21 {
22     return p->lookup_l()->text(style_str_, text_str_, -align_i_);
23 }
24
25 void
26 Text_def::print() const
27 {
28     mtor << "Text `" << text_str_ << "\', style " <<
29         style_str_ << "align " << align_i_ << '\n';
30 }