Creating a panel with a size defined at init (contruction) time

For the faust2vcvrack tool I’m developing, I need to create a panel which size will be computed at init time (that is when ModuleWidget/Module constructors are called).

I would like to create the panel using C++ code, then fill it with a number of control parameters and audio ins/outs that will be known at init time. Thus I guess the SVG resource file is not needed at all, and everything should be doable programatically.

Are they any source code example I could look at? Thanks.

The VCV Blank module uses a code generated panel rather than an SVG file.

Yes, but VCV_Andrew told yesterday on discord channel:

VCV Blank uses unsupported API. Any hack you attempt may break in a future version of Rack.