text: Add output argument to set_toplevel