Added a protocol to modify segments upon selection.

@smbarne Please take a look.