[vtk-developers] Re: GUISupport directory ?
Clinton Stimpson
clinton at elemtech.com
Thu Feb 17 11:46:42 EST 2005
de Boer Ingo wrote:
>Hi,
>
>I have attached some new samples.
>Clinton attempt was correct. The vtkMFCWindow must be a child and
>your own view cannot be derived from it.
>When you compile these samples you'll notice everything works.
>But... Here comes the tricky part: How do I catch a double
>click in the CView ?? It is not possible the easy way.
>We have the following situation: When we use the generic
>window, it is a child of the view. This child does all the
>catching stuff, the view does not get any double click
>message. The generic window must send it back to its parent.
>
I think double clicks are important too. But I don't think the CView
should have to deal with that.
The QVTKWidget handles double clicks by setting the RepeatCount on the
interactor and sending a mouse event to the interactor, which in turn
goes to the interactor style. So double clicks are handled in the same
place all the other events are handled.
So, we just need to catch WM_LBUTTONDBLCLK. I suggest we make that
change in vtkWin32RenderWindowInteractor. And then the WinProc for
vtkMFCWindow also catches WM_LBUTTONDBLCLK and passes it to the interactor.
>
>Now, when you don't use the generic window but the view
>directly (like the samples I posted in the bug tracker)
>we can catch the double click in the view.
>In my opinion, when we use the generic class there has to be
>some modification, either to the generic class or in VTK ?
>(I wasn't even able to catch the double click in the dialog
>sample of the bug tracker samples)
>I think it is important to have this double click feature,
>just like the printing feature.
>
That printing feature you are referring to seems specific to the CView
class. Perhaps we make a CView derived class, vtkMFCView or something,
and put that in GUISupport/MFC which uses vtkMFCWindow and adds printing
support among any other useful things.
Does that give you everything you need?
Clint
>
>I think all samples have advantages and disadvantages.
>
>greets
> Ingo
>
>---
>Dr.-Ing. Ingo H. de Boer
>
>Polytec GmbH
>Polytec-Platz 1-7, 76337 Waldbronn, Germany
>phone: ++49 7243 604 106
>fax : ++49 7243 604 255
>
More information about the vtk-developers
mailing list