#include "paper-column.hh"
#include "paper-def.hh"
#include "dimension-cache.hh"
-
+#include "staff-symbol-referencer.hh"
+#include "side-position-interface.hh"
+#include "staff-symbol.hh"
Bar_script_engraver::Bar_script_engraver ()
{
axis_ = Y_AXIS;
text_p_ =0;
-
- visibility_lambda_
- = ly_eval_str ("non-postbreak-visibility");
}
void
Bar_script_engraver::do_creation_processing ()
{
+ String t = type_ + "VisibilityFunction";
+ SCM proc = get_property (t);
+
+ if (gh_procedure_p (proc))
+ visibility_lambda_ = proc;
}
+
/*
Some interesting item came across. Lets attach the text and the
positioner to the item.
{
if (text_p_)
{
+ Staff_symbol * st = staff_symbol_referencer (text_p_).staff_symbol_l();
+
+ if (st)
+ side_position (text_p_).add_support (st);
+
typeset_element (text_p_);
text_p_ =0;
}
Side_position_interface staffside(text_p_);
staffside.set_axis (axis_);
- SCM prop = get_property (type_ + "Direction", 0);
+ SCM prop = get_property (type_ + "Direction");
if (!isdir_b (prop))
{
prop = gh_int2scm (UP);
}
text_p_->set_elt_property ("direction", prop);
- SCM padding = get_property (type_ + "ScriptPadding", 0);
+ SCM padding = get_property (type_ + "ScriptPadding");
if (gh_number_p(padding))
{
text_p_->set_elt_property ("padding", padding);
->set_elt_property ("padding",
gh_double2scm(paper_l ()->get_var ("interline")));
}
-
- text_p_->set_elt_property ("visibility-lambda",
- visibility_lambda_);
+
+ if (gh_procedure_p (visibility_lambda_))
+ text_p_->set_elt_property ("visibility-lambda",
+ visibility_lambda_);
announce_element (Score_element_info (text_p_, rq));
}