2 voicegroup.cc -- implement Voice_group_registers
4 source file of the LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
10 #include "musicalrequest.hh"
11 #include "voiceregs.hh"
12 #include "voicegroupregs.hh"
13 #include "register.hh"
15 #include "stembeamreg.hh"
16 #include "scriptreg.hh"
17 #include "complexwalker.hh"
18 #include "commandrequest.hh"
20 static int temp_id_count
;
22 Voice_group_registers::Voice_group_registers(Complex_walker
*w_l
, String id
)
25 add(new Text_register(w_l
));
26 add(new Stem_beam_register(w_l
));
27 add(new Script_register(w_l
));
30 id
= __FUNCTION__
+ String(temp_id_count
++);
35 Voice_group_registers::try_request(Request
*r_l
)
37 if (r_l
->groupfeature()) {
38 set_dir(r_l
->groupfeature()->stemdir_i_
);
41 return Register_group::try_request(r_l
);
45 Voice_group_registers::acknowledge_element(Staff_elem_info i
)
47 if (i
.group_regs_l_
!= this)
49 Register_group::acknowledge_element(i
);
53 Voice_group_registers::set_dir(int i
)
55 Register_group::set_dir(i
);
58 Array
<Voice_registers
*> vr_arr (walk_l_
->get_voice_regs(this));
59 for (int j
=0; j
<vr_arr
.size(); j
++) {
61 vr_arr
[j
]->set_dir(i
);
66 Voice_group_registers::acceptable_request_b(Request
*r
)
68 return (r
->stem() || r
->beam() || r
->text() || r
->script() ||