]> Creatis software - bbtkGEditor.git/commitdiff
Necessary changes to manage the basic action . First prototype totally completed...
authorcorredor <>
Thu, 15 Apr 2010 16:30:15 +0000 (16:30 +0000)
committercorredor <>
Thu, 15 Apr 2010 16:30:15 +0000 (16:30 +0000)
16 files changed:
lib/EditorGraphicBBS/bbsKernelEditorGraphic/GBlackBoxModel.cxx
lib/EditorGraphicBBS/bbsKernelEditorGraphic/GObjectModel.cxx
lib/EditorGraphicBBS/bbsKernelEditorGraphic/GObjectModel.h
lib/EditorGraphicBBS/bbsKernelEditorGraphic/GPortModel.cxx
lib/EditorGraphicBBS/bbsKernelEditorGraphic/GlobalConstants.h
lib/EditorGraphicBBS/bbsKernelEditorGraphic/Observable.cxx
lib/EditorGraphicBBS/bbsKernelEditorGraphic/wxVtkSceneManager.cxx
lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GBlackBoxController.cxx
lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GBlackBoxController.h
lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GObjectController.cxx
lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBlackBoxView.cxx
lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGBlackBoxView.h
lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGObjectView.cxx
lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGObjectView.h
lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/vtkGPortView.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx

index 876dbb072c94123b165b2acf1ead577aab1a4d36..fa165c00025cb01af49b93ed80de4d5cad4abee5 100644 (file)
@@ -125,6 +125,9 @@ namespace bbtk
                return temp;
        }
 
+       //=========================================================================
+
+
 }  // EO namespace bbtk
 
 // EOF
index d2212d4a860497a721de25b445d3426a54c6e297..15d0d397a662bcbef673534f217f3995c184cb35 100644 (file)
@@ -75,6 +75,14 @@ namespace bbtk
        }
        //=========================================================================
 
+       void GObjectModel::getCenter(double& x, double& y, double& z)
+       {
+               x = (_xInic+_xFin)/2;
+               y = (_yInic+_yFin)/2;
+               z = (_zInic+_zFin)/2;
+       }
+       //=========================================================================
+
        void GObjectModel::setInicPoint(double& x, double& y, double& z)
        {
                _xInic = x;
index eefd07c1928cf980db1fb406d7ea465f0fc075b8..43f4591d206bc0e1e2a1fa294b46a76fdd0a588f 100644 (file)
@@ -71,6 +71,7 @@ namespace bbtk
                
                void getInicPoint(double& x, double& y, double& z);
                void getFinalPoint(double& x, double& y, double& z);
+               void getCenter(double& x, double& y, double& z);
                virtual void setInicPoint(double& x, double& y, double& z);
                virtual void setFinalPoint(double& x, double& y, double& z);
                void setState(int state);
index abb6945db8c7bc903b5a513c5a5951570f06424d..8672eedafa918db517bcf5bbbcdf57f08269982a 100644 (file)
@@ -80,7 +80,7 @@ namespace bbtk
                        posY = yFin;
                }
 
-               //Usually pos begins in 0
+               //Variable 'pos' starts with value 0 and it represents the position of the port in the box from left to right
                posX = xInic + PORT_WIDTH + pos*2*PORT_WIDTH;
                
                setInicPoint(posX,posY,posZ);
index 06afba201c36ebecde19ce41ad930eec72cf3973..3d8d7558059ef1e9c54927952301bc4008b4cfbe 100644 (file)
@@ -59,10 +59,10 @@ namespace bbtk
        const int CREATING_CONTOUR=106;
 
        // Object dimensions
-       const double BOX_HEIGHT=15;
-       const double BOX_WIDTH=100;
-       const double PORT_HEIGHT=3;
-       const double PORT_WIDTH=3;
+       const double BOX_HEIGHT         =       15;
+       const double BOX_WIDTH          =       100;
+       const double PORT_HEIGHT        =       2;
+       const double PORT_WIDTH         =       2;
 
        // Commands
        const int REPAINT = 201;
