2 text-reg.cc -- implement Text_register
4 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
8 #include "note-column.hh"
9 #include "musical-request.hh"
10 #include "text-reg.hh"
11 #include "text-item.hh"
13 Text_register::Text_register()
17 do_post_move_processing();
21 Text_register::do_try_request(Request
*req_l
)
23 Musical_req
*m
= req_l
->musical();
24 if (!m
|| ! m
->text())
27 Text_req::compare(*m
->text(), *text_req_l_
))
31 text_req_l_
= m
->text();
35 Text_register::acknowledge_element(Score_elem_info i
)
37 if (text_p_
&& i
.elem_l_
->name() == Note_column::static_name()) {
38 text_p_
->add_support(i
.elem_l_
);
42 Text_register::do_process_requests()
45 text_p_
= new Text_item(text_req_l_
->tdef_p_
, text_req_l_
->dir_i_
); // ugh
46 announce_element(Score_elem_info(text_p_
, text_req_l_
));
50 Text_register::do_pre_move_processing()
53 if (dir_i_
&& !text_p_
->dir_i_
)
54 text_p_
->dir_i_
= dir_i_
;
55 Staff_symbol
* s_l
= get_staff_info().staff_sym_l_
;
56 text_p_
->set_staffsym(s_l
);
57 typeset_element(text_p_
);
63 Text_register::set_feature(Feature i
)
65 if (i
.type_
== "vdir")
69 Text_register::do_post_move_processing()
73 IMPLEMENT_STATIC_NAME(Text_register
);
74 IMPLEMENT_IS_TYPE_B1(Text_register
,Request_register
);
75 ADD_THIS_REGISTER(Text_register
);