this->NormalToYAxis = 0;
this->NormalToZAxis = 0;
+ this->HandleMoveEvent = true;
+ this->HandleLeftButtonEvent = true;
+ this->HandleMiddleButtonEvent = false;
+ this->HandleRightButtonEvent = false;
+
// Build the representation of the widget
//
this->Plane = vtkPlane::New();
// listen for the following events
vtkRenderWindowInteractor *i = this->Interactor;
- i->AddObserver(vtkCommand::MouseMoveEvent, this->EventCallbackCommand,
- this->Priority);
- i->AddObserver(vtkCommand::LeftButtonPressEvent,
- this->EventCallbackCommand, this->Priority);
- i->AddObserver(vtkCommand::LeftButtonReleaseEvent,
- this->EventCallbackCommand, this->Priority);
- i->AddObserver(vtkCommand::MiddleButtonPressEvent,
- this->EventCallbackCommand, this->Priority);
- i->AddObserver(vtkCommand::MiddleButtonReleaseEvent,
- this->EventCallbackCommand, this->Priority);
- i->AddObserver(vtkCommand::RightButtonPressEvent,
- this->EventCallbackCommand, this->Priority);
- i->AddObserver(vtkCommand::RightButtonReleaseEvent,
- this->EventCallbackCommand, this->Priority);
-
+ if( this->HandleMoveEvent )
+ {
+ i->AddObserver(vtkCommand::MouseMoveEvent, this->EventCallbackCommand,
+ this->Priority);
+ }
+ if( this->HandleLeftButtonEvent )
+ {
+ i->AddObserver(vtkCommand::LeftButtonPressEvent,
+ this->EventCallbackCommand, this->Priority);
+ i->AddObserver(vtkCommand::LeftButtonReleaseEvent,
+ this->EventCallbackCommand, this->Priority);
+ }
+ if( this->HandleMiddleButtonEvent )
+ {
+ i->AddObserver(vtkCommand::MiddleButtonPressEvent,
+ this->EventCallbackCommand, this->Priority);
+ i->AddObserver(vtkCommand::MiddleButtonReleaseEvent,
+ this->EventCallbackCommand, this->Priority);
+ }
+ if( this->HandleRightButtonEvent )
+ {
+ i->AddObserver(vtkCommand::RightButtonPressEvent,
+ this->EventCallbackCommand, this->Priority);
+ i->AddObserver(vtkCommand::RightButtonReleaseEvent,
+ this->EventCallbackCommand, this->Priority);
+ }
// add the outline
this->CurrentRenderer->AddActor(this->OutlineActor);
this->OutlineActor->SetProperty(this->OutlineProperty);