For an application I'm working on, I needed a button for selecting the visual mode. It was by accident, but apparently it looks similar to a frequently used widget in OS X.
In my normal style, I've written the widget in multiple languages. It's available in C, C#, and Python.
Grab the code here. It's headers state LGPL 2.1, but if you want something different, just ask me. I'm pretty flexible.