+MAKE_SCHEME_CALLBACK (Staff_symbol_referencer, callback, 1);
+SCM
+Staff_symbol_referencer::callback (SCM smob)
+{
+ Grob *me = unsmob<Grob> (smob);
+
+ SCM pos = me->get_property ("staff-position");
+ Real off = 0.0;
+ if (scm_is_number (pos))
+ {
+ Real space = Staff_symbol_referencer::staff_space (me);
+ off = scm_to_double (pos) * space / 2.0;
+ }
+
+ return scm_from_double (off);
+}
+
+/* This sets the position relative to the center of the staff symbol.
+
+The function is hairy, because it can be called in two situations:
+
+1. There is no staff yet; we must set staff-position
+
+2. There is a staff, and perhaps someone even applied a
+translate_axis (). Then we must compensate for the translation
+
+In either case, we set a callback to be sure that our new position
+will be extracted from staff-position */