+void
+Item::handle_prebroken_dependencies ()
+{
+ Grob::handle_prebroken_dependencies ();
+
+ /*
+ Can't do this earlier, because try_visibility_lambda () might set
+ the elt property transparent, which would then be copied.
+
+ TODO:
+
+ give the item to break-visibility itself, so the function can do
+ more complicated things.
+ */
+ SCM vis = get_grob_property ("break-visibility");
+ if (gh_procedure_p (vis))
+ {
+ SCM args = scm_list_n (gh_int2scm (break_status_dir ()), SCM_UNDEFINED);
+ SCM result = gh_apply (vis, args);
+ bool trans = gh_scm2bool (ly_car (result));
+ bool empty = gh_scm2bool (ly_cdr (result));
+
+ if (empty && trans)
+ suicide ();
+ else if (empty)
+ {
+ set_extent (SCM_EOL, X_AXIS);
+ set_extent (SCM_EOL, Y_AXIS);
+ }
+ else if (trans)
+ set_grob_property ("molecule-callback", SCM_EOL);
+ }
+}
+
+SCM
+Item::do_derived_mark ()
+{
+ if (broken_to_drul_[LEFT])
+ scm_gc_mark (broken_to_drul_[LEFT]->self_scm ());
+ if (broken_to_drul_[RIGHT])
+ scm_gc_mark (broken_to_drul_[RIGHT]->self_scm ());
+ return SCM_EOL;
+}
+
+Item*
+unsmob_item (SCM s )
+{
+ return dynamic_cast<Item*> (unsmob_grob (s));
+}
+
+
+
+ADD_INTERFACE(Item,
+ "item-interface",
+ "
+
+Grobs can be distinguished in their role in the horizontal spacing.
+Many grobs define constraints on the spacing by their sizes. For
+example, note heads, clefs, stems, and all other symbols with a fixed
+shape. These grobs form a subtype called @code{Item}.