VSTGUI4 - can you mix XML-design and the old Draw context?


I don’t see too many advantages in using the uidesc (XML-format) for making GUIs. But what I am actually missing is the old Draw-Context, so that I can use drawLine, drawEllipse etc… Where can I get the pContext to use those functions? Do I have to put something in the XML??? Or do I have to write in the old style (without XML)?

I am not new to VST/VSTGUI, but this is just stopping me now.

sure you can register your own custom view so that you can use it via xml.
See: https://steinbergmedia.github.io/vst3_doc/vstgui/html/page_uidescription_editor.html#ui_editor_custom_view_creation


I’ve been using the VSTGUI4 XML-design along with hand-coded VSTGUIs with great results. I know your post was more about visual aspects (drawing) and as Arne points out, using the Custom View paradigm allows you to use the XML format for packaging the GUI while still allowing full custom control over specialized GUI components and their visual aspects.

But there are a few other things that make the XML packaging attractive for me:

  1. Subcontrollers: when you combine the Custom View and Subcontroller programming paradigms together with the XML packaging, you can generate any GUI you desire with full control over visual aspects (custom views) and complex or intelligent control interactions (subcontrollers)

  2. the ability to embed the PNG data in the XML file can be really helpful if you move GUIs from project to project, or you don’t want to deal with resources in XCode or Visual Studio, or you don’t want the users to steal your graphics files in the bundle’s Resource folder.

You can also package multiple GUIs in multiple, separate XML files, then load the GUIs at runtime as needed.