index b169cc43b0e737cd74a3646d680b1d293d4959a7..82c51961e7a57849474a958e523fdb37d6c83a12 100644 (file)
@@ -83,7 +83,6 @@ namespace bbtk
 
        void Observable::addObserver(Observer *observer)
        {
-               std::cout<<"RaC Observable::addObserver "<<observer<<std::endl;
                _observers.push_back(observer);
        }
 
index 7370b197621b13d3564a857ce4f0e97320845d33..8592cc116e55f4abbc6d408bc4d4a7fa7fa82714 100644 (file)
@@ -157,12 +157,8 @@ namespace bbtk
                iren->SetInteractorStyle(interactorstylebaseview);
                interactorstylebaseview->SetwxVtkBaseView(_baseView);
                
-               double posCamera[3];
                _baseView->GetRenderer()->GetActiveCamera()->ParallelProjectionOn();
-               _baseView->GetRenderer()->GetActiveCamera()->SetPosition(0,0,1000);
-               _baseView->GetRenderer()->GetActiveCamera()->GetPosition(posCamera);
-               _baseView->GetRenderer()->ResetCamera();
-               _baseView->GetRenderer()->ResetCameraClippingRange();
+               _baseView->GetRenderer()->ResetCamera(-100,100,-100,100,900,900);
                
 
                _baseView->GetRenderer()->SetBackground(0.9,0.9,0.9);
@@ -203,7 +199,7 @@ namespace bbtk
                int cantObjects = _objects.size();
                cantObjects++;
                std::stringstream stream;
-               stream << "Box " << cantObjects;
+               stream << "Box:Algo " << cantObjects;
                std::string arraystring = stream.str();
 
                model->setBBTKName(arraystring);
@@ -325,8 +321,8 @@ namespace bbtk
                manualContourControler* manContourControl       = new manualContourControler();
                GConnectorView* manViewerContour        = new GConnectorView();
                manualContourModel* manContourModel     = new manualContourModel();
+               manContourModel->SetCloseContour(false);
 
-               
                manViewerContour->SetModel( manContourModel );
                manViewerContour->SetWxVtkBaseView( _baseView );
                manViewerContour->SetRange( 0.5 );
@@ -340,14 +336,16 @@ namespace bbtk
                manContourControl->SetModelView( manContourModel , manViewerContour );
                manContourControl->Configure();
                int i,sizeLstPoints = manContourModel->GetSizeLstPoints();
-               //std::cout<<"RaC wxVtkSceneManager::createGConnector "<<this<<" size:"<<sizeLstPoints<<std::endl;
+
                for ( i=0; i<sizeLstPoints; i++ )
                {
                        manViewerContour->AddPoint();
                }
 
                manContourControl->CreateNewManualContour();
-               manViewerContour->RefreshContour();                     
+
+               manViewerContour->RefreshContour();
+
                registerController((InteractorStyleMaracas*) manContourControl);
 
        }
index 7cdf253320c15db89d9aa4bf4d1a2149e2091aad..cf4037ed249cf742a07c863e7117953f1cb5d9ae 100644 (file)
@@ -52,6 +52,156 @@ namespace bbtk
        }
        //=========================================================================
 
