]> git.donarmstrong.com Git - lilypond.git/blob - lily/ligature-head.cc
8959988fef035eda279cf4c898bdb032e71a808c
[lilypond.git] / lily / ligature-head.cc
1 /*
2   ligature-head.cc -- implement Ligature_head
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 2002 Juergen Reuter <reuter@ipd.uka.de>
7 */
8
9 #include "ligature-head.hh"
10 #include "item.hh"
11 #include "note-head.hh"
12 #include "warn.hh"
13
14 /*
15  * TODO: in scm/grob-description.scm, LigatureHead must contain value
16  * "rhythmic-head-interface" in the interfaces list.  Otherwise, text
17  * scripts (such as fermata) are horizontally aligned with the end of
18  * the ligature rather than with the associated head.  Why?
19  */
20 MAKE_SCHEME_CALLBACK (Ligature_head,brew_molecule,1);
21 SCM
22 Ligature_head::brew_molecule (SCM smob)  
23 {
24   Grob *me = unsmob_grob (smob);
25   SCM brew_ligature_primitive_proc =
26     me->get_grob_property ("ligature-primitive-callback");
27   if (brew_ligature_primitive_proc != SCM_EOL)
28     {
29       return gh_call1 (brew_ligature_primitive_proc, smob);
30     }
31   else
32     {
33       warning ("Ligature_head: ligature-primitive-callback undefined -> resorting to Note_head::brew_molecule");
34       return Note_head::brew_molecule (smob);
35     }
36 }
37
38 /*
39   UGH  primitive is only used within the engraver.
40 */
41 ADD_INTERFACE (Ligature_head,"ligature-head-interface","Ligature head",
42                "primitive ligature-primitive-callback thickness flexa-width head-width delta-pitch join-left");