#include <ctype.h>
#include "bar.hh"
-#include "clef-item.hh"
#include "command-request.hh"
-#include "dimension-cache.hh"
+#include "staff-symbol.hh"
#include "engraver-group-engraver.hh"
#include "engraver.hh"
#include "lily-guile.hh"
#include "protected-scm.hh"
#include "side-position-interface.hh"
#include "staff-symbol-referencer.hh"
-#include "staff-symbol.hh"
-#include "text-item.hh"
+#include "item.hh"
#include "group-interface.hh"
/**
VIRTUAL_COPY_CONS(Translator);
Mark_engraver ();
protected:
- Text_item* text_p_;
- Protected_scm visibility_lambda_;
+ Item* text_p_;
Protected_scm staffs_;
protected:
- virtual void do_creation_processing ();
virtual void do_pre_move_processing ();
virtual void acknowledge_element (Score_element_info);
void create_items(Request*);
staffs_ = SCM_EOL;
}
-void
-Mark_engraver::do_creation_processing ()
-{
- String t = "markVisibilityFunction";
- SCM proc = get_property (t);
-
- if (gh_procedure_p (proc))
- visibility_lambda_ = proc;
-}
-
void
Mark_engraver::acknowledge_element (Score_element_info inf)
{
Score_element * s = inf.elem_l_;
- if (dynamic_cast<Staff_symbol*> (s))
+ if (Staff_symbol::has_interface (s))
{
- staffs_ = gh_cons (inf.elem_l_->self_scm_, staffs_);
+ staffs_ = gh_cons (inf.elem_l_->self_scm (), staffs_);
}
- else if (text_p_ && dynamic_cast<Bar*> (s))
+ else if (text_p_ && Bar::has_interface (s))
{
/*
Ugh. Figure out how to do this right at beginning of line, (without
- creating class Bar_script : public Text_item).
+ creating class Bar_script : public Item).
*/
text_p_->set_parent (s, X_AXIS);
}
{
if (text_p_)
{
- text_p_->set_elt_pointer("side-support-elements" , staffs_);
+ text_p_->set_elt_property("side-support-elements" , staffs_);
typeset_element (text_p_);
text_p_ =0;
}
{
if (text_p_)
return;
-
- text_p_ = new Text_item;
- text_p_->set_elt_property ("breakable", SCM_BOOL_T); // ugh
- Group_interface (text_p_, "interfaces").add_thing (ly_symbol2scm ("Mark"));
- Side_position_interface staffside(text_p_);
- staffside.set_axis (Y_AXIS);
+ SCM s = get_property ("basicMarkProperties");
+ text_p_ = new Item (s);
+
+
+ Side_position::set_axis (text_p_, Y_AXIS);
+
+ /*
+ -> Generic props.
+ */
SCM prop = get_property ("markDirection");
if (!isdir_b (prop))
{
gh_double2scm(paper_l ()->get_var ("interline")));
}
- if (gh_procedure_p (visibility_lambda_))
- text_p_->set_elt_property ("visibility-lambda",
- visibility_lambda_);
- announce_element (Score_element_info (text_p_, rq));
+ announce_element (text_p_, rq);
}
/*
automatic marks.
*/
- SCM m = (mark_req_l_->mark_label_ == SCM_UNDEFINED)
- ? get_property ("rehearsalMark")
- : SCM(mark_req_l_->mark_label_);
+
+ SCM m = mark_req_l_->get_mus_property ("label");
+ if (gh_string_p (m))
+ m = get_property ("rehearsalMark");
+;
if (gh_number_p (m))
{