*	Drawing a grid as the window's background.
*	Our first idea was to use the `wxCustomBackgroundWindow` class to tile a bitmap of a grid all over the window's background.
	But it turned out that it doesn't work well with the `wxScrolledWindow`, so we will drop it soon.
*	The grid drawing code has been factored out to a separate low-level drawing function which draws a single grid.
	The function is called three times with different parameters to draw the complex grid.
	We will continue refactoring it later.

PROBLEMS:
*	The grid is painted incorrectly in the damaged regions, because it doesn't seem to account for the scrolled position.
	Instead, it always draws the grid precisely at the same place in the window's background.
	The way to correct this is to overwrite the Erase or Paint event and call `DoPrepareDC` on the device context before drawing the bitmap.
	But this would undermine the whole idea of using `wxCustomBackgroundWindow`, since we would have to draw the background ourselves anyway.
	This means that we can as well switch to that method instead.

TODO:
*	Factor out the grid drawing code some more.
*	Switch to hand-drawing the background.