+/*
+ TODO: figure out if we can prune this class. This is just an
+ annoying layer between (rest)collision & (note-head + stem)
+ */
+
+bool
+Note_column::has_rests (Grob*me)
+{
+ return unsmob_grob (me->get_property ("rest"));
+}
+
+int
+Note_column::shift_compare (Grob *const &p1, Grob *const&p2)
+{
+ SCM s1 = p1->get_property ("horizontal-shift");
+ SCM s2 = p2->get_property ("horizontal-shift");
+
+ int h1 = (scm_is_number (s1))? scm_to_int (s1) :0;
+ int h2 = (scm_is_number (s2)) ? scm_to_int (s2):0;
+ return h1 - h2;
+}
+
+Item *
+Note_column::get_stem (Grob*me)
+{
+ SCM s = me->get_property ("stem");
+ return unsmob_item (s);
+}
+
+Slice
+Note_column::head_positions_interval (Grob *me)
+{
+ Slice iv;
+
+ iv.set_empty ();
+
+ SCM h = me->get_property ("note-heads");
+ for (; scm_is_pair (h); h = scm_cdr (h))
+ {
+ Grob *se = unsmob_grob (scm_car (h));
+
+ int j = Staff_symbol_referencer::get_rounded_position (se);
+ iv.unite (Slice (j,j));
+ }
+ return iv;
+}
+
+Direction
+Note_column::dir (Grob* me)
+{
+ Grob *stem = unsmob_grob (me->get_property ("stem"));
+ if (stem && Stem::has_interface (stem))
+ return Stem::get_direction (stem);
+ else if (scm_is_pair (me->get_property ("note-heads")))
+ return (Direction)sign (head_positions_interval (me).center ());
+
+ programming_error ("Note column without heads and stem!");
+ return CENTER;
+}