Permit modes to enhance the text editor by adding their own typographical effects to the Painter.

This permits Python mode to draw an indentation indicator, which is common in Python editors.