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"
17 Grace_engraver_group::start ()
21 We're really finished with this context. Get rid of everything.
24 Grace_engraver_group::finish ()
26 calling_self_b_ = true;
27 removal_processing (); // ugr. We'd want to have this done by our parents.
28 for (int i=0; i < announce_to_top_.size (); i++)
30 Engraver::announce_element (announce_to_top_[i]);
33 for (int i=0; i < typeset_us_.size (); i++)
35 Engraver::typeset_element (typeset_us_[i]);
38 calling_self_b_ = false;
42 Grace_engraver_group::do_removal_processing ()
44 Engraver_group_engraver::do_removal_processing ();
48 Grace_engraver_group::announce_element (Score_element_info inf)
50 announce_info_arr_.push (inf);
51 // do not propagate to top
52 announce_to_top_.push (inf);
54 inf.elem_l_->set_elt_property ("grace", SCM_BOOL_T);
58 Grace_engraver_group::typeset_element (Score_element*e)
61 programming_error ("Grace_engraver_group: empty elt\n");
68 Grace_engraver_group::Grace_engraver_group()
70 calling_self_b_ = false;
74 Grace_engraver_group::process ()
76 calling_self_b_ = true;
78 //process_music (); -- used to do implicit creation processing ()
79 // possibly post_move_processing ()?
80 do_creation_processing ();
81 post_move_processing ();
85 pre_move_processing();
87 calling_self_b_ = false;
92 Grace_engraver_group::each (Method_pointer method)
95 Engraver_group_engraver::each (method);
99 ADD_THIS_TRANSLATOR(Grace_engraver_group);
103 don't let the commands trickle up.
106 Grace_engraver_group::do_try_music (Music *m)
108 bool hebbes_b = try_music_on_nongroup_children (m);
110 if (!hebbes_b && pass_to_top_b (m))
112 hebbes_b = daddy_trans_l_->try_music (m);
119 Grace_engraver_group::pass_to_top_b (Music *m) const
121 if (Span_req * sp = dynamic_cast<Span_req*> (m))
123 if (scm_equal_p (sp->get_mus_property ("span-type"), ly_str02scm ("slur"))