#include "directional-element-interface.hh"
#include "context.hh"
#include "axis-group-interface.hh"
-#include "script.hh"
+#include "script-interface.hh"
/*
TODO:
{
if (!line_spanner_)
{
- line_spanner_ = make_spanner ("DynamicLineSpanner");
-
Music * rq = accepted_spanreqs_drul_[START];
+ line_spanner_ = make_spanner ("DynamicLineSpanner", rq ? rq->self_scm (): SCM_EOL );
+
if (script_ev_)
- rq = script_ev_ ;
- announce_grob (line_spanner_, rq ? rq->self_scm (): SCM_EOL);
+ rq = script_ev_;
}
}
*/
if (script_ev_)
{
- script_ = make_item ("DynamicText");
+ script_ = make_item ("DynamicText", script_ev_->self_scm ());
script_->set_property ("text",
script_ev_->get_property ("text"));
Axis_group_interface::add_element (line_spanner_, script_);
- announce_grob (script_, script_ev_->self_scm ());
}
Music *stop_ev = accepted_spanreqs_drul_ [STOP] ?
SCM s = get_property ((start_type + "Spanner").to_str0 ());
if (!ly_c_symbol_p (s) || s == ly_symbol2scm ("hairpin"))
{
- cresc_ = make_spanner ("Hairpin");
+ cresc_ = make_spanner ("Hairpin", accepted_spanreqs_drul_[START]->self_scm ());
cresc_->set_property ("grow-direction",
scm_int2num ((start_type == "crescendo")
? BIGGER : SMALLER));
*/
else
{
- cresc_ = make_spanner ("TextSpanner");
+ cresc_ = make_spanner ("TextSpanner", accepted_spanreqs_drul_[START]->self_scm ());
cresc_->set_property ("style", s);
- get_parent_context ()->set_property ((start_type
+ context ()->set_property ((start_type
+ "Spanner").to_str0 (), SCM_EOL);
s = get_property ((start_type + "Text").to_str0 ());
/*
{
cresc_->set_property ("edge-text",
scm_cons (s, scm_makfrom0str ("")));
- get_parent_context ()->set_property ((start_type + "Text").to_str0 (),
+ context ()->set_property ((start_type + "Text").to_str0 (),
SCM_EOL);
}
}
add_bound_item (line_spanner_, cresc_->get_bound (LEFT));
- announce_grob (cresc_, accepted_spanreqs_drul_[START]->self_scm ());
}
}
}
typeset_all ();
if (line_spanner_
- && !line_spanner_->live ())
+ && !line_spanner_->is_live ())
line_spanner_ = 0;
if (line_spanner_)
{
}
if (cresc_
- && !cresc_->live ())
+ && !cresc_->is_live ())
cresc_ = 0;
if (cresc_)
{
Maybe just check at typeset_grob ()?
*/
if (finished_cresc_
- && !finished_cresc_->live ())
+ && !finished_cresc_->is_live ())
finished_cresc_ = 0;
if (finished_line_spanner_
- && !finished_line_spanner_->live ())
+ && !finished_line_spanner_->is_live ())
finished_line_spanner_ = 0;
if (finished_cresc_)
add_bound_item (finished_line_spanner_,
finished_cresc_->get_bound (RIGHT));
}
- typeset_grob (finished_cresc_);
finished_cresc_ =0;
}
- if (script_)
- {
- typeset_grob (script_);
script_ = 0;
- }
if (finished_line_spanner_)
{
/*
finished_line_spanner_->set_bound (LEFT, ci);
}
- typeset_grob (finished_line_spanner_);
finished_line_spanner_ = 0;
}
}
{
if (line_spanner_
/* Don't refill killed spanner */
- && line_spanner_->live ())
+ && line_spanner_->is_live ())
{
Side_position_interface::add_support (line_spanner_,i.grob_);
add_bound_item (line_spanner_,dynamic_cast<Item*> (i.grob_));
DynamicText doesn't really have a script-priority field.
*/
- if (is_number (p)
+ if (ly_c_number_p (p)
&& ly_scm2int (p) < ly_scm2int (script_->get_property ("script-priority")))
{
Side_position_interface::add_support (line_spanner_, i.grob_);