source file of the GNU LilyPond music typesetter
- (c) 1999--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ (c) 1999--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
#include "script-interface.hh"
#include "directional-element-interface.hh"
+#include "item.hh"
#include "warn.hh"
#include "font-interface.hh"
#include "side-position-interface.hh"
return scm_from_int (d);
}
+MAKE_SCHEME_CALLBACK (Script_interface, calc_cross_staff, 1);
+SCM
+Script_interface::calc_cross_staff (SCM smob)
+{
+ Grob *me = unsmob_grob (smob);
+ Grob *stem = Note_column::get_stem (me->get_parent (X_AXIS));
+ return scm_from_bool (stem && to_boolean (stem->get_property ("cross-staff")));
+}
+
MAKE_SCHEME_CALLBACK (Script_interface, print, 1);
SCM
struct Text_script
{
- static bool has_interface (Grob *);
+ DECLARE_GROB_INTERFACE ();
};
-ADD_INTERFACE (Text_script, "text-script-interface",
+ADD_INTERFACE (Text_script,
"An object that is put above or below a note",
/* properties */
/*
Hmm. Where should we put add-stem-support ?
*/
-ADD_INTERFACE (Script_interface, "script-interface",
+ADD_INTERFACE (Script_interface,
"An object that is put above or below a note",
"add-stem-support "
"avoid-slur "