[vtkusers] Callback not firing?

John Platt jcplatt at dsl.pipex.com
Tue Oct 20 04:07:24 EDT 2009


Hi David,

I noticed you were using a rubber band interactor. Is the redraw of the band 
on mouse move done at an acceptable rate when the image is at full screen. 
If so, what o/s?

Many thanks.

John.

----- Original Message ----- 
From: "David Doria" <daviddoria+vtk at gmail.com>
Cc: <vtkusers at vtk.org>
Sent: Monday, October 19, 2009 6:51 PM
Subject: Re: [vtkusers] Callback not firing?


> On Mon, Oct 19, 2009 at 10:35 AM, Jeff Baumes <jeff.baumes at kitware.com> 
> wrote:
>> I don't see in your code the line:
>>
>> style->AddObserver(vtkCommand::SelectionChangedEvent,SelectionChangedCallback);
>>
>> The interactor style invokes the event, so you need to attach the
>> callback to it.
>>
>> Jeff
>>
>
> Thanks Jeff - that did it. This is exactly the type of thing I am
> trying to sort out and make examples of for the wiki (although I think
> the better solution is still for better documentation in the classes
> themselves so the doxygen pages contain this type of information).
>
> Another thing: I tried to override this function:
>
> void vtkInteractorStyleRubberBand2D::OnLeftButtonUp()
> {
>  vtkstd::cout << "LeftButtonUp!" << vtkstd::endl;
> }
>
> but now when I release the button the rubberband outline is not
> erased. I'm assuming I have to "forward" the event to whichever
> function was going to handle this before I overrode the function - how
> would I find out which function that is / how to do that?
>
> Thanks,
>
> David
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at 
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: 
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> 





More information about the vtkusers mailing list