Allow widget definitions to use a callback