- Text_script_req * r = reqs_[i];
-
- Text_item *text = new Text_item;
- Side_position_interface stafy (text);
-
- SCM axisprop = get_property ("scriptHorizontal",0);
- if (to_boolean (axisprop))
- {
- stafy.set_axis (X_AXIS);
- // text->set_parent (ss, Y_AXIS);
- }
- else
- stafy.set_axis (Y_AXIS);
-
- text->set_elt_property ("script-priority",
- gh_int2scm (200));
-
- if (r->get_direction ())
- stafy.set_direction (r->get_direction ());
-
- text->set_elt_property ("text",
- ly_str02scm ( r->text_str_.ch_C ()));
-
- if (r->style_str_.length_i ())
- text->set_elt_property ("style", ly_str02scm (r->style_str_.ch_C()));
-
- SCM empty = get_property ("textEmptyDimension", 0);
- if (to_boolean (empty))
- {
- text->set_empty (X_AXIS);
- }
-
- announce_element (Score_element_info (text, r));
- texts_.push (text);
+ Stream_event *r = evs_[i];
+
+ // URG: Text vs TextScript
+ 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);