Implementation of the ShapesEditor and its helper classes.