+ create_grobs ();
+ add_brackets ();
+}
+
+void
+Figured_bass_engraver::create_grobs ()
+{
+ Grob *muscol
+ = dynamic_cast<Item*> (unsmob_grob (get_property ("currentMusicalColumn")));
+ if (!alignment_)
+ {
+ alignment_ = make_spanner ("BassFigureAlignment", SCM_EOL);
+ alignment_->set_bound (LEFT, muscol);
+ }
+ alignment_->set_bound (RIGHT, muscol);
+
+ SCM proc = get_property ("figuredBassFormatter");
+ for (vsize i = 0; i < groups_.size (); i++)
+ {
+ Figure_group &group = groups_[i];
+
+ if (group.current_event_)
+ {
+ Item *item
+ = make_item ("BassFigure",
+ group.current_event_->self_scm ());
+
+
+ SCM fig = group.current_event_->get_property ("figure");
+ if (!group.group_)
+ {
+ group.group_ = make_spanner ("BassFigureLine", SCM_EOL);
+ group.group_->set_bound (LEFT, muscol);
+ Align_interface::add_element (alignment_,
+ group.group_);
+ }
+
+ if (scm_memq (fig, get_property ("implicitBassFigures")) != SCM_BOOL_F)
+ {
+ item->set_property ("transparent", SCM_BOOL_T);
+ item->set_property ("implicit", SCM_BOOL_T);
+ }
+
+ group.number_ = fig;
+ group.alteration_ = group.current_event_->get_property ("alteration");
+ group.augmented_ = group.current_event_->get_property ("augmented");
+ group.diminished_ = group.current_event_->get_property ("diminished");
+ group.augmented_slash_ = group.current_event_->get_property ("augmented-slash");
+
+ SCM text = group.current_event_->get_property ("text");
+ if (!Text_interface::is_markup (text)
+ && ly_is_procedure (proc))
+ {
+ text = scm_call_3 (proc, fig, group.current_event_->self_scm (),
+ context ()->self_scm ());
+ }
+
+ item->set_property ("text", text);
+
+ Axis_group_interface::add_element (group.group_, item);
+ group.figure_item_ = item;
+ }
+
+ if (group.continuation_line_)
+ {
+ /*
+ UGH should connect to the bass staff, and get the note heads.
+ */
+ group.figure_item_->set_property ("transparent", SCM_BOOL_T);
+ group.continuation_line_->set_bound (RIGHT, group.figure_item_);
+ }
+
+ if (groups_[i].group_)
+ groups_[i].group_->set_bound (RIGHT, muscol);
+
+ }
+
+}
+
+ADD_TRANSLATOR (Figured_bass_engraver,
+ /* doc */
+ "Make figured bass numbers.",
+
+ /* create */
+ "BassFigure "
+ "BassFigureAlignment "
+ "BassFigureBracket "
+ "BassFigureContinuation "
+ "BassFigureLine ",
+
+ /* read */
+ "figuredBassAlterationDirection "
+ "figuredBassCenterContinuations "
+ "figuredBassFormatter "
+ "implicitBassFigures "
+ "useBassFigureExtenders "
+ "ignoreFiguredBassRest ",
+
+ /* write */
+ ""
+ );