# Cursor

A cursor is a small Plane (gr/plane) drawn on top of a bigger one and that can
move around. The challenge here is to be able to draw what was "under" the
cursor when the cursor moves.

The idea is that the cursor's Plane buffer holds the image *under* it. When it
is initialized, it copies the contents of its "parent" buffer into itself, then
it draws itself into the parent buffer.

When the cursor moves, it copies back its contents into the parent buffer, then
moves itself, then copies the contents of the parent buffer into itself, and
then draws itself into the parent.

When the parent draws anything, it checks if the drawing touches the cursor
area. If it does, before drawing, it offloads its content into the parent, then
the parent draws its thing, then the cursor refreshes its buffer and draws
itself again.

For now, the cursor is drawn as a simple rectangle of a single color.

## API

Fields:

parent  The Plane upon which this cursor is drawn

Methods:

:new ( parent -- cursor )
  Create a new cursor. Allocates a buffer, initializes itself to pos 0,0 and
  makes its first initial copy of the parent buffer.

:move ( x y self -- )
  Copies self's buffer to parent at old position, move self (through Rect
  :move), then copy parent buffer into self at new position, then draw the
  cursor at new position.
