VSTGUI question
- KVRian
- Topic Starter
- 1253 posts since 31 Dec, 2008
After onMouseDown() has been captured on a view. And mouse button is still down, the mouse moved and entered another View. The other View does NOT capture any mouse messages!! until the mouse button is lifted and onMouseUp() is called on the first view.
Any way around this? i.e can I capture mouse events on the second View while still pressing the mouse button?
Any way around this? i.e can I capture mouse events on the second View while still pressing the mouse button?
www.solostuff.net
Advice is heavy. So don’t send it like a mountain.
Advice is heavy. So don’t send it like a mountain.
-
- KVRAF
- 3388 posts since 29 May, 2001 from New York, NY
If you are using VSTGui 4, you can make your second View implement IMouseObserver, then call:
getFrame()->registerMouseObserver(this); in its attached() method.
getFrame()->registerMouseObserver(this); in its attached() method.
- KVRian
- Topic Starter
- 1253 posts since 31 Dec, 2008
Thanks for trying, but I'm using 3.6.
I fiddled out a way to do it using localToFrame(), getViewAt() and isTypeOf(). But It's not the most efficient thing. I first thought I could do it with Drag/Drop functions, but it seams those handle only external to internal drag and drop as far as I can tell.
I fiddled out a way to do it using localToFrame(), getViewAt() and isTypeOf(). But It's not the most efficient thing. I first thought I could do it with Drag/Drop functions, but it seams those handle only external to internal drag and drop as far as I can tell.
www.solostuff.net
Advice is heavy. So don’t send it like a mountain.
Advice is heavy. So don’t send it like a mountain.
-
- KVRAF
- 3388 posts since 29 May, 2001 from New York, NY
Or you can handle onMouseMoved() in the view you clicked on, then use notify() with a custom code to notify the 2nd view.
- KVRian
- Topic Starter
- 1253 posts since 31 Dec, 2008
Thanks for that. Seams to work. At least now I don't have to use that hideous isTypeOf().
I would say it'a rather odd that they didn't include any way to drag/drop a view into another view.
I would say it'a rather odd that they didn't include any way to drag/drop a view into another view.
www.solostuff.net
Advice is heavy. So don’t send it like a mountain.
Advice is heavy. So don’t send it like a mountain.