Connect a function to a button created in an object (ControlP5)

In Processing, not really.
In other languages you could be mucking about with function pointers.