]> git.donarmstrong.com Git - lilypond.git/blob - lily/staff-sym.cc
8624878496e3adf96219882f7f74cc5a4b7185b5
[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 IMPLEMENT_STATIC_NAME(Staff_symbol);
22
23 void
24 Staff_symbol::do_print()const
25 {
26     mtor << "lines: " << no_lines_i_;
27 }
28
29 Molecule*
30 Staff_symbol::brew_molecule_p() const
31 {
32     Atom a  = paper()->lookup_l()->linestaff(no_lines_i_, width().length());
33     return new Molecule(a);
34 }
35
36 void
37 Staff_symbol::set_extent(PCol*p1, PCol*p2)
38 {
39     assert(p1&&p2);
40     left_col_l_ = p1;
41     right_col_l_ = p2;
42 }
43
44 Real
45 Staff_symbol::inter_note_f()const
46 {
47     return paper()->internote_f();
48 }
49
50 int
51 Staff_symbol::steps_i() const
52 {
53     return no_lines_i_*2;
54 }