- String basic = "TextScript";
-
- Item *text = new Item (get_property (basic.to_str0 ()));
-
- /*
- FIXME -> need to use basic props.
- */
- SCM axisprop = get_property ("scriptHorizontal");
-
- Axis ax = to_boolean (axisprop) ? X_AXIS : Y_AXIS;
- Side_position_interface::set_axis (text, ax);
-
- // Hmm
- int priority = 200;
- SCM s = text->get_grob_property ("script-priority");
- if (gh_number_p (s))
- priority = gh_scm2int (s);
-
- /* Make sure they're in order of user input by adding index i. */
- priority += i * (r->get_direction () ? r->get_direction () : 1);
-
- text->set_grob_property ("script-priority", gh_int2scm (priority));
-
- if (r->get_direction ())
- Side_position_interface::set_direction (text, r->get_direction ());
-
- text->set_grob_property ("text", r->get_mus_property ("text"));
- announce_grob (text, r->self_scm ());
- texts_.push (text);
+ Item *text = make_item ("TextScript", r->self_scm ());
+
+ int priority = robust_scm2int (text->get_property ("script-priority"),
+ 200);
+
+ /* see script-engraver.cc */
+ priority += i;
+
+ text->set_property ("script-priority", scm_from_int (priority));
+
+ Direction dir = to_dir (r->get_property ("direction"));
+ if (dir)
+ set_grob_direction (text, dir);
+
+ SCM mark = r->get_property ("text");
+
+ text->set_property ("text", mark);
+ texts_.push_back (text);