lilypond-1.3.122
[lilypond.git] / lily / staffsym.cc
blob0ad2411589351434d7b61e9e3954971811bfe6da
1 /*
2 staffsym.cc -- implement Staff_symbol
4 source file of the LilyPond music typesetter
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"
15 Staff_symbol::Staff_symbol(int l)
17 no_lines_i_ = l;
20 IMPLEMENT_STATIC_NAME(Staff_symbol);
22 void
23 Staff_symbol::do_print()const
25 mtor << "lines: " << no_lines_i_;
28 Molecule*
29 Staff_symbol::brew_molecule_p() const
31 Atom a = paper()->lookup_l()->linestaff(no_lines_i_, width().length());
32 return new Molecule(a);
35 Spanner*
36 Staff_symbol::do_break_at(PCol*p1, PCol*p2)const
38 Staff_symbol *span_p=new Staff_symbol(*this);
39 return span_p;
42 void
43 Staff_symbol::set_extent(PCol*p1, PCol*p2)
45 assert(p1&&p2);
46 left = p1;
47 right = p2;