*** empty log message ***
[lilypond.git] / lily / rhythmic-head.cc
blobb76ee9229d60f4d3669c704b464f16b363f271ce
1 /*
2 rhythmic-head.cc -- implement Rhythmic_head
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
9 #include "rhythmic-head.hh"
10 #include "warn.hh"
11 #include "rest.hh"
12 #include "stem.hh"
13 #include "staff-symbol-referencer.hh"
14 #include "item.hh"
17 Item*
18 Rhythmic_head::get_dots (Grob*me)
20 SCM s = me->get_property ("dot");
21 return unsmob_item (s);
24 Item*
25 Rhythmic_head::get_stem (Grob*me)
27 SCM s = me->get_property ("stem");
28 return unsmob_item (s);
31 int
32 Rhythmic_head::dot_count (Grob*me)
34 return get_dots (me)
35 ? ly_scm2int (get_dots (me)->get_property ("dot-count")) : 0;
38 void
39 Rhythmic_head::set_dots (Grob*me,Item *dot)
41 me->set_property ("dot", dot->self_scm ());
44 int
45 Rhythmic_head::duration_log (Grob*me)
47 SCM s = me->get_property ("duration-log");
48 return ly_c_number_p (s) ? ly_scm2int (s) : 0;
51 ADD_INTERFACE (Rhythmic_head,"rhythmic-head-interface",
52 "Note head or rest",
53 "dot stem duration-log");