bbtk::GConnectorController Class Reference

#include <GConnectorController.h>

Inheritance diagram for bbtk::GConnectorController:

Inheritance graph
[legend]
Collaboration diagram for bbtk::GConnectorController:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 GConnectorController ()
 ~GConnectorController ()
virtual bool OnMouseMove ()
virtual bool OnLeftButtonDown ()
virtual bool OnLeftButtonUp ()
virtual bool OnLeftDClick ()
virtual bool OnRightButtonDown ()
virtual bool OnRightButtonUp ()
virtual bool OnMiddleButtonDown ()
virtual bool OnMiddleButtonUp ()
manualConnectorContourControllergetManualContourController ()
void setManualContourController (manualConnectorContourController *controller)
virtual void removeFromScene ()
void endContourCreation ()
void setModelAndView (GObjectModel *model, vtkGObjectView *view)
int getGObjectType ()
GObjectModelgetModel ()
vtkGObjectViewgetView ()
std::string getStatusText ()
int getId ()
void setId (int id)

Protected Member Functions

virtual void moveObject (int X, int Y)

Protected Attributes

GObjectModel_model
vtkGObjectView_view
bool _isLeftClickDown

Private Attributes

manualConnectorContourController_controller


Detailed Description

Definition at line 63 of file GConnectorController.h.


Constructor & Destructor Documentation

bbtk::GConnectorController::GConnectorController (  ) 

Definition at line 47 of file GConnectorController.cxx.

00048         {
00049 
00050         }

bbtk::GConnectorController::~GConnectorController (  ) 

Definition at line 54 of file GConnectorController.cxx.

00055         {
00056         }


Member Function Documentation

void bbtk::GConnectorController::endContourCreation (  ) 

Definition at line 211 of file GConnectorController.cxx.

References _controller, and bbtk::manualConnectorContourController::endContourCreation().

Referenced by bbtk::wxVtkSceneManager::addObjects(), bbtk::wxVtkSceneManager::configGConnetion(), and bbtk::wxVtkSceneManager::DuplicateObjects().

00212         {
00213                 _controller->endContourCreation();
00214         }

Here is the call graph for this function:

Here is the caller graph for this function:

int bbtk::GObjectController::getGObjectType (  )  [inherited]

int bbtk::GObjectController::getId (  )  [inherited]

manualConnectorContourController * bbtk::GConnectorController::getManualContourController (  ) 

Definition at line 185 of file GConnectorController.cxx.

References _controller.

00186         {
00187                 return _controller;
00188         }

GObjectModel * bbtk::GObjectController::getModel (  )  [inherited]

std::string bbtk::GObjectController::getStatusText (  )  [inherited]

Definition at line 181 of file GObjectController.cxx.

References bbtk::GObjectController::_model, and bbtk::GObjectModel::getStatusText().

Referenced by bbtk::wxVtkSceneManager::OnMouseMove().

00181                                                 {
00182         return _model->getStatusText( ) ;
00183     }

Here is the call graph for this function:

Here is the caller graph for this function:

vtkGObjectView * bbtk::GObjectController::getView (  )  [inherited]

void bbtk::GObjectController::moveObject ( int  X,
int  Y 
) [protected, virtual, inherited]

Definition at line 145 of file GObjectController.cxx.

References bbtk::GObjectController::_view, and bbtk::vtkGObjectView::moveObject().

00145                                                       {
00146         _view->moveObject( X , Y ) ;
00147     }

Here is the call graph for this function:

bool bbtk::GConnectorController::OnLeftButtonDown (  )  [virtual]

Reimplemented from bbtk::GObjectController.

Definition at line 81 of file GConnectorController.cxx.

References _controller, and bbtk::manualConnectorContourController::MouseClickLeft().

00082         {
00083 
00084                 if ( _vtkInteractorStyleBaseView!=NULL )
00085                 {
00086                         int X,Y;
00087                         wxVTKRenderWindowInteractor *wxVTKiren;
00088                         wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk3DBaseView()->GetWxVTKRenderWindowInteractor();
00089                         wxVTKiren->GetEventPosition(X,Y);
00090 
00091                         _controller->SetKeyBoardMoving( false );
00092                         _controller->MouseClickLeft(X,Y);
00093 
00094                 }
00095                 return true;
00096         }

Here is the call graph for this function:

bool bbtk::GConnectorController::OnLeftButtonUp (  )  [virtual]

Reimplemented from bbtk::GObjectController.

Definition at line 100 of file GConnectorController.cxx.

References _controller, bbtk::GObjectController::_model, bbtk::GObjectController::_view, bbtk::ADD_TO_SELECTED, bbtk::GObjectController::getId(), bbtk::Observable::notifyObservers(), bbtk::SELECTED, and bbtk::vtkGObjectView::setState().

00101         {
00102                 if( _vtkInteractorStyleBaseView!= NULL )
00103                 {
00104                         int X,Y;
00105                         wxVTKRenderWindowInteractor *wxVTKiren;
00106                         wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk3DBaseView()->GetWxVTKRenderWindowInteractor();
00107                         wxVTKiren->GetEventPosition(X, Y);
00108 
00109                         _controller->MouseReleaseLeft(X,Y);
00110                         if(_controller->GetManualViewBaseContour()->GetSelected()==true)
00111                         {
00112                                 _view->setState(SELECTED);
00113                                 _model->notifyObservers(getId(),ADD_TO_SELECTED);
00114                         }
00115 
00116                 }
00117                 return true;
00118 
00119         }