+       bool GBlackBoxController::OnMouseMove()
+       {
+               
+               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 == DRAG)
+                       {
+                               moveObject(X,Y);
+                               _model->setChanged();
+                       }
+
+                       if(!_model->hasChanged() && state == NOTHING_HAPPENS)
+                       {
+                               if(_view->isPointInside(X,Y))
+                               {
+                                       _model->setState(HIGHLIGHTED);
+                                       _model->setChanged();                           
+                               }                       
+                       }
+                       if(!_model->hasChanged() && state==HIGHLIGHTED)
+                       {
+                               if(!_view->isPointInside(X,Y))
+                               {
+                                       _model->setState(NOTHING_HAPPENS);
+                                       _model->setChanged();
+                               }
+                       }
+                       
+                       _model->notifyObservers();
+               }
+               return true;
+       }
+
+       //=========================================================================
+       
+       bool GBlackBoxController::OnLeftButtonDown()
+       {
+               
+               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==HIGHLIGHTED)
+                       {
+                               _view->isStartDragging(true);
+                               _model->setState(DRAG);
+                               _model->setChanged();
+                       }
+
+                       if( !_model->hasChanged() && state == SELECTED)
+                       {
+                               if(_view->isPointInside(X,Y))
+                               {
+                                       _view->isStartDragging(true);
+                                       _model->setState(DRAG);
+                                       _model->setChanged();
+                               }       
+                       }
+                       
+                       _model->notifyObservers();
+               }
+               return true;
+       }
+
+       //=========================================================================
+       
+       bool GBlackBoxController::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==CLICKED)
+                       {
+                               _model->setState(SELECTED);
+                               _model->setChanged();
+                       }
+
+                       if( !_model->hasChanged() && state == DRAG)
+                       {
+                               _model->setState(SELECTED);
+                               _model->setChanged();
+                       }
+
+                       _model->notifyObservers();
+
+               }
+               return true;
+       }
+       
+       //=========================================================================
+       
+       bool GBlackBoxController::OnLeftDClick()
+       {
+               if ( _vtkInteractorStyleBaseView!=NULL )
+               {
+                       int X,Y;
+                       wxVTKRenderWindowInteractor *wxVTKiren;
+                       wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk3DBaseView()->GetWxVTKRenderWindowInteractor();
+                       wxVTKiren->GetEventPosition(X,Y);
+
+                       _model->notifyObservers();
+               }
+               return true;
+       }
+       
+       //=========================================================================
+       
+       bool GBlackBoxController::OnRightButtonDown()
+       {
+               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 == SELECTED)
+                       {
+                               _model->setState(NOTHING_HAPPENS);
+                               _model->setChanged();                   
+                       }
+
+                       _model->notifyObservers();
+               }
+               return true;
+}
 
        //=========================================================================
 
index a908f1009a57e1d3afef504a59008fa0513576d4..b6baee4803b35f4c9499e85dd7269ae376263b02 100644 (file)
@@ -66,7 +66,11 @@ namespace bbtk
                ~GBlackBoxController();
                
                //Public methods
-
+               virtual bool  OnMouseMove();
+               virtual bool  OnLeftButtonDown(); 
+               virtual bool  OnLeftButtonUp();
+               virtual bool  OnLeftDClick();
+               virtual bool  OnRightButtonDown();
 
        private:
 
