The Analog Clock example shows how to draw the contents of a custom widget.