Creating a custom user interface

For examples see the source code in skins that provide them.