class Bar_engraver : public Engraver
{
public:
- Bar_engraver();
- VIRTUAL_COPY_CONS(Translator);
+ TRANSLATOR_DECLARATIONS( Bar_engraver );
void request_bar (String type_str);
protected:
virtual void finalize ();
- virtual void stop_translation_timestep();
+ virtual void stop_translation_timestep ();
virtual void create_grobs ();
private:
Item * bar_p_;
};
-Bar_engraver::Bar_engraver()
+Bar_engraver::Bar_engraver ()
{
bar_p_ =0;
}
}
/*
- Bar_engraver should come *after* any engravers that expect bars to
- modify whichBar in deprecated_process_music () be typeset
+ Bar_engraver should come *after* any engravers that
+ modify whichBar
*/
void
Bar_engraver::create_grobs ()
}
/*
- lines may only be broken if there is a barline in all staffs
+ lines may only be broken if there is a barline in all staves
*/
void
-Bar_engraver::stop_translation_timestep()
+Bar_engraver::stop_translation_timestep ()
{
if (!bar_p_)
{
- Score_engraver * e = 0;
- Translator * t = daddy_grav_l ();
- for (; !e && t; t = t->daddy_trans_l_)
- {
- e = dynamic_cast<Score_engraver*> (t);
- }
-
- if (!e)
- programming_error ("No score engraver!");
- else
- e->forbid_breaks (); // guh. Use properties!
+ top_engraver ()->forbid_breaks (); // guh. Use properties!
}
else
typeset_bar ();
}
-ADD_THIS_TRANSLATOR(Bar_engraver);
+
+ENTER_DESCRIPTION(Bar_engraver,
+/* descr */ "Create barlines. This engraver is controlled through the
+@code{whichBar} property. If it has no bar line to create, it will forbid a linebreak at this point",
+/* creats*/ "BarLine",
+/* acks */ "",
+/* reads */ "whichBar stavesFound",
+/* write */ "");