Here is the call graph for this function:

bool bbtk::GConnectorController::OnLeftDClick (  )  [virtual]

Reimplemented from bbtk::GObjectController.

Definition at line 123 of file GConnectorController.cxx.

References _controller.

00124         {
00125 
00126                 if ( _vtkInteractorStyleBaseView!=NULL )
00127                 {
00128                         int X,Y;
00129                         wxVTKRenderWindowInteractor *wxVTKiren;
00130                         wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk3DBaseView()->GetWxVTKRenderWindowInteractor();
00131                         wxVTKiren->GetEventPosition(X,Y);
00132 
00133                         _controller->MouseDLeft(X,Y);
00134 
00135                 }
00136                 return true;
00137         }

bool bbtk::GConnectorController::OnMiddleButtonDown (  )  [virtual]

Reimplemented from bbtk::GObjectController.

Definition at line 165 of file GConnectorController.cxx.

References _controller.

00166         {
00167                 if ( _vtkInteractorStyleBaseView!=NULL )
00168                 {
00169                         int X,Y,Z=900;
00170                         wxVTKRenderWindowInteractor *wxVTKiren;
00171                         wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk3DBaseView()->GetWxVTKRenderWindowInteractor();
00172                         wxVTKiren->GetEventPosition(X, Y);
00173                         _controller->GetManualViewBaseContour()->InitMove( X, Y,Z);
00174                 }
00175                 return true;
00176         }

bool bbtk::GConnectorController::OnMiddleButtonUp (  )  [virtual]

Definition at line 178 of file GConnectorController.cxx.

00179         {
00180                 return true;
00181         }

bool bbtk::GConnectorController::OnMouseMove (  )  [virtual]

Reimplemented from bbtk::GObjectController.

Definition at line 60 of file GConnectorController.cxx.

References _controller, and bbtk::manualConnectorContourController::MouseMove().

00061         {
00062 
00063                 if ( _vtkInteractorStyleBaseView!=NULL)
00064                 {
00065                         int X,Y;
00066                         wxVTKRenderWindowInteractor *_wxVTKiren;
00067                         _wxVTKiren= _vtkInteractorStyleBaseView->GetWxVtk3DBaseView()->GetWxVTKRenderWindowInteractor();
00068                         _wxVTKiren->GetEventPosition( X , Y );
00069 
00070                         if ( (_vtkInteractorStyleBaseView->GetInteractor()->GetControlKey()==0) &&(_vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey()==0) )
00071                         {
00072                                 _controller->MouseMove(X,Y);
00073                         }
00074 
00075                 }
00076                 return true;
00077         }

Here is the call graph for this function:

bool bbtk::GConnectorController::OnRightButtonDown (  )  [virtual]

Definition at line 141 of file GConnectorController.cxx.

References _controller, and bbtk::manualConnectorContourController::MouseClickRight().

00142         {
00143                 if( _vtkInteractorStyleBaseView!= NULL )
00144                 {
00145                         int X,Y;
00146                         wxVTKRenderWindowInteractor *wxVTKiren;
00147                         wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk3DBaseView()->GetWxVTKRenderWindowInteractor();
00148                         wxVTKiren->GetEventPosition(X, Y);
00149 
00150                         _controller->MouseClickRight(X,Y);
00151 
00152                 }
00153                 return true;
00154         }

Here is the call graph for this function:

bool bbtk::GConnectorController::OnRightButtonUp (  )  [virtual]

Definition at line 158 of file GConnectorController.cxx.

00159         {
00160                 return true;
00161         }

void bbtk::GConnectorController::removeFromScene (  )  [virtual]

Reimplemented from bbtk::GObjectController.

Definition at line 200 of file GConnectorController.cxx.

References _controller, bbtk::GObjectController::_model, and bbtk::GConnectorModel::disconnectConnection().

Referenced by bbtk::wxVtkSceneManager::CancelConnection().

00201         {
00202                 GConnectorModel *conMod = (GConnectorModel*)_model;
00203                 conMod->disconnectConnection();
00204 
00205                 _controller->SetEditable(false);
00206                 _controller->DeleteContour();
00207         }

Here is the call graph for this function:

Here is the caller graph for this function:

void bbtk::GObjectController::setId ( int  id  )  [inherited]

Definition at line 175 of file GObjectController.cxx.

References bbtk::GObjectController::_model, and bbtk::GObjectModel::setObjectId().

00175                                           {
00176         _model->setObjectId( id ) ;
00177     }

Here is the call graph for this function:

void bbtk::GConnectorController::setManualContourController ( manualConnectorContourController controller  ) 

Definition at line 192 of file GConnectorController.cxx.

References _controller.

Referenced by bbtk::wxVtkSceneManager::createGConnector().

00193         {
00194                 _controller = controller;
00195                 _controller->SetVtkInteractorStyleBaseView(_vtkInteractorStyleBaseView);
00196         }

Here is the caller graph for this function:

void bbtk::GObjectController::setModelAndView ( GObjectModel model,
vtkGObjectView view 
) [inherited]


Member Data Documentation

bool bbtk::GObjectController::_isLeftClickDown [protected, inherited]


The documentation for this class was generated from the following files:

Generated on Thu May 31 15:13:39 2012 for bbtkGEditor by  doxygen 1.5.7.1