lilypond-0.1.57
[lilypond.git] / lily / staff-sym-grav.cc
blob6aab67dece77bedede5aad66926fbfeba04c4183
1 /*
2 staff-sym-reg.cc -- implement Staff_sym_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
9 #include "staff-sym-grav.hh"
10 #include "staff-sym.hh"
11 #include "score.hh"
12 #include "p-col.hh"
15 void
16 Staff_sym_engraver::fill_staff_info (Staff_info&i)
18 i.staff_sym_l_ = span_p_;
21 Staff_sym_engraver::~Staff_sym_engraver()
23 assert (!span_p_);
26 Staff_sym_engraver::Staff_sym_engraver()
28 span_p_ = 0;
31 void
32 Staff_sym_engraver::do_creation_processing()
34 span_p_ = new Staff_symbol;
35 span_p_->set_bounds(LEFT,get_staff_info().command_pcol_l ());
36 announce_element (Score_elem_info (span_p_, 0));
39 void
40 Staff_sym_engraver::do_removal_processing()
42 Scalar l (get_property ("nolines"));
43 if (l.isnum_b ())
45 span_p_->no_lines_i_ = l;
48 span_p_->set_bounds(RIGHT,get_staff_info().command_pcol_l ());
49 typeset_element (span_p_);
50 span_p_ =0;
55 IMPLEMENT_IS_TYPE_B1(Staff_sym_engraver,Engraver);
56 ADD_THIS_TRANSLATOR(Staff_sym_engraver);