2 rhythmic-column-grav.cc -- implement Rhythmic_column_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
9 #include "rhythmic-column-grav.hh"
10 #include "note-head.hh"
12 #include "note-column.hh"
14 #include "dot-column.hh"
16 Rhythmic_column_engraver::Rhythmic_column_engraver()
25 Rhythmic_column_engraver::acknowledge_element (Score_elem_info i
)
27 if (i
.elem_l_
->is_type_b (Script::static_name ())
28 && i
.req_l_
&& i
.req_l_
->musical ())
30 script_l_arr_
.push ((Script
*)i
.elem_l_
->item());
32 else if (i
.elem_l_
->is_type_b (Stem::static_name()))
34 stem_l_
= (Stem
*) i
.elem_l_
->item();
36 else if (i
.elem_l_
->is_type_b (Rhythmic_head::static_name ()))
38 Rhythmic_head
* r
= (Rhythmic_head
*)i
.elem_l_
->item ();
41 ncol_p_
= new Note_column
;
42 announce_element (Score_elem_info (ncol_p_
, 0));
50 dotcol_p_
= new Dot_column
;
51 ncol_p_
->set (dotcol_p_
);
52 announce_element (Score_elem_info (dotcol_p_
, 0));
60 if (stem_l_
&& !ncol_p_
->stem_l_
)
61 ncol_p_
->set (stem_l_
);
63 for (int i
=0; i
< script_l_arr_
.size(); i
++)
66 ncol_p_
->add (script_l_arr_
[i
]);
69 script_l_arr_
.clear();
74 Rhythmic_column_engraver::do_pre_move_processing()
78 if (! ncol_p_
->h_shift_b_
)
80 ncol_p_
->h_shift_b_
= get_property ("hshift").operator bool ();
82 ncol_p_
->dir_
=(Direction
) int(get_property ("ydirection"));
84 typeset_element (ncol_p_
);
89 typeset_element (dotcol_p_
);
95 Rhythmic_column_engraver::do_post_move_processing()
97 script_l_arr_
.clear();
104 IMPLEMENT_IS_TYPE_B1(Rhythmic_column_engraver
,Engraver
);
105 ADD_THIS_TRANSLATOR(Rhythmic_column_engraver
);