2 grace-engraver-group.cc -- implement Grace_engraver_group
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "grace-engraver-group.hh"
11 #include "lily-guile.hh"
12 #include "score-element.hh"
13 #include "musical-request.hh"
16 Grace_engraver_group::start ()
20 We're really finished with this context. Get rid of everything.
23 Grace_engraver_group::finish ()
25 calling_self_b_
= true;
26 removal_processing (); // ugr. We'd want to have this done by our parents.
27 for (int i
=0; i
< announce_to_top_
.size (); i
++)
29 Engraver::announce_element (announce_to_top_
[i
]);
32 for (int i
=0; i
< typeset_us_
.size (); i
++)
34 Engraver::typeset_element (typeset_us_
[i
]);
37 calling_self_b_
= false;
41 Grace_engraver_group::do_removal_processing ()
43 Engraver_group_engraver::do_removal_processing ();
47 Grace_engraver_group::announce_element (Score_element_info inf
)
49 announce_info_arr_
.push (inf
);
50 // do not propagate to top
51 announce_to_top_
.push (inf
);
53 inf
.elem_l_
->set_elt_property ("grace", SCM_BOOL_T
);
57 Grace_engraver_group::typeset_element (Score_element
*e
)
63 Grace_engraver_group::Grace_engraver_group()
65 calling_self_b_
= false;
69 Grace_engraver_group::process ()
71 calling_self_b_
= true;
74 pre_move_processing();
76 calling_self_b_
= false;
81 Grace_engraver_group::each (Method_pointer method
)
84 Engraver_group_engraver::each (method
);
89 Grace_engraver_group::each (Const_method_pointer method
) const
92 Engraver_group_engraver::each (method
);
94 ADD_THIS_TRANSLATOR(Grace_engraver_group
);
98 don't let the commands trickle up.
101 Grace_engraver_group::do_try_music (Music
*m
)
103 bool hebbes_b
= try_music_on_nongroup_children (m
);
105 if (!hebbes_b
&& pass_to_top_b (m
))
107 hebbes_b
= daddy_trans_l_
->try_music (m
);
114 Grace_engraver_group::pass_to_top_b (Music
*m
) const
116 if (Span_req
* sp
= dynamic_cast<Span_req
*> (m
))
118 if (sp
->span_type_str_
== "slur")