Docs: LM 4.4.3: Clarify overriding vertical positioning of spanners
[lilypond/mpolesky.git] / lily / music-wrapper.cc
blob3e6a7d7c0b34518bcf1d9fa19098f2b635c5a622
1 /*
2 music-wrapper.cc -- implement Music_wrapper
4 source file of the GNU LilyPond music typesetter
6 (c) 1998--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
9 #include "music-wrapper.hh"
11 #include "music.hh"
13 MAKE_SCHEME_CALLBACK (Music_wrapper, start_callback, 1);
14 SCM
15 Music_wrapper::start_callback (SCM m)
17 Music *me = unsmob_music (m);
18 Music *elt = unsmob_music (me->get_property ("element"));
19 if (elt)
20 return elt->start_mom ().smobbed_copy ();
21 else
22 return Moment ().smobbed_copy ();
25 MAKE_SCHEME_CALLBACK (Music_wrapper, length_callback, 1);
26 SCM
27 Music_wrapper::length_callback (SCM m)
29 Music *me = unsmob_music (m);
30 Music *elt = unsmob_music (me->get_property ("element"));
31 if (elt)
32 return elt->get_length ().smobbed_copy ();
33 else
34 return Moment (0).smobbed_copy ();