Getting onMouseDown in background of plugin-window?

A user interface toolkit mainly for audio plug-ins (VST, AudioUnit, etc).
Post Reply
howardantares
Posts: 128
Joined: Tue Jun 21, 2016 1:46 pm

Getting onMouseDown in background of plugin-window?

Post by howardantares »

Aside from deriving a new class from CViewContainer, adding that as an extra layer upon which all sub-views are placed, and overriding onMouseDown() there, is there any way to get mouse clicks on the main window background (not in any sub-view)? (I'm using the SingleComponentEffect, if that matters to the answer.)
Thanks,
Howard

howardantares
Posts: 128
Joined: Tue Jun 21, 2016 1:46 pm

Re: Getting onMouseDown in background of plugin-window?

Post by howardantares »

Specifically, what I want to do is track onMouseDown/onMouseUp/onMouseMoved to provide a way to resize the window in hosts that don't provide a window with a resizeable frame (or in the case of the auwrapper, for situations where we don't seem to get notified about the window frame resizing). I tried this with a view that stayed pinned to the bottom-right, but the mouse coordinates it received were not always in synch with the location of the view itself as its parent view moved it to keep it pinned to the bottom-right. So I'd like to track the movement at the main view level, which is always at 0,0.

Arne Scheffler
Posts: 373
Joined: Mon Jun 20, 2016 7:53 am

Re: Getting onMouseDown in background of plugin-window?

Post by Arne Scheffler »

Hi Howard,
I recommend not to try to live resize the host window if the host does not allow it.
Instead add a context menu (or some other UI) with some predefined sizes which you then set via IPlugFrame->resizeView(..).

Cheers
Arne

howardantares
Posts: 128
Joined: Tue Jun 21, 2016 1:46 pm

Re: Getting onMouseDown in background of plugin-window?

Post by howardantares »

Ok, that's what we're doing for now (and have done for quite some time). But users have repeatedly asked for a way to resize by dragging, and have pointed out that there are other plug-ins that do so (although maybe not made with VSTGUI). It would be nice to have, anyway.

Post Reply