source file of the GNU LilyPond music typesetter
- (c) 1999--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1999--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
#include <math.h>
if (st)
return Staff_symbol::staff_space (st);
-
return 1.0;
}
-
Real
Staff_symbol_referencer::position_f (Grob*me)
{
{
Real space = Staff_symbol_referencer::staff_space (me);
off = gh_scm2double (pos) * space/2.0;
+ me->set_grob_property ("staff-position", gh_double2scm (0.0));
}
- me->set_grob_property ("staff-position", gh_double2scm (0.0));
-
return gh_double2scm (off);
}
}
-void
-Staff_symbol_referencer::set_interface (Grob * e)
-{
- if (!gh_number_p (e->get_grob_property ("staff-position")))
- e->set_grob_property ("staff-position", gh_double2scm (0.0));
- e->add_offset_callback (Staff_symbol_referencer::callback_proc, Y_AXIS);
-}
+#define has_interface ugly_hack
+ADD_INTERFACE (Staff_symbol_referencer,"staff-symbol-referencer-interface",
+ "Object whose Y position is meaning with reference to a staff
+symbol. Objects that have this interface should include
+Staff_symbol_referencer::callback in their Y-offset-callback.
+",
+ "staff-position");