}
//=========================================================================
+ bool GPortController::OnLeftButtonDown()
+ {
+
+ if ( _vtkInteractorStyleBaseView!=NULL )
+ {
+ int X,Y;
+ wxVTKRenderWindowInteractor *wxVTKiren;
+ wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk3DBaseView()->GetWxVTKRenderWindowInteractor();
+ wxVTKiren->GetEventPosition(X,Y);
+
+ int state = _model->getState();
+
+ int portType = ((GPortModel*)_model)->getPortType();
+
+ //Evaluate new state
+ if(!_model->hasChanged() && state==HIGHLIGHTED && portType==GOUTPUTPORT )
+ {
+ _model->setState(CREATING_CONTOUR);
+ _model->setChanged();
+ }
+
+ _model->notifyObservers();
+
+ }
+ return true;
+ }
+ //=========================================================================
+ bool GPortController::OnLeftButtonUp()
+ {
+ if ( _vtkInteractorStyleBaseView!=NULL )
+ {
+ int X,Y;
+ wxVTKRenderWindowInteractor *wxVTKiren;
+ wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk3DBaseView()->GetWxVTKRenderWindowInteractor();
+ wxVTKiren->GetEventPosition(X,Y);
+
+ int state = _model->getState();
+
+ //Evaluate new state
+ if(!_model->hasChanged() && state==CREATING_CONTOUR)
+ {
+ if(_view->isPointInside(X,Y))
+ {
+ _model->setChanged();
+ _model->notifyObservers(INIT_CREATION_CONTOUR);
+ }
+ else
+ {
+ _model->setState(NOTHING_HAPPENS);
+ _model->setChanged();
+ _model->notifyObservers();
+ }
+ }
+
+
+
+ }
+ return true;
+ }
//=========================================================================