+MAKE_SCHEME_CALLBACK (Script_interface, calc_positioning_done, 1);
+SCM
+Script_interface::calc_positioning_done (SCM smob)
+{
+ Grob *me = unsmob<Grob> (smob);
+ if (Grob *par = me->get_parent (X_AXIS))
+ {
+ Grob *stem = Note_column::get_stem (par);
+ if (stem && Stem::first_head (stem))
+ me->set_parent (Stem::first_head (stem), X_AXIS);
+ }
+ return SCM_BOOL_T;
+}
+
+Direction
+Script_interface::get_direction (Grob *me)
+{
+ Direction relative_dir = Direction (1);
+ SCM reldir = me->get_property ("side-relative-direction");
+ if (is_direction (reldir))
+ relative_dir = to_dir (reldir);
+
+ SCM other_elt = me->get_object ("direction-source");
+ Grob *e = unsmob<Grob> (other_elt);
+ if (e)
+ return (Direction) (relative_dir * get_grob_direction (e));
+
+ return CENTER;
+}
+