2 stem-grav.cc -- implement Stem_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
9 #include "stem-grav.hh"
10 #include "note-head.hh"
12 #include "musical-request.hh"
13 #include "duration-convert.hh"
16 Stem_engraver::Stem_engraver()
24 Stem_engraver::acknowledge_element(Score_elem_info i)
26 if (i.elem_l_->is_type_b (Note_head::static_name()))
28 Note_head *h = (Note_head*) i.elem_l_->item();
31 Rhythmic_req * r = i.req_l_->musical()->rhythmic();
33 int durlog_i = r->duration_.durlog_i_;
34 stem_p_->flag_i_ = Duration_convert::type2_i(durlog_i);
36 stem_p_->abbrev_flag_i_ = intlog2 (abbrev_req_l_->type_i_)
38 announce_element (Score_elem_info (stem_p_, r));
45 Stem_engraver::do_pre_move_processing()
49 dir_ = (Direction) int(get_property ("ydirection"));
53 typeset_element(stem_p_);
60 Stem_engraver::do_try_request (Request* r)
62 Musical_req* mus_l = r->musical ();
66 Abbreviation_req* a = mus_l->abbrev ();
75 IMPLEMENT_IS_TYPE_B1(Stem_engraver, Engraver);
76 ADD_THIS_TRANSLATOR(Stem_engraver);