]> git.donarmstrong.com Git - lilypond.git/blob - lily/staff-sym-grav.cc
release: 0.1.11
[lilypond.git] / lily / staff-sym-grav.cc
1 /*
2   staff-sym-reg.cc -- implement Staff_sym_engraver
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8
9 #include "staff-sym-grav.hh"
10 #include "staff-sym.hh"
11 #include "score.hh"
12 #include "p-col.hh"
13
14 const NO_LINES = 5;
15
16 void
17 Staff_sym_engraver::fill_staff_info (Staff_info&i)
18 {
19   i.staff_sym_l_ = span_p_;
20 }
21
22 Staff_sym_engraver::~Staff_sym_engraver()
23 {
24   assert (!span_p_);
25 }
26
27 Staff_sym_engraver::Staff_sym_engraver()
28 {
29    span_p_ = 0;
30 }
31
32 void
33 Staff_sym_engraver::do_creation_processing()
34 {
35   span_p_ = new Staff_symbol (NO_LINES);
36   span_p_->set_bounds(LEFT,get_staff_info().command_pcol_l ());
37   announce_element (Score_elem_info (span_p_, 0));
38 }
39
40 void
41 Staff_sym_engraver::do_removal_processing()
42 {
43   span_p_->set_bounds(RIGHT,get_staff_info().command_pcol_l ());
44   typeset_element (span_p_);
45   span_p_ =0;
46 }
47
48
49
50 IMPLEMENT_IS_TYPE_B1(Staff_sym_engraver,Engraver);
51 ADD_THIS_ENGRAVER(Staff_sym_engraver);