index 37b5de2d4ddf64067a6ed54e61cfe219614723e3..6b1174ff43faa6425f71f49d1a29e053ceaa1fbc 100644 (file)
@@ -62,6 +62,8 @@ namespace bbtk
 bool GObjectController::OnMouseMove()
 {
        
+       /**********************   VIRTUAL *************************/
+
        if ( _vtkInteractorStyleBaseView!=NULL)
        {
                int X,Y;
@@ -97,11 +99,15 @@ bool GObjectController::OnMouseMove()
                
                _model->notifyObservers();
        }
+
+       /**/
+
        return true;
 }
 //=========================================================================
 bool GObjectController::OnLeftButtonDown()
 {
+       /**********************   VIRTUAL *************************
        
        if ( _vtkInteractorStyleBaseView!=NULL )
        {
@@ -115,7 +121,7 @@ bool GObjectController::OnLeftButtonDown()
                //Evaluate new state
                if(!_model->hasChanged() && state==HIGHLIGHTED)
                {
-                       _view->isFirstDragging(true);
+                       _view->isStartDragging(true);
                        _model->setState(DRAG);
                        _model->setChanged();
                }
@@ -124,7 +130,7 @@ bool GObjectController::OnLeftButtonDown()
                {
                        if(_view->isPointInside(X,Y))
                        {
-                               _view->isFirstDragging(true);
+                               _view->isStartDragging(true);
                                _model->setState(DRAG);
                                _model->setChanged();
                        }       
@@ -132,11 +138,17 @@ bool GObjectController::OnLeftButtonDown()
                
                _model->notifyObservers();
        }
+
+       */
+
        return true;
 }
 //=========================================================================
 bool GObjectController::OnLeftButtonUp()
 {
+
+       /**********************   VIRTUAL *************************
+
        if ( _vtkInteractorStyleBaseView!=NULL )
        {
                int X,Y;
@@ -162,11 +174,15 @@ bool GObjectController::OnLeftButtonUp()
                _model->notifyObservers();
 
        }
+
+       */
        return true;
 }
 //=========================================================================
 bool GObjectController::OnLeftDClick()
 {
+       /**********************   VIRTUAL *************************
+
        if ( _vtkInteractorStyleBaseView!=NULL )
        {
                int X,Y;
@@ -176,11 +192,15 @@ bool GObjectController::OnLeftDClick()
 
                _model->notifyObservers();
        }
+
+       */
        return true;
 }
 //=========================================================================
 bool GObjectController::OnRightButtonDown()
 {
+       /**********************   VIRTUAL *************************/
+
        if( _vtkInteractorStyleBaseView!= NULL )
        {
                int X,Y;
@@ -199,7 +219,11 @@ bool GObjectController::OnRightButtonDown()
 
                _model->notifyObservers();
        }
+       
+       /**/
+
        return true;
+
 }
 
 //=========================================================================
index a354fd71da2901050ea97efc5796669c4fdee33a..e509662f64fdbdf9b64fcf135671889eeecc9ad7 100644 (file)
@@ -53,32 +53,34 @@ namespace bbtk
        //=========================================================================
        void vtkGBlackBoxView::update(int command)
        {
+               _objectActor->GetProperty()->SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
+
                if(_model->getState()==NOTHING_HAPPENS)
                {
                        _objectActor->GetProperty()->SetLineWidth(1);
                        _objectActor->GetProperty()->SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
-                       _nameActor->GetProperty()->SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
+                       //_nameActor->GetProperty()->SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
                        _typeActor->GetProperty()->SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
                }
                else if(_model->getState()==HIGHLIGHTED)
                {
                        _objectActor->GetProperty()->SetLineWidth(2);
                        _objectActor->GetProperty()->SetColor(BOXCONTOUR_HIGHLIGHTED_R,BOXCONTOUR_HIGHLIGHTED_G,BOXCONTOUR_HIGHLIGHTED_B);
-                       _nameActor->GetProperty()->SetColor(BOXCONTOUR_HIGHLIGHTED_R,BOXCONTOUR_HIGHLIGHTED_G,BOXCONTOUR_HIGHLIGHTED_B);
+                       //_nameActor->GetProperty()->SetColor(BOXCONTOUR_HIGHLIGHTED_R,BOXCONTOUR_HIGHLIGHTED_G,BOXCONTOUR_HIGHLIGHTED_B);
                        _typeActor->GetProperty()->SetColor(BOXCONTOUR_HIGHLIGHTED_R,BOXCONTOUR_HIGHLIGHTED_G,BOXCONTOUR_HIGHLIGHTED_B);
                }
                else if(_model->getState()==DRAG)
                {
                        _objectActor->GetProperty()->SetLineWidth(1.2);
                        _objectActor->GetProperty()->SetColor(BOXCONTOUR_DRAG_R,BOXCONTOUR_DRAG_G,BOXCONTOUR_DRAG_B);
-                       _nameActor->GetProperty()->SetColor(BOXCONTOUR_DRAG_R,BOXCONTOUR_DRAG_G,BOXCONTOUR_DRAG_B);
+                       //_nameActor->GetProperty()->SetColor(BOXCONTOUR_DRAG_R,BOXCONTOUR_DRAG_G,BOXCONTOUR_DRAG_B);
                        _typeActor->GetProperty()->SetColor(BOXCONTOUR_DRAG_R,BOXCONTOUR_DRAG_G,BOXCONTOUR_DRAG_B);
                }
                else if(_model->getState()==SELECTED)
                {
                        _objectActor->GetProperty()->SetLineWidth(2);
                        _objectActor->GetProperty()->SetColor(BOXCONTOUR_SELECTED_R,BOXCONTOUR_SELECTED_G,BOXCONTOUR_SELECTED_B);
-                       _nameActor->GetProperty()->SetColor(BOXCONTOUR_SELECTED_R,BOXCONTOUR_SELECTED_G,BOXCONTOUR_SELECTED_B);
+                       //_nameActor->GetProperty()->SetColor(BOXCONTOUR_SELECTED_R,BOXCONTOUR_SELECTED_G,BOXCONTOUR_SELECTED_B);
                        _typeActor->GetProperty()->SetColor(BOXCONTOUR_SELECTED_R,BOXCONTOUR_SELECTED_G,BOXCONTOUR_SELECTED_B);
                }
 
@@ -99,7 +101,8 @@ namespace bbtk
 
                //-----------
 
-               _baseView->GetRenWin()->Render();
+               _baseView->RefreshView();
+               _baseView->Refresh();
        }
 
        //=========================================================================
