]> git.donarmstrong.com Git - lilypond.git/blob - lily/staff-sym-reg.cc
release: 0.0.71pre
[lilypond.git] / lily / staff-sym-reg.cc
1 /*
2   staff-sym-reg.cc -- implement Staff_sym_register
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-reg.hh"
10 #include "staff-sym.hh"
11 #include "score.hh"
12 #include "p-col.hh"
13
14 const NO_LINES = 5;
15 void
16 Staff_sym_register::fill_staff_info(Staff_info&i)
17 {
18     i.staff_sym_l_ = span_p_;
19 }
20
21 Staff_sym_register::Staff_sym_register()
22 {
23    span_p_ = 0;
24 }
25
26 void
27 Staff_sym_register::do_creation_processing()
28 {
29     span_p_ = new Staff_symbol(NO_LINES);
30     span_p_->left_col_l_ = get_staff_info().command_pcol_l(); // ugh
31 }
32
33 void
34 Staff_sym_register::do_removal_processing()
35 {
36     span_p_->right_col_l_ = get_staff_info().command_pcol_l();
37     typeset_element(span_p_);
38     span_p_ =0;
39 }
40
41 void
42 Staff_sym_register::do_process_requests()
43 {
44     announce_element(Score_elem_info(span_p_, 0));
45 }
46
47
48 IMPLEMENT_STATIC_NAME(Staff_sym_register);
49 IMPLEMENT_IS_TYPE_B1(Staff_sym_register,Request_register);
50 ADD_THIS_REGISTER(Staff_sym_register);