]> git.donarmstrong.com Git - lilypond.git/blob - lily/rhythmic-head.cc
* lily/include/debug.hh: deprecate.
[lilypond.git] / lily / rhythmic-head.cc
1 /*
2   rhythmic-head.cc -- implement Rhythmic_head
3
4   source file of the GNU LilyPond music typesetter
5
6   (c)  1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
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"
15
16
17 Item*
18 Rhythmic_head::dots_l (Grob*me) 
19 {
20   SCM s = me->get_grob_property ("dot");
21   return unsmob_item (s);
22 }
23
24 Item*
25 Rhythmic_head::stem_l (Grob*me) 
26 {
27   SCM s = me->get_grob_property ("stem");
28   return unsmob_item (s);
29 }
30
31 int
32 Rhythmic_head::dot_count (Grob*me) 
33 {
34   return dots_l (me)
35     ? gh_scm2int (dots_l (me)->get_grob_property ("dot-count")) : 0;
36 }
37
38 void
39 Rhythmic_head::set_dots (Grob*me,Item *dot_l)
40 {
41   me->set_grob_property ("dot", dot_l->self_scm ());
42 }
43
44
45
46 int
47 Rhythmic_head::duration_log (Grob*me) 
48 {
49   SCM s = me->get_grob_property ("duration-log");
50   return gh_number_p (s) ? gh_scm2int (s) : 0;
51 }
52
53
54
55 ADD_INTERFACE (Rhythmic_head,"rhythmic-head-interface",
56   "Note head or rest",
57   "dot stem duration-log");
58