]> git.donarmstrong.com Git - lilypond.git/blob - src/staffsym.cc
partial: 0.0.39-1.jcn
[lilypond.git] / src / staffsym.cc
1 /*
2   staffsym.cc -- implement Staff_symbol
3
4   source file of the LilyPond music typesetter
5
6   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8 #include "staffsym.hh"
9 #include "lookup.hh"
10 #include "paper-def.hh"
11 #include "debug.hh"
12
13
14
15 Staff_symbol::Staff_symbol(int l)
16 {
17     no_lines_i_ = l;
18 }
19
20 void
21 Staff_symbol::do_print()const
22 {
23     mtor << "lines: " << no_lines_i_;
24 }
25
26 Molecule*
27 Staff_symbol::brew_molecule_p() const
28 {
29     Atom a  = paper()->lookup_p_->linestaff(no_lines_i_, width().length());
30     return new Molecule(a);
31 }
32
33 Spanner*
34 Staff_symbol::do_break_at(PCol*p1, PCol*p2)const
35 {
36     Staff_symbol *span_p=new Staff_symbol(*this);
37     return span_p;
38 }
39
40 void
41 Staff_symbol::set_extent(PCol*p1, PCol*p2)
42 {
43     assert(p1&&p2);
44     left = p1;
45     right = p2;
46 }