CarbonSketch. I wish this example application was around when I was working on my now defunct Mac OS X port of SciTE, or my port of XWT (also now defunct). It shows how to write a custom Mac OS X widget using C++ and the new HIToolbox APIs. It is a very useful, and very polished example for anyone doing this kind of development.