(c) 1997--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-#include "debug.hh"
-
+#include "warn.hh"
+#include "main.hh"
#include "system.hh"
#include "item.hh"
#include "score-engraver.hh"
command_column_l_->set_grob_property ("breakable", SCM_BOOL_T);
+
Grob_info i1 (command_column_l_);
i1.origin_trans_l_ = this;
-
+
Grob_info i2 (musical_column_l_);
i2.origin_trans_l_ = this;
+
announce_grob (i1);
announce_grob (i2);
+
+
}
}
{
Global_translator::prepare (w);
+ /*
+ TODO: don't make columns when skipTypesetting is true.
+ */
make_columns ();
-
+
command_column_l_->set_grob_property ("when", now_mom_.smobbed_copy ());
musical_column_l_->set_grob_property ("when", now_mom_.smobbed_copy ());
+
- start_translation_timestep ();
+ Translator_group::start_translation_timestep();
}
void
if (!to_boolean (get_property ("skipTypesetting")))
{
process_music ();
- announces ();
+ do_announces ();
}
stop_translation_timestep ();
check_removal ();
+
+
+ for (int i = announce_info_arr_.size(); i--;)
+ {
+ Grob *g = announce_info_arr_[i].grob_l_;
+ if (!dynamic_cast<Paper_column*> (g)) // ugh.
+ {
+
+ String msg= "Grob "
+ + g->name()
+ + " was created too late!";
+ g->programming_error (msg);
+ }
+ }
+ announce_info_arr_.clear ();
}
void
{
announce_info_arr_.push (info);
pscore_p_->line_l_->typeset_grob (info.grob_l_);
-
-
}
-
void
Score_engraver::typeset_grob (Grob *elem_p)
{
elem_p_arr_.push (elem_p);
}
-
void
Score_engraver::typeset_all ()
{
if (Spanner *s = dynamic_cast <Spanner *> (elem_p))
{
- /*
+ /*
do something sensible if spanner not
spanned on 2 items.
- */
+ */
Direction d = LEFT;
do {
if (!s->get_bound (d))
/* don't warn for empty/suicided spanners,
it makes real warningsinvisible.
maybe should be junked earlier? */
- if (elem_p->immutable_property_alist_ == SCM_EOL)
+ if (!elem_p->live())
; // gdb hook
else
elem_p->warning (_f ("unbound spanner `%s'", s->name ().ch_C ()));
}
- } while (flip (&d) != LEFT);
+ }
+ while (flip (&d) != LEFT);
+
+ if (dynamic_cast<Item*> (s->get_parent (Y_AXIS)))
+ programming_error ("Spanner Y-parent is an item.");
}
else
{
/*
result is junked.
*/
- command_column_l_->remove_grob_property ("breakable");
+ if (command_column_l_)
+ command_column_l_->remove_grob_property ("breakable");
}
void
if (Staff_spacing::has_interface (gi.grob_l_))
{
Pointer_group_interface::add_grob (command_column_l_,
- ly_symbol2scm ("spacing-wishes"),
- gi.grob_l_);
+ ly_symbol2scm ("spacing-wishes"),
+ gi.grob_l_);
}
if (Note_spacing::has_interface (gi.grob_l_))
{