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