*/
#include <cctype>
+using namespace std;
+
+#include "engraver.hh"
#include "bar-line.hh"
#include "context.hh"
-#include "engraver-group-engraver.hh"
#include "item.hh"
#include "warn.hh"
#include "text-interface.hh"
+#include "grob-array.hh"
+#include "axis-group-interface.hh"
/**
put stuff over or next to bars. Examples: bar numbers, marginal notes,
*/
class Mark_engraver : public Engraver
{
+
+ void create_items (Music *);
+ Item *text_;
+ Music *mark_ev_;
+
public:
TRANSLATOR_DECLARATIONS (Mark_engraver);
+
protected:
- Item *text_;
-protected:
- void stop_translation_timestep ();
- DECLARE_ACKNOWLEDGER (bar_line);
- void create_items (Music *);
virtual bool try_music (Music *ev);
void process_music ();
+ void stop_translation_timestep ();
-private:
- Music *mark_ev_;
+ DECLARE_ACKNOWLEDGER (break_aligned);
};
Mark_engraver::Mark_engraver ()
}
void
-Mark_engraver::acknowledge_bar_line (Grob_info inf)
+Mark_engraver::acknowledge_break_aligned (Grob_info inf)
{
Grob *s = inf.grob ();
- if (text_)
+ if (text_
+ && (get_property ("rehearsalMarkAlignSymbol")
+ == s->get_property ("break-align-symbol"))
+ && Axis_group_interface::has_interface (s))
{
/*
- TODO: make this configurable. RehearsalMark cannot be
- break-aligned, since the width of the object should not be taken
- into alignment considerations.
+ RehearsalMark cannot be break-aligned, since the width of the
+ object should not be taken into alignment considerations.
*/
text_->set_parent (s, X_AXIS);
}
{
if (text_)
{
- SCM lst = get_property ("stavesFound");
- text_->set_object ("side-support-elements", lst);
+ text_->set_object ("side-support-elements",
+ grob_list_to_grob_array (get_property ("stavesFound")));
text_ = 0;
}
mark_ev_ = 0;
#include "translator.icc"
-ADD_ACKNOWLEDGER (Mark_engraver, bar_line);
+ADD_ACKNOWLEDGER (Mark_engraver, break_aligned);
+
ADD_TRANSLATOR (Mark_engraver,
/* doc */ "This engraver will create RehearsalMark objects. "
"It puts them on top of all staves (which is taken from "
"end up on the same Y-location",
/* create */ "RehearsalMark",
/* accept */ "mark-event",
- /* read */ "rehearsalMark markFormatter stavesFound",
+ /* read */ "rehearsalMark rehearsalMarkAlignSymbol markFormatter stavesFound",
/* write */ "");