2 rhythmic-column-grav.cc -- implement Rhythmic_column_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 #include "rhythmic-column-engraver.hh"
10 #include "note-head.hh"
12 #include "note-column.hh"
14 #include "dot-column.hh"
15 #include "musical-request.hh"
17 Rhythmic_column_engraver::Rhythmic_column_engraver()
26 Rhythmic_column_engraver::process_acknowledged ()
28 if (rhead_l_arr_.size ())
32 ncol_p_ = new Note_column;
33 announce_element (Score_element_info (ncol_p_, 0));
36 for (int i=0; i < rhead_l_arr_.size (); i++)
38 ncol_p_->add_head (rhead_l_arr_[i]);
40 rhead_l_arr_.set_size (0);
48 ncol_p_->set_dotcol (dotcol_l_);
53 ncol_p_->set_stem (stem_l_);
57 for (int i=0; i < script_l_arr_.size(); i++)
60 ncol_p_->add_script (script_l_arr_[i]);
63 script_l_arr_.clear();
68 Rhythmic_column_engraver::acknowledge_element (Score_element_info i)
70 Item * item = dynamic_cast <Item *> (i.elem_l_);
73 if (Script *s=dynamic_cast<Script *> (item))
77 script_l_arr_.push (s);
80 else if (Stem*s=dynamic_cast<Stem *> (item))
84 else if (Rhythmic_head*r=dynamic_cast<Rhythmic_head *> (item))
86 rhead_l_arr_.push (r);
88 else if (Dot_column*d =dynamic_cast<Dot_column *> (item))
95 Rhythmic_column_engraver::do_pre_move_processing()
100 if (get_property ("hshift", 0).operator bool ())
102 ncol_p_->set_elt_property (horizontal_shift_scm_sym, SCM_BOOL_T);
106 ncol_p_->dir_ =(Direction) int(get_property ("ydirection", 0));
108 typeset_element (ncol_p_);
114 Rhythmic_column_engraver::do_post_move_processing()
116 script_l_arr_.clear();
125 ADD_THIS_TRANSLATOR(Rhythmic_column_engraver);