2 rhythmic-head.cc -- implement Rhythmic_head
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 #include "rhythmic-head.hh"
11 #include "molecule.hh"
12 #include "paper-def.hh"
16 #include "axis-group-element.hh"
17 #include "paper-score.hh"
19 #include "staff-symbol-referencer.hh"
23 Rhythmic_head::dots_l () const
25 SCM s
= get_elt_property ("dot");
26 return dynamic_cast<Dots
*> (unsmob_element (s
));
30 Rhythmic_head::balltype_i () const
32 SCM s
= get_elt_property ("duration-log");
34 return gh_number_p (s
) ? gh_scm2int (s
) : 0;
38 Rhythmic_head::stem_l () const
40 SCM s
= get_elt_property ("stem");
41 return dynamic_cast<Stem
*> (unsmob_element (s
));
45 Rhythmic_head::dots_i () const
47 return dots_l () ? dots_l ()->dots_i_
: 0;
51 Rhythmic_head::do_post_processing ()
53 if (Dots
*d
= dots_l ())
55 Staff_symbol_referencer_interface
si (d
);
56 Staff_symbol_referencer_interface
me (d
);
57 si
.set_position(int (me
.position_f ()));
63 Rhythmic_head::add_dots (Dots
*dot_l
)
65 set_elt_property ("dot", dot_l
->self_scm_
);
66 dot_l
->add_dependency (this);