@@ -144,6 +147,7 @@ namespace bbtk
 
                //------------
 
+               /*
                _vectorNameText = vtkVectorText::New();
                std::string temp = _model->getBBTKName();
                _vectorNameText->SetText(temp.c_str());
@@ -152,6 +156,12 @@ namespace bbtk
                txtMapper->SetInputConnection( _vectorNameText->GetOutputPort());
                _nameActor = vtkActor::New();
                _nameActor->SetMapper(txtMapper);
+               */
+
+               _vectorNameText = vtkTextActor3D::New();
+               std::string temp = _model->getBBTKName();
+               _vectorNameText->SetInput( temp.c_str()  );
+
 
                //------------
 
@@ -159,7 +169,7 @@ namespace bbtk
                temp = _model->getBBTKType();
                _vectorTypeText->SetText(temp.c_str());
 
-               txtMapper = vtkPolyDataMapper::New();
+               vtkPolyDataMapper* txtMapper = vtkPolyDataMapper::New();
                txtMapper->SetInputConnection( _vectorTypeText->GetOutputPort());
                _typeActor = vtkActor::New();
                _typeActor->SetMapper(txtMapper);
@@ -168,7 +178,11 @@ namespace bbtk
 
                updatePositionTextActors( xInic,  yInic,  zInic);
 
-               _nameActor->GetProperty()->SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
+               //_nameActor->GetProperty()->SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
+               _vectorNameText->GetTextProperty()->SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
+               _vectorNameText->GetTextProperty()->SetFontSize(75);//SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
+               _vectorNameText->GetTextProperty()->BoldOn();
+               _vectorNameText->SetScale(0.05,0.05,1);
                _typeActor->GetProperty()->SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
 
        }
@@ -177,7 +191,10 @@ namespace bbtk
 
        void vtkGBlackBoxView::addVtkActors()//virtual
        {
-               _baseView->GetRenderer()->AddActor(_nameActor);
+               //_baseView->GetRenderer()->AddActor(_nameActor);
+
+               _baseView->GetRenderer()->AddActor(_vectorNameText);
+
                _baseView->GetRenderer()->AddActor(_typeActor);
 
                vtkGObjectView::addVtkActors();
@@ -187,13 +204,15 @@ namespace bbtk
 
        void vtkGBlackBoxView::updatePositionTextActors(double xInic, double yInic, double zInic)
        {
-               _nameActor->SetPosition(xInic+4,yInic-5,zInic);
-               _nameActor->SetScale(3,2,1);
+               //_nameActor->SetPosition(xInic+4,yInic-5,zInic);
+               //_nameActor->SetScale(2,2,1);
+               _vectorNameText->SetPosition(xInic+4,yInic-5,zInic);
                                        
                _typeActor->SetPosition(xInic+4,yInic-10,zInic);
-               _typeActor->SetScale(3,2,1);
+               _typeActor->SetScale(2,2,1);
        }
 
+       //=========================================================================
 
 }  // EO namespace bbtk
 
