[vtkusers] Blocking 'Q' and 'E' keys

Shashwath T.R. trshash at gmail.com
Tue Feb 24 04:20:56 EST 2009


On Tue, Feb 24, 2009 at 12:06 AM, amutka <alan.mutka at fer.hr> wrote:

>
> Dear Shash, thank you for your answer.
> I add event to interactor...
>
> iren1->AddObserver(vtkCommand::ExitEvent,eventObserver,-5);
>
> And I caught the ExitEvent in my eventObserver class. How can I abort
> event?
> I'm using simple class, structure like this
>
>  void PickCommand::Execute(vtkObject *caller,unsigned long event,void *
> callData)
> {
>
>        switch(event)
>        {
>            case vtkCommand::PickEvent:
>            {
>
>            }
>            case vtkCommand::ExitEvent
>            {
>         ....
>            }
>  }
>
> and I make object from class
>
> PickCommand * eventObserver = PickCommand::New();
> and I simply add observer
>
> iren1->AddObserver(vtkCommand::ExitEvent,eventObserver,-5);
>
> Pressing Q or E Exit event is invoked but how can I block ExitMethod. I
> tried to call
> vtkCommand::SetAbortEvent
>
> but i think this is wrong, I need to block interactor events and I don't
> know how. I'm sorry for bothering, but I have no idea more, so please give
> me another hint!
> Thank you!
>
> Alan
>

Try vtkCommand::AbortFlagOn(). That should do it...

Regards,
Shash
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090224/7655a4b7/attachment.htm>


More information about the vtkusers mailing list