2 scriptreg.cc -- implement Script_register
4 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 #include "scriptreg.hh"
9 #include "musicalrequest.hh"
10 #include "complexwalker.hh"
12 Script_register::Script_register(Complex_walker
*w
)
19 Script_register::try_request(Request
*r_l
)
24 if (accepted_req_arr_
.size()
25 && Script_req::compare(*accepted_req_arr_
[0]->script(), *r_l
->script()))
29 accepted_req_arr_
.push(r_l
);
35 Script_register::process_request()
37 if (accepted_req_arr_
.size() ) {
38 script_p_
= new Script(accepted_req_arr_
[0]->script(), 10);
40 Staff_elem_info(script_p_
, accepted_req_arr_
[0], this));
45 Script_register::acknowledge_element(Staff_elem_info info
)
49 if (info
.elem_p_
->name() == String("Stem"))
50 script_p_
->set_stem((Stem
*)info
.elem_p_
);
51 else if (info
.req_l_
->rhythmic())
52 script_p_
->set_support(info
.elem_p_
->item());
56 Script_register::do_pre_move_process()
59 script_p_
->dir
= dir_i_
;
60 typeset_element(script_p_
);
66 Script_register::set_dir(int i
)