index 2d5ce85352a3aacde2a9fb14f2353bf4e2290150..8114f51809a33761b1f9b3ae7a3f7252261a15d0 100644 (file)
@@ -57,6 +57,9 @@ Version:   $Revision$
 #include "vtkRenderer.h"
 #include "vtkCellArray.h"
 
+#include "vtkTextActor3D.h"
+#include "vtkTextProperty.h"
+
 
 //Includes std
 #include <iostream>
@@ -82,7 +85,10 @@ namespace bbtk
                vtkPoints *_pts;
                vtkActor* _nameActor;
                vtkActor* _typeActor;
-               vtkVectorText* _vectorNameText;
+
+               //vtkVectorText* _vectorNameText;
+               vtkTextActor3D* _vectorNameText;
+
                vtkVectorText* _vectorTypeText;
 
                //Private Methods
index 98cfc8584b1204378b2aa597ad1ce28a583bf03e..51761e7210662c5b37bc56f32012ab1f7144da4f 100644 (file)
@@ -45,7 +45,7 @@ namespace bbtk
        {
                _baseView=NULL;
                _objectActor=NULL;
-               _isFirstDragging=false;
+               _isStartDragging=false;
        }
 
        //=========================================================================
@@ -116,9 +116,9 @@ namespace bbtk
 
                
 
-               if(_isFirstDragging)
+               if(_isStartDragging)
                {
-                       _isFirstDragging=false;
+                       _isStartDragging=false;
                        
                        double xInic,yInic,zInic;
                        _model->getInicPoint(xInic,yInic,zInic);                        
@@ -132,9 +132,9 @@ namespace bbtk
 
        //=========================================================================
 
-       void vtkGObjectView::isFirstDragging(bool param)
+       void vtkGObjectView::isStartDragging(bool param)
        {
-               _isFirstDragging=param;
+               _isStartDragging=param;
                dragDifX=0;
                dragDifX=0;
        }
index 97ea5776d8723b60b4dad933af053dee161601af..e15232f4bf16368250bd8bfc4af2361eef00a51f 100644 (file)
@@ -83,12 +83,12 @@ namespace bbtk
                virtual void moveObject(int X, int Y);
 
                virtual void update(int command);
-               void isFirstDragging(bool param);
+               void isStartDragging(bool param);
 
        private:
 
                //Private Attributes
-               bool _isFirstDragging;
+               bool _isStartDragging;
                double dragDifX;
                double dragDifY;
 
index d6bef81568860aae7bc07f4d537605b32eec53f7..adbe0caac36e9cfe2402ab37c80c1b18d7a8cbf3 100644 (file)
@@ -53,6 +53,7 @@ namespace bbtk
        //=========================================================================
        void vtkGPortView::update(int command)
        {
+               _objectActor->GetProperty()->SetColor(0.8,0.2,0.5);
                if(_model->getState()==HIGHLIGHTED)
                {
                        _objectActor->GetProperty()->SetColor(0.8,0.2,0.5);
@@ -74,8 +75,8 @@ namespace bbtk
                _pts->SetPoint(2, xFin, yFin, zFin );
                _pts->SetPoint(3, xFin, yInic, zFin );
 
-               _baseView->GetRenderer()->Render();
-               _baseView->GetRenWin()->Render();
+               //_baseView->GetRenderer()->Render();
+               //_baseView->GetRenWin()->Render();
 
        }
 
index 6049911d6ddceab8ccc1aed7075a6a4559b16a0d..34a854210315b1fc3411494e1859cc826d92b5b2 100644 (file)
@@ -262,7 +262,6 @@ namespace bbtk
                switch (event.GetId())
                {
                case wxID_NEW :
-                       std::cout<<"RaC New"<<std::endl;
                        _tabsMgr->addNewTab();
                        break;                  
                }