Well, i ended up using the FastFilter as described in the developer docs. It might not output 100% correct html, but it does output my custom button. So i'm happy.
But i would never have made it, unless you guys told me in which direction i should look.
Thanks :-)