lilypond-1.3.11
[lilypond.git] / lily / staff-sym-reg.cc
blobc309351a819292a891d9eda1ed4edce8c01cd68a
1 /*
2 staff-sym-reg.cc -- implement Staff_sym_register
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
9 #include "staff-sym-reg.hh"
10 #include "staff-sym.hh"
11 #include "score.hh"
12 #include "p-col.hh"
14 const NO_LINES = 5;
15 void
16 Staff_sym_register::fill_staff_info(Staff_info&i)
18 i.staff_sym_l_ = span_p_;
21 Staff_sym_register::Staff_sym_register()
23 span_p_ = 0;
26 void
27 Staff_sym_register::do_creation_processing()
29 span_p_ = new Staff_symbol(NO_LINES);
30 span_p_->left_col_l_ = get_staff_info().command_pcol_l(); // ugh
33 void
34 Staff_sym_register::do_removal_processing()
36 span_p_->right_col_l_ = get_staff_info().command_pcol_l();
37 typeset_element(span_p_);
38 span_p_ =0;
41 void
42 Staff_sym_register::do_process_requests()
44 announce_element(Score_elem_info(span_p_, 0));
48 IMPLEMENT_STATIC_NAME(Staff_sym_register);
49 IMPLEMENT_IS_TYPE_B1(Staff_sym_register,Request_register);
50 ADD_THIS_REGISTER(Staff_sym_register);