Is there any info on the changes I need to make to update my code from VSTGUI 4.2 to 4.3? I see, for instance, that there are no longer the CDrawContext::getOffset() or setOffset() function, and that moveTo() and lineTo() are now deprecated, and that the replacement for the deprecated drawLines() is a new drawLines() version that is pure virtual. I’m not sure how to update my old code to work with this new version, and I don’t see anything in the docs that tells me what to change. (Neither the “new stuff” or “changes” listings describe these changes.)
These are the things I ran into when moving to 4.3 in addition to the get/setOffset stuff:
moveTo() and lineTo() are replaced by drawLine()
CControlListener has been renamed to IControlListener
vstguiOutSize is now uint32_t (was int32_t)
vstguiInSize is now uint32_t (was int32_t)
For CXYPad, bounceValues() has been renamed to boundValues()
Related to this in the VST3Editor: be aware that the function arguments have changed slightly for:
where some arguments have been declared as const, so you will need to modify any derived classes that implement them. If you are using VS2008 and do not make these changes, it will compile OK but then will not call the proper function. For the other VS compilers, you will get a compile-time error that the functions are not implemented.
There may be other things not included here; these were the issues I ran into. Hope that helps.
you draw lines now with:
context->drawLine (start, end)
If you need to offset your drawings which you previously did with context->setOffset(x,y), you now use CDrawContext::Transform as a stack object:
CDrawContext::Transform t (*context, CGraphicsTransform ().translate (x,y))
and in the documentation is a section called “VSTGUI 4.2 -> VSTGUI 4.3” which includes this :
- CControlListener was renamed to IControlListener and moved into the VSTGUI namespace and its own header file. A typedef for CControlListener is available but marked as deprecated.
- the VSTGUI::CDrawContext::drawString methods don’t set the clip to rect by itself anymore. If you call this method in your code, you need to set the clip yourself now.
- the interfaces for VSTGUI::IController and VSTGUI::IViewCreator have changed and if you have inherited from them you need to change your implementations accordingly.
- the enum DragResult was moved out of CView into VSTGUI namespace
- VSTGUI::CGradient can now be created without a VSTGUI::CDrawContext object
- VSTGUI::CGradientView takes now a VSTGUI::CGradient. Setting the gradient colors and start offsets are removed.
- VSTGUI::CTextButton takes now VSTGUI::CGradient objects instead of colors and start offsets.
- method signature change for: VSTGUI::CViewContainer::getViewAt, VSTGUI::CViewContainer::getViewsAt, VSTGUI::CViewContainer::getContainerAt
- Some methods changed its arguments or return types from a signed type to an unsigned type, check your overrides !
Thanks, Will and Arne!