- // Remove default translations
- vtkWidgetEventTranslator* t = this->GetEventTranslator( );
- t->RemoveTranslation( vtkCommand::LeftButtonPressEvent );
- t->RemoveTranslation( vtkCommand::MiddleButtonPressEvent );
- t->RemoveTranslation( vtkCommand::RightButtonPressEvent );
+ // These are the event callbacks supported by this widget
+ this->CallbackMapper->SetCallbackMethod(
+ vtkCommand::LeftButtonPressEvent,
+ vtkWidgetEvent::AddPoint,
+ this, Self::_AddPointAction
+ );
+ this->CallbackMapper->SetCallbackMethod(
+ vtkCommand::RightButtonPressEvent,
+ vtkWidgetEvent::Completed,
+ this, Self::_CompletedAction
+ );
+ this->CallbackMapper->SetCallbackMethod(
+ vtkCommand::MouseMoveEvent,
+ vtkWidgetEvent::Move,
+ this, Self::_MoveAction
+ );
+ this->CallbackMapper->SetCallbackMethod(
+ vtkCommand::LeftButtonReleaseEvent,
+ vtkWidgetEvent::EndSelect,
+ this, Self::_EndSelectAction
+ );
+ this->CallbackMapper->SetCallbackMethod(
+ vtkCommand::KeyPressEvent,
+ vtkEvent::NoModifier, 127, 1, "Delete",
+ vtkWidgetEvent::Delete,
+ this, Self::_DeleteAction
+ );