]> git.donarmstrong.com Git - lilypond.git/blob - lily/staff-sym.cc
release: 0.1.11
[lilypond.git] / lily / staff-sym.cc
1 /*
2   staffsym.cc -- implement Staff_symbol
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8 #include "staff-sym.hh"
9 #include "lookup.hh"
10 #include "paper-def.hh"
11 #include "molecule.hh"
12 #include "debug.hh"
13
14
15
16 Staff_symbol::Staff_symbol (int l)
17 {
18   no_lines_i_ = l;
19 }
20
21
22 IMPLEMENT_IS_TYPE_B1(Staff_symbol,Spanner);
23
24 void
25 Staff_symbol::do_print() const
26 {
27 #ifndef NPRINT
28   Spanner::do_print();
29   DOUT << "lines: " << no_lines_i_;
30 #endif
31 }
32
33 Molecule*
34 Staff_symbol::brew_molecule_p() const
35 {
36   Atom a  = paper()->lookup_l ()->linestaff (no_lines_i_, width ().length ());
37   return new Molecule (a);
38 }
39
40 Real
41 Staff_symbol::inter_note_f() const
42 {
43   return paper()->internote_f ();
44 }
45
46 int
47 Staff_symbol::steps_i() const
48 {
49   return no_lines_i_*2;
50 }