JUCE icon indicating copy to clipboard operation
JUCE copied to clipboard

Adding MouseInterceptor class for better AAX/VST3 menu handling

Open LukeSonnox opened this issue 4 years ago • 0 comments
trafficstars

These changes are an example of how to implement a class which allows juce::MouseEvent calls to be intercepted and stolen by an external object.

This allows for the AAX wrapper to implement the expected behaviour when showing the parameter automation menu (i.e. mouseDown and mouseDrag events shouldn't be allowed to the target juce::Component when the keys are pressed);

Added a workaround for the missing AAX_eModifiers_SecondaryButton flag from GetModifiers function;

Added the parameter context menu to the VST3 wrapper using the same mechanism.

A couple of things:

There is a lot of duplication between the MouseListenerList and MouseInterceptorList classes which can probably be reduced; I haven't compiled and tested the g++ 4.8 checks; I've only implemented mouseDown, mouseDrag and mouseUp in this example because that's all that's needed for the parameter context menus, but we have examples where it's convienient for other mouse function calls to be intercepted for various reasons.

LukeSonnox avatar Jan 14 '21 08:01 LukeSonnox