+ if (dir)
+ mol.add_at_edge (Y_AXIS, dir, arrow, 0, 0);
+
+ return mol.smobbed_copy ();
+}
+
+/* Draws a vertical bracket to the left of a chord
+ Chris Jackson <chris@fluffhouse.org.uk> */
+
+MAKE_SCHEME_CALLBACK (Arpeggio, brew_chord_bracket, 1);
+SCM
+Arpeggio::brew_chord_bracket (SCM smob)
+{
+ Grob *me = unsmob_grob (smob);
+ Grob *common = me;
+
+ extract_grob_set (me, "stems", stems);
+ for (vsize i = 0; i < stems.size (); i++)
+ {
+ Grob *stem = stems[i];
+ common = common->common_refpoint (Staff_symbol_referencer::get_staff_symbol (stem),
+ Y_AXIS);
+ }
+
+ Interval heads;
+ Real my_y = me->relative_coordinate (common, Y_AXIS);
+
+ for (vsize i = 0; i < stems.size (); i++)
+ {
+ Grob *stem = stems[i];
+ Grob *ss = Staff_symbol_referencer::get_staff_symbol (stem);
+ Interval iv = Stem::head_positions (stem);
+ iv *= Staff_symbol::staff_space (ss) / 2.0;
+ heads.unite (iv + ss->relative_coordinate (common, Y_AXIS) - my_y);
+ }