2 complex-walker.cc -- implement Complex_walker
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
9 #include "staff-column.hh"
13 #include "complex-walker.hh"
14 #include "walk-regs.hh"
15 #include "score-elem.hh"
17 #include "staffline.hh"
20 Complex_walker::do_post_move()
22 walk_regs_p_
->post_move_processing();
26 Complex_walker::do_pre_move()
28 walk_regs_p_
->pre_move_processing();
32 Complex_walker::do_announces()
34 walk_regs_p_
->do_announces();
39 Complex_walker::try_request(Request
*req
)
41 bool b
=walk_regs_p_
->try_request(req
);
43 req
->warning("junking request: " + String(req
->name()));
47 Complex_walker::process_requests()
49 Staff_column
*c
=ptr();
51 for (int i
=0; i
< c
->creationreq_l_arr_
.size(); i
++) {
52 try_request(c
->creationreq_l_arr_
[i
]);
54 for (int i
=0; i
< c
->commandreq_l_arr_
.size(); i
++) {
55 try_request(c
->commandreq_l_arr_
[i
]);
58 for (int i
=0; i
< c
->musicalreq_l_arr_
.size(); i
++) {
59 try_request(c
->musicalreq_l_arr_
[i
]);
62 regs_process_requests();
67 Complex_walker::regs_process_requests()
69 walk_regs_p_
->process_requests();
73 Complex_walker::typeset_element(Score_elem
*elem_p
)
77 staff_l_
->staff_line_l_
->add_element(elem_p
);
78 if (elem_p
->spanner())
79 pscore_l_
->typeset_unbroken_spanner(elem_p
->spanner());
81 ptr()->typeset_musical_item(elem_p
->item());
84 Complex_walker::Complex_walker(Staff
*s
)
85 : Staff_walker(s
, s
->score_l_
->pscore_p_
)
87 walk_regs_p_
= new Walker_registers(this);
92 Complex_walker::~Complex_walker()