#include "lily-guile.hh"
#include "paper-column.hh"
#include "paper-def.hh"
-#include "protected-scm.hh"
+
#include "side-position-interface.hh"
#include "staff-symbol-referencer.hh"
#include "item.hh"
Mark_engraver ();
protected:
Item* text_p_;
- Protected_scm staffs_;
protected:
virtual void do_pre_move_processing ();
virtual bool do_try_music (Music *req_l);
virtual void do_process_music ();
virtual void do_post_move_processing ();
+ virtual void do_creation_processing ();
+
private:
Mark_req * mark_req_l_;
};
{
text_p_ =0;
mark_req_l_ = 0;
- staffs_ = SCM_EOL;
}
+void
+Mark_engraver::do_creation_processing ()
+{
+ daddy_trans_l_->set_property ("staffsFound", SCM_EOL); // ugh: sharing with barnumber grav.
+}
void
Mark_engraver::acknowledge_element (Score_element_info inf)
{
Score_element * s = inf.elem_l_;
- if (Staff_symbol::has_interface (s))
+ if (Staff_symbol::has_interface (s)
+ || to_boolean (s->get_elt_property ("invisible-staff")))
{
- staffs_ = gh_cons (inf.elem_l_->self_scm (), staffs_);
+ SCM sts = get_property ("staffsFound");
+ SCM thisstaff = inf.elem_l_->self_scm ();
+ if (scm_memq (thisstaff, sts) == SCM_BOOL_F)
+ daddy_trans_l_->set_property ("staffsFound", gh_cons (thisstaff, sts));
}
else if (text_p_ && Bar::has_interface (s))
{
{
if (text_p_)
{
- text_p_->set_elt_property("side-support-elements" , staffs_);
+ text_p_->set_elt_property("side-support-elements" , get_property ("staffsFound"));
typeset_element (text_p_);
text_p_ =0;
}
if (text_p_)
return;
- SCM s = get_property ("basicMarkProperties");
+ SCM s = get_property ("RehearsalMark");
text_p_ = new Item (s);
Side_position::set_axis (text_p_, Y_AXIS);
- /*
- -> Generic props.
- */
- SCM prop = get_property ("markDirection");
- if (!isdir_b (prop))
- {
- prop = gh_int2scm (UP);
- }
- text_p_->set_elt_property ("direction", prop);
-
- SCM padding = get_property ("markScriptPadding");
- if (gh_number_p(padding))
- {
- text_p_->set_elt_property ("padding", padding);
- }
- else
- {
- text_p_
- ->set_elt_property ("padding",
- gh_double2scm(paper_l ()->get_var ("interline")));
- }
-
-
announce_element (text_p_, rq);
}