]> Creatis software - bbtkGEditor.git/commitdiff
The actual version updates the status bar with the highlighted object ... Also it...
authorcorredor <>
Mon, 26 Apr 2010 09:39:58 +0000 (09:39 +0000)
committercorredor <>
Mon, 26 Apr 2010 09:39:58 +0000 (09:39 +0000)
23 files changed:
lib/EditorGraphicBBS/bbsKernelEditorGraphic/GBlackBoxModel.cxx
lib/EditorGraphicBBS/bbsKernelEditorGraphic/GBlackBoxModel.h
lib/EditorGraphicBBS/bbsKernelEditorGraphic/GObjectModel.cxx
lib/EditorGraphicBBS/bbsKernelEditorGraphic/GObjectModel.h
lib/EditorGraphicBBS/bbsKernelEditorGraphic/GPortModel.cxx
lib/EditorGraphicBBS/bbsKernelEditorGraphic/GPortModel.h
lib/EditorGraphicBBS/bbsKernelEditorGraphic/GlobalConstants.h
lib/EditorGraphicBBS/bbsKernelEditorGraphic/wxVtkSceneManager.cxx
lib/EditorGraphicBBS/bbsKernelEditorGraphic/wxVtkSceneManager.h
lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GObjectController.cxx
lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic/GObjectController.h
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/bbsVtkGUIEditorGraphic/vtkGPortView.h
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.h
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.h

index 672a4bd..e58e73a 100644 (file)
@@ -124,7 +124,17 @@ namespace bbtk
        }
 
        //=========================================================================
+       
+       std::string GBlackBoxModel::getStatusText()
+       {
+               std::string temp = "";
+               temp+=_bbtkType;
+               temp+=":";
+               temp+=_bbtkPackage;
+               return temp;
+       }
 
+       //=========================================================================
 
 
 }  // EO namespace bbtk
index 5da5e84..209af97 100644 (file)
@@ -80,6 +80,8 @@ namespace bbtk
                std::string getBBTKPackage();
                void setBBTKPackage(std::string obpackage);
 
+               virtual std::string getStatusText();
+
        private:
 
                //Private Attributes
index b33bb80..46e77d4 100644 (file)
@@ -168,6 +168,14 @@ namespace bbtk
 
        //=========================================================================
 
+       std::string GObjectModel::getStatusText()//virtual
+       {
+               std::string virt = "";
+               return virt;
+       }
+
+       //=========================================================================
+
 
 }  // EO namespace bbtk
 
index 5c3deea..d1d3ce2 100644 (file)
@@ -88,6 +88,8 @@ namespace bbtk
                
                std::string getBBTKName();
                void setBBTKName(std::string obname);
+
+               virtual std::string getStatusText();
                
        private:
 
index 227b313..acef109 100644 (file)
@@ -92,7 +92,6 @@ namespace bbtk
 
                setFinalPoint(posX,posY,posZ);          
                
-               //notifyObservers();
        }
 
        //=========================================================================
@@ -102,6 +101,31 @@ namespace bbtk
                return _portType;
        }
 
+       //=========================================================================
+       
+       std::string GPortModel::getStatusText()
+       {
+               std::string temp = "Name:";
+               
+               temp+=_bbtkName;
+               temp+=" Type:";
+               temp+=_bbtkType;
+               temp+=" Box:";
+               temp+=_parentBox->getBBTKType();                
+               if(_portType==GOUTPUTPORT)
+               {
+                       temp+=" [Output Port]";
+               }
+               else if(_portType==GINPUTPORT)
+               {
+                       temp+=" [Input Port]";
+               }
+
+               return temp;
+       }
+
+       //=========================================================================
+
 }  // EO namespace bbtk
 
 // EOF
index 9f731cc..c18e225 100644 (file)
@@ -72,6 +72,7 @@ namespace bbtk
                void registerInBox(GBlackBoxModel *blackBox,int portType, int pos);
                void updatePortPosition();
                int getPortType();
+               virtual std::string getStatusText();
 
        private:
 
index 2e6605b..eafadc4 100644 (file)
@@ -70,27 +70,65 @@ namespace bbtk
        const int FIN_CREATION_CONTOUR= 203;
        const int ADD_TO_SELECTED = 204;
        const int DRAG_OBJECTS = 205;
+       
+       
+       //// COLORS (object_state_(R|G|B))
+
+       //Box Border colors
+
+       const double BOXBORDER_NH_R=0.5;
+       const double BOXBORDER_NH_G=0.25;
+       const double BOXBORDER_NH_B=0.0;
+
+       const double BOXBORDER_HIGHLIGHTED_R=0.05;
+       const double BOXBORDER_HIGHLIGHTED_G=0.25;
+       const double BOXBORDER_HIGHLIGHTED_B=0.45;
+
+       const double BOXBORDER_DRAG_R=0.75;
+       const double BOXBORDER_DRAG_G=0.75;
+       const double BOXBORDER_DRAG_B=0.75;
+       
+       const double BOXBORDER_SELECTED_R=0.45;
+       const double BOXBORDER_SELECTED_G=0.45;
+       const double BOXBORDER_SELECTED_B=0.00;
+
 
-       // World states
-       //const int NOTHING_HAPPENS = 101;
+       //Box Fill colors
 
+       const double BOXFILL_NH_R=0.5;
+       const double BOXFILL_NH_G=0.35;
+       const double BOXFILL_NH_B=0.15;
+
+       const double BOXFILL_HIGHLIGHTED_R=0.05;
+       const double BOXFILL_HIGHLIGHTED_G=0.45;
+       const double BOXFILL_HIGHLIGHTED_B=0.65;
+
+       const double BOXFILL_DRAG_R=0.75;
+       const double BOXFILL_DRAG_G=0.75;
+       const double BOXFILL_DRAG_B=0.75;
        
-       // Colors (object_state_(R|G|B))
-       const double BOXCONTOUR_NH_R=0.0;
-       const double BOXCONTOUR_NH_G=0.0;
-       const double BOXCONTOUR_NH_B=0.0;
-
-       const double BOXCONTOUR_HIGHLIGHTED_R=0.05;
-       const double BOXCONTOUR_HIGHLIGHTED_G=0.35;
-       const double BOXCONTOUR_HIGHLIGHTED_B=0.55;
-
-       const double BOXCONTOUR_DRAG_R=0.75;
-       const double BOXCONTOUR_DRAG_G=0.75;
-       const double BOXCONTOUR_DRAG_B=0.75;
-
-       const double BOXCONTOUR_SELECTED_R=0.65;
-       const double BOXCONTOUR_SELECTED_G=0.65;
-       const double BOXCONTOUR_SELECTED_B=0.05;
+       const double BOXFILL_SELECTED_R=0.65;
+       const double BOXFILL_SELECTED_G=0.65;
+       const double BOXFILL_SELECTED_B=0.05;
+
+
+       //Box Text colors
+
+       const double BOXTEXT_NH_R=0.25;
+       const double BOXTEXT_NH_G=0.0;
+       const double BOXTEXT_NH_B=0.0;
+
+       const double BOXTEXT_HIGHLIGHTED_R=0.05;
+       const double BOXTEXT_HIGHLIGHTED_G=0.05;
+       const double BOXTEXT_HIGHLIGHTED_B=0.4;
+
+       const double BOXTEXT_DRAG_R=0.75;
+       const double BOXTEXT_DRAG_G=0.75;
+       const double BOXTEXT_DRAG_B=0.75;
+
+       const double BOXTEXT_SELECTED_R=0.35;
+       const double BOXTEXT_SELECTED_G=0.35;
+       const double BOXTEXT_SELECTED_B=0.05;
 
        // Id's
 }
index 78ece89..f1f1fed 100644 (file)
@@ -98,7 +98,7 @@ namespace bbtk
 
        //=========================================================================
 
-       void wxVtkSceneManager::createGBlackBox(int x, int y, std::string packageName, std::string boxName)
+       void wxVtkSceneManager::createGBlackBox(int x, int y, std::string packageName, std::string boxType)
        {
 
                int windowWidth=_baseView->GetRenWin()->GetSize()[0];
@@ -112,7 +112,7 @@ namespace bbtk
                vtkGObjectView *view = GObjectsMVCFactory::getInstance()->createGObjectView(type);
                GObjectController* controller = GObjectsMVCFactory::getInstance()->createGObjectController(type);
                
-               BlackBoxDescriptor::Pointer descriptor = GObjectsMVCFactory::getInstance()->getBlackBoxDescriptor(packageName, boxName);
+               BlackBoxDescriptor::Pointer descriptor = GObjectsMVCFactory::getInstance()->getBlackBoxDescriptor(packageName, boxType);
                
                //Prepares the initial model
                //The coordinates obtained are the following. Top-Left:x=0,y=0 Bottom-Right:x=width,y=height  
@@ -140,7 +140,7 @@ namespace bbtk
                std::string arraystring = stream.str();
 
                model->setBBTKName(arraystring);
-               model->setBBTKType(boxName);
+               model->setBBTKType(boxType);
                model->setBBTKPackage(packageName);
                                
                model->addObserver(view);
@@ -197,19 +197,19 @@ namespace bbtk
 
        void wxVtkSceneManager::createGInputPort(int portType, int posinBox,GBlackBoxModel *blackBox, BlackBoxInputDescriptor *desc)
        {
-               createGPort(portType,posinBox,blackBox);
+               createGPort(portType,desc->GetName(),desc->GetTypeName(),posinBox,blackBox);
        }
 
        //=========================================================================
 
        void wxVtkSceneManager::createGOutputPort(int portType, int posinBox,GBlackBoxModel *blackBox, BlackBoxOutputDescriptor *desc)
        {
-               createGPort(portType,posinBox,blackBox);
+               createGPort(portType,desc->GetName(),desc->GetTypeName(),posinBox,blackBox);
        }
 
        //=========================================================================
 
-       void wxVtkSceneManager::createGPort(int portType, int posInBox,GBlackBoxModel *blackBox)
+       void wxVtkSceneManager::createGPort(int portType,std::string bbtkName, std::string bbtkType, int posInBox,GBlackBoxModel *blackBox)
        {
                int type = GPORT;
 
@@ -221,6 +221,9 @@ namespace bbtk
                model->registerInBox(blackBox,portType, posInBox);
                blackBox->addOutputPort(model);
                
+               model->setBBTKType(bbtkType);
+               model->setBBTKName(bbtkName);
+
                model->addObserver(view);
                model->addObserver(this);
 
@@ -333,65 +336,7 @@ namespace bbtk
        }
        //=========================================================================
 
-       bool wxVtkSceneManager::OnMouseMove()
-       {
-               int X,Y;
-               wxVTKRenderWindowInteractor *wxVTKiren;
-               wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk3DBaseView()->GetWxVTKRenderWindowInteractor();
-               wxVTKiren->GetEventPosition(X,Y);
-       
                
-               if(_worldState == DRAG_OBJECTS)
-               {                       
-                       for (int i=0; i<_selectedObjects.size(); i++)
-                       {
-                               int id = _selectedObjects[i];
-                               GObjectController* cont = _controllers[id];
-                               if(_startDragging)
-                               {
-                                       cont->getView()->setStartDragging(true);
-                               }
-                               cont->getView()->moveObject(X,Y);
-                               cont->getView()->setState(DRAG);
-                               cont->getModel()->notifyObservers(_idManager);
-                       }
-
-                       std::map<int, GObjectController*>::iterator it;
-
-                       for(it = _controllers.begin(); it != _controllers.end(); ++it)
-                       {
-                               GObjectController *desc = it->second;
-                               if(desc->getGObjectType()==GCONNECTOR)
-                               {
-                                       GConnectorView* vconn = (GConnectorView*)desc->getView();
-                                       vconn->updateStartEndPoints();
-                               }
-                       }
-                       
-                       _startDragging=false;
-
-               }
-               else if(_worldState == NOTHING_HAPPENS)
-               {
-                       std::map<int, GObjectController*>::iterator it;
-
-                       for(it = _controllers.begin(); it != _controllers.end(); ++it)
-                       {
-                               GObjectController *desc = it->second;
-                               if(desc->getGObjectType()==GBLACKBOX && desc->getView()->getState() == HIGHLIGHTED)
-                               {
-                                       GBlackBoxModel *mod = (GBlackBoxModel*)desc->getModel();
-                                       _parent->displayBlackBoxInfo(mod->getBBTKPackage(),mod->getBBTKType());
-                               }
-                       }
-               }
-
-
-               return true;
-       }
-
-       //=========================================================================
-       
        void wxVtkSceneManager::update(int idController,int command)
        {
                if(command != NO_COMMAND)
@@ -488,6 +433,73 @@ namespace bbtk
 
        //=========================================================================
 
+       bool wxVtkSceneManager::OnMouseMove()
+       {
+               int X,Y;
+               wxVTKRenderWindowInteractor *wxVTKiren;
+               wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk3DBaseView()->GetWxVTKRenderWindowInteractor();
+               wxVTKiren->GetEventPosition(X,Y);
+       
+               
+               if(_worldState == DRAG_OBJECTS)
+               {                       
+                       for (int i=0; i<_selectedObjects.size(); i++)
+                       {
+                               int id = _selectedObjects[i];
+                               GObjectController* cont = _controllers[id];
+                               if(_startDragging)
+                               {
+                                       cont->getView()->setStartDragging(true);
+                               }
+                               cont->getView()->moveObject(X,Y);
+                               cont->getView()->setState(DRAG);
+                               cont->getModel()->notifyObservers(_idManager);
+                       }
+
+                       std::map<int, GObjectController*>::iterator it;
+
+                       for(it = _controllers.begin(); it != _controllers.end(); ++it)
+                       {
+                               GObjectController *desc = it->second;
+                               if(desc->getGObjectType()==GCONNECTOR)
+                               {
+                                       GConnectorView* vconn = (GConnectorView*)desc->getView();
+                                       vconn->updateStartEndPoints();
+                               }
+                       }
+                       
+                       _startDragging=false;
+
+               }
+               else if(_worldState == NOTHING_HAPPENS || _worldState == INIT_CREATION_CONTOUR)
+               {
+                       std::map<int, GObjectController*>::iterator it;
+
+                       for(it = _controllers.begin(); it != _controllers.end(); ++it)
+                       {
+                               GObjectController *desc = it->second;
+                               int type = desc->getGObjectType();
+                               int state = desc->getView()->getState();
+                               
+                               if(state == HIGHLIGHTED){
+
+                                       updateStatusBar(desc->getStatusText());
+                                       if(type==GBLACKBOX)
+                                       {
+                                               GBlackBoxModel *mod = (GBlackBoxModel*)desc->getModel();
+                                               _parent->displayBlackBoxInfo(mod->getBBTKPackage(),mod->getBBTKType());
+                                       }
+                               }
+                       }
+               }
+               
+               
+
+
+               return true;
+       }
+
+       //=========================================================================
        
        bool wxVtkSceneManager::OnLeftButtonDown()
        {
@@ -555,6 +567,15 @@ namespace bbtk
                _parent->displayBlackBoxInfo(packageName,boxName);
        }
 
+       //=========================================================================
+
+       void wxVtkSceneManager::updateStatusBar(std::string textStatus)
+       {
+               _parent->updateStatusBar(textStatus);
+       }
+
+       //=========================================================================
+
 }  // EO namespace bbtk
 
 // EOF
index c6f7a6b..5f1fcc5 100644 (file)
@@ -89,8 +89,8 @@ namespace bbtk
                ~wxVtkSceneManager();
 
                void configureBaseView();
-               void createGBlackBox(int x, int y,std::string packageName, std::string boxName);
-               void createGPort(int portType, int posinBox,GBlackBoxModel *blackBox);
+               void createGBlackBox(int x, int y,std::string packageName, std::string boxType);
+               void createGPort(int portType, std::string bbtkName, std::string bbtkType, int posinBox,GBlackBoxModel *blackBox);
                void createGInputPort(int portType, int posinBox,GBlackBoxModel *blackBox, BlackBoxInputDescriptor *desc);
                void createGOutputPort(int portType, int posinBox,GBlackBoxModel *blackBox, BlackBoxOutputDescriptor *desc);
                void createGConnector(GPortModel* startPort);
@@ -110,6 +110,7 @@ namespace bbtk
                virtual void update(int idController,int command);
 
                void displayBlackBoxInfo(std::string packageName, std::string boxName);
+               void updateStatusBar(std::string textStatus);
                
        private:
 
index 689d3be..7926e68 100644 (file)
@@ -168,6 +168,13 @@ namespace bbtk
 
        //=========================================================================
 
+       std::string GObjectController::getStatusText()
+       {
+               return _model->getStatusText();
+       }
+
+       //=========================================================================
+
 }  // EO namespace bbtk
 
 // EOF
index 664ad9a..6c5fe8d 100644 (file)
@@ -72,6 +72,7 @@ namespace bbtk
                int getGObjectType();
                GObjectModel* getModel();
                vtkGObjectView* getView();
+               std::string getStatusText();
 
                int getId();
                void setId(int id);
@@ -100,6 +101,8 @@ namespace bbtk
 
                virtual void moveObject(int X,int Y);
 
+
+
        };
 
 
index 6457cf4..70aed5f 100644 (file)
@@ -67,13 +67,8 @@ namespace bbtk
                _pts->SetPoint(3, xFin, yInic, zFin );
 
 
-               _ptsFill->SetPoint(0, xInic, yInic, zInic-0.01 );
-               _ptsFill->SetPoint(1, xInic, yFin, zInic-0.01 );
-               _ptsFill->SetPoint(2, xFin, yFin, zFin-0.01 );
-               _ptsFill->SetPoint(3, xFin, yInic, zFin-0.01 );
-
-
-               bboxMapperFill->Modified();
+               _borderPolyMapper->Modified();
+               _fillPolyMapper->Modified();
                //-----------
 
                updatePositionTextActors(xInic, yInic,zInic);
@@ -91,8 +86,8 @@ namespace bbtk
                _pts = vtkPoints::New();        
                vtkCellArray *lines = vtkCellArray::New();
                vtkPolyData *_pd = vtkPolyData::New();
-               vtkPolyDataMapper* _bboxMapper=vtkPolyDataMapper::New();
-               _objectBorderActor=vtkActor::New();
+               _borderPolyMapper=vtkPolyDataMapper::New();
+               _borderObjectActor=vtkActor::New();
                                
                _pts->SetNumberOfPoints(4);
 
@@ -117,29 +112,20 @@ namespace bbtk
                _pd->SetPoints( _pts );
                _pd->SetLines( lines );
 
-               _bboxMapper->SetInput(_pd);
-               _objectBorderActor->SetMapper(_bboxMapper);
-
-               _objectBorderActor->GetProperty()->SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
+               _borderPolyMapper->SetInput(_pd);
+               _borderObjectActor->SetMapper(_borderPolyMapper);
+               _borderPolyMapper->Modified();
 
                
                ///************************* FILL *************************
 
-               _ptsFill = vtkPoints::New();
                vtkCellArray *strip = vtkCellArray::New();
                vtkPolyData *pdFill = vtkPolyData::New();
-               bboxMapperFill=vtkPolyDataMapper::New();
-               _fillBorderActor=vtkActor::New();
-
-               _ptsFill->SetNumberOfPoints(4);
+               _fillPolyMapper=vtkPolyDataMapper::New();
+               _fillObjectActor=vtkActor::New();
 
                // RaC In the actual version, zInic=zFin=900
 
-               _ptsFill->SetPoint(0, xInic, yInic, zInic-0.01 );
-               _ptsFill->SetPoint(1, xInic, yFin, zInic-0.01 );
-               _ptsFill->SetPoint(2, xFin, yFin, zFin-0.01 );
-               _ptsFill->SetPoint(3, xFin, yInic, zFin-0.01 );
-
                strip->InsertNextCell(5);
                strip->InsertCellPoint(0);
                strip->InsertCellPoint(1);
@@ -147,13 +133,12 @@ namespace bbtk
                strip->InsertCellPoint(0);
                strip->InsertCellPoint(3);
                        
-               pdFill->SetPoints( _ptsFill );
+               pdFill->SetPoints( _pts );
                pdFill->SetStrips( strip );
 
-               bboxMapperFill->SetInput(pdFill);
-               _fillBorderActor->SetMapper(bboxMapperFill);
-               bboxMapperFill->Modified();
-               
+               _fillPolyMapper->SetInput(pdFill);
+               _fillObjectActor->SetMapper(_fillPolyMapper);
+               _fillPolyMapper->Modified();
 
                ///************************* FILL *************************
 
@@ -183,9 +168,7 @@ namespace bbtk
        void vtkGBlackBoxView::addVtkActors()//virtual
        {
                _baseView->GetRenderer()->AddActor(_nameActor);
-
                _baseView->GetRenderer()->AddActor(_typeActor);
-
                vtkGObjectView::addVtkActors();
        }
 
@@ -204,42 +187,40 @@ namespace bbtk
 
        void vtkGBlackBoxView::updateColors()
        {
-               _objectBorderActor->GetProperty()->SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
-               _nameActor->GetTextProperty()->SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
-               _typeActor->GetTextProperty()->SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
-               _fillBorderActor->GetProperty()->SetColor(0.2,0.8,0.2);
+               _fillObjectActor->GetProperty()->SetAmbient(0.6);
 
                if(_state==NOTHING_HAPPENS)
                {
-                       _objectBorderActor->GetProperty()->SetLineWidth(1);
-                       _objectBorderActor->GetProperty()->SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
-                       _nameActor->GetTextProperty()->SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
-                       _typeActor->GetTextProperty()->SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
-                       _fillBorderActor->GetProperty()->SetColor(0.2,0.8,0.2);
+                       _borderObjectActor->GetProperty()->SetLineWidth(1);
+                       _borderObjectActor->GetProperty()->SetColor(BOXBORDER_NH_R,BOXBORDER_NH_G,BOXBORDER_NH_B);
+                       _fillObjectActor->GetProperty()->SetColor(BOXFILL_NH_R,BOXFILL_NH_G,BOXFILL_NH_B);
+                       _nameActor->GetTextProperty()->SetColor(BOXTEXT_NH_R,BOXTEXT_NH_G,BOXTEXT_NH_B);
+                       _typeActor->GetTextProperty()->SetColor(BOXTEXT_NH_R,BOXTEXT_NH_G,BOXTEXT_NH_B);
+                       
                }
                else if(_state==HIGHLIGHTED)
                {
-                       _objectBorderActor->GetProperty()->SetLineWidth(2);
-                       _objectBorderActor->GetProperty()->SetColor(BOXCONTOUR_HIGHLIGHTED_R,BOXCONTOUR_HIGHLIGHTED_G,BOXCONTOUR_HIGHLIGHTED_B);
-                       _nameActor->GetTextProperty()->SetColor(BOXCONTOUR_HIGHLIGHTED_R,BOXCONTOUR_HIGHLIGHTED_G,BOXCONTOUR_HIGHLIGHTED_B);
-                       _typeActor->GetTextProperty()->SetColor(BOXCONTOUR_HIGHLIGHTED_R,BOXCONTOUR_HIGHLIGHTED_G,BOXCONTOUR_HIGHLIGHTED_B);
-                       _fillBorderActor->GetProperty()->SetColor(BOXCONTOUR_HIGHLIGHTED_R+.1,BOXCONTOUR_HIGHLIGHTED_G+.1,BOXCONTOUR_HIGHLIGHTED_B+.1);
+                       _borderObjectActor->GetProperty()->SetLineWidth(2);
+                       _borderObjectActor->GetProperty()->SetColor(BOXBORDER_HIGHLIGHTED_R,BOXBORDER_HIGHLIGHTED_G,BOXBORDER_HIGHLIGHTED_B);
+                       _fillObjectActor->GetProperty()->SetColor(BOXFILL_HIGHLIGHTED_R,BOXFILL_HIGHLIGHTED_G,BOXFILL_HIGHLIGHTED_B);
+                       _nameActor->GetTextProperty()->SetColor(BOXTEXT_HIGHLIGHTED_R,BOXTEXT_HIGHLIGHTED_G,BOXTEXT_HIGHLIGHTED_B);
+                       _typeActor->GetTextProperty()->SetColor(BOXTEXT_HIGHLIGHTED_R,BOXTEXT_HIGHLIGHTED_G,BOXTEXT_HIGHLIGHTED_B);
                }
                else if(_state==DRAG)
                {
-                       _objectBorderActor->GetProperty()->SetLineWidth(1.2);
-                       _objectBorderActor->GetProperty()->SetColor(BOXCONTOUR_DRAG_R,BOXCONTOUR_DRAG_G,BOXCONTOUR_DRAG_B);
-                       _nameActor->GetTextProperty()->SetColor(BOXCONTOUR_DRAG_R,BOXCONTOUR_DRAG_G,BOXCONTOUR_DRAG_B);
-                       _typeActor->GetTextProperty()->SetColor(BOXCONTOUR_DRAG_R,BOXCONTOUR_DRAG_G,BOXCONTOUR_DRAG_B);
-                       _fillBorderActor->GetProperty()->SetColor(BOXCONTOUR_DRAG_R,BOXCONTOUR_DRAG_G,BOXCONTOUR_DRAG_B);
+                       _borderObjectActor->GetProperty()->SetLineWidth(1.2);
+                       _borderObjectActor->GetProperty()->SetColor(BOXBORDER_DRAG_R,BOXBORDER_DRAG_G,BOXBORDER_DRAG_B);
+                       _fillObjectActor->GetProperty()->SetColor(BOXFILL_DRAG_R,BOXFILL_DRAG_G,BOXFILL_DRAG_B);
+                       _nameActor->GetTextProperty()->SetColor(BOXTEXT_DRAG_R,BOXTEXT_DRAG_G,BOXTEXT_DRAG_B);
+                       _typeActor->GetTextProperty()->SetColor(BOXTEXT_DRAG_R,BOXTEXT_DRAG_G,BOXTEXT_DRAG_B);
                }
                else if(_state==SELECTED)
                {
-                       _objectBorderActor->GetProperty()->SetLineWidth(2);
-                       _objectBorderActor->GetProperty()->SetColor(BOXCONTOUR_SELECTED_R,BOXCONTOUR_SELECTED_G,BOXCONTOUR_SELECTED_B);
-                       _nameActor->GetTextProperty()->SetColor(BOXCONTOUR_SELECTED_R,BOXCONTOUR_SELECTED_G,BOXCONTOUR_SELECTED_B);
-                       _typeActor->GetTextProperty()->SetColor(BOXCONTOUR_SELECTED_R,BOXCONTOUR_SELECTED_G,BOXCONTOUR_SELECTED_B);
-                       _fillBorderActor->GetProperty()->SetColor(BOXCONTOUR_SELECTED_R,BOXCONTOUR_SELECTED_G,BOXCONTOUR_SELECTED_B);
+                       _borderObjectActor->GetProperty()->SetLineWidth(2);
+                       _borderObjectActor->GetProperty()->SetColor(BOXBORDER_SELECTED_R,BOXBORDER_SELECTED_G,BOXBORDER_SELECTED_B);
+                       _fillObjectActor->GetProperty()->SetColor(BOXFILL_SELECTED_R,BOXFILL_SELECTED_G,BOXFILL_SELECTED_B);
+                       _nameActor->GetTextProperty()->SetColor(BOXTEXT_SELECTED_R,BOXTEXT_SELECTED_G,BOXTEXT_SELECTED_B);
+                       _typeActor->GetTextProperty()->SetColor(BOXTEXT_SELECTED_R,BOXTEXT_SELECTED_G,BOXTEXT_SELECTED_B);
                }
        }
 
index 1850460..4650503 100644 (file)
@@ -84,9 +84,6 @@ namespace bbtk
        private:
 
                //Private Attributes
-               vtkPoints *_pts;
-               vtkPoints *_ptsFill;
-               vtkPolyDataMapper* bboxMapperFill;
                vtkTextActor3D* _nameActor;
                vtkTextActor3D* _typeActor;
 
index 1c2fd8f..7ed876b 100644 (file)
@@ -44,8 +44,8 @@ namespace bbtk
        vtkGObjectView::vtkGObjectView()
        {
                _baseView=NULL;
-               _objectBorderActor=NULL;
-               _fillBorderActor=NULL;
+               _borderObjectActor=NULL;
+               _fillObjectActor=NULL;
                _isStartDragging=false;
                
                _state = NOTHING_HAPPENS;
@@ -102,8 +102,8 @@ namespace bbtk
 
        void vtkGObjectView::addVtkActors()//virtual
        {
-               _baseView->GetRenderer()->AddActor(_objectBorderActor);
-               _baseView->GetRenderer()->AddActor(_fillBorderActor);
+               _baseView->GetRenderer()->AddActor(_borderObjectActor);
+               _baseView->GetRenderer()->AddActor(_fillObjectActor);
                _baseView->GetRenderer()->Render();
        }
 
index 3c6908a..691d2ef 100644 (file)
@@ -105,8 +105,11 @@ namespace bbtk
                //Protected Attributes
                wxVtkBaseView *_baseView;
                GObjectModel *_model;
-               vtkActor *_objectBorderActor;
-               vtkActor *_fillBorderActor;
+               vtkActor *_borderObjectActor;
+               vtkActor *_fillObjectActor;
+               vtkPolyDataMapper* _fillPolyMapper;
+               vtkPolyDataMapper* _borderPolyMapper;
+               vtkPoints *_pts;
                int  _state;
                
                //Protected Methods
index 6cf1839..a21ba84 100644 (file)
@@ -67,6 +67,8 @@ namespace bbtk
                _pts->SetPoint(0, xInic, yInic, zInic );
                _pts->SetPoint(1, mid, yFin, zInic );
                _pts->SetPoint(2, xFin, yInic, zFin );
+
+               _borderObjectActor->Modified();
                
                setRefreshWaiting();
        }
@@ -78,8 +80,8 @@ namespace bbtk
                _pts = vtkPoints::New();        
                vtkCellArray *lines = vtkCellArray::New();
                vtkPolyData *_pd = vtkPolyData::New();
-               vtkPolyDataMapper* _bboxMapper=vtkPolyDataMapper::New();
-               _objectBorderActor=vtkActor::New();
+               _borderPolyMapper=vtkPolyDataMapper::New();
+               _borderObjectActor=vtkActor::New();
                
                _pts->SetNumberOfPoints(3);
 
@@ -105,8 +107,9 @@ namespace bbtk
                _pd->SetPoints( _pts );
                _pd->SetLines( lines );
 
-               _bboxMapper->SetInput(_pd);
-               _objectBorderActor->SetMapper(_bboxMapper);
+               _borderPolyMapper->SetInput(_pd);
+               _borderObjectActor->SetMapper(_borderPolyMapper);
+               _borderObjectActor->Modified();
 
                updateColors();
 
@@ -117,15 +120,15 @@ namespace bbtk
 
        void vtkGPortView::updateColors()
        {
-               _objectBorderActor->GetProperty()->SetColor(BOXCONTOUR_NH_R,BOXCONTOUR_NH_G,BOXCONTOUR_NH_B);
+               _borderObjectActor->GetProperty()->SetColor(BOXBORDER_NH_R,BOXBORDER_NH_G,BOXBORDER_NH_B);
 
                if(_state==HIGHLIGHTED)
                {
-                       _objectBorderActor->GetProperty()->SetColor(0.8,0.2,0.5);
+                       _borderObjectActor->GetProperty()->SetColor(0.8,0.2,0.5);
                }
                else
                {
-                       _objectBorderActor->GetProperty()->SetColor(0.3,0.2,0.2);
+                       _borderObjectActor->GetProperty()->SetColor(0.3,0.2,0.2);
                }
        }
 
index b66f529..7f94560 100644 (file)
@@ -81,7 +81,7 @@ namespace bbtk
        private:
 
                //Private Attributes
-               vtkPoints *_pts;
+               
 
                //Private Methods
 
index 12708e3..bafa007 100644 (file)
@@ -276,6 +276,13 @@ namespace bbtk
 
        //=========================================================================
 
+       void wxGUIEditorGraphicBBS::updateStatusBar(std::string textStatus)
+       {
+               SetStatusText(_T(textStatus));
+       }
+
+       //=========================================================================
+
        /*****************************************************
        /* HANDLERS 
        /*****************************************************/
index 5771c39..997f4d3 100644 (file)
@@ -90,6 +90,7 @@ namespace bbtk
 
                wxAuiNotebook* getAuiNotebook();
                void displayBlackBoxInfo(std::string packageName, std::string boxName);
+               void updateStatusBar(std::string textStatus);
 
                void RegenerateAll();
                void DoRegeneratePackageDoc(const std::string& pack);   
index c2f538c..3171eb2 100644 (file)
@@ -113,6 +113,13 @@ namespace bbtk
 
        //=========================================================================
 
+       void wxGEditorTabPanel::updateStatusBar(std::string textStatus)
+       {
+               _panelsManager->updateStatusBar(textStatus);
+       }
+
+       //=========================================================================
+
 }  // EO namespace bbtk
 
 // EOF
index 39e0ab0..e3affc5 100644 (file)
@@ -80,6 +80,7 @@ namespace bbtk
                void setPanelsManager(wxTabPanelsManager* panelsManager);
 
                void displayBlackBoxInfo(std::string packageName, std::string boxName);
+               void updateStatusBar(std::string textStatus);
                
        private:
 
index 6f1ee93..c9e748d 100644 (file)
@@ -89,9 +89,13 @@ namespace bbtk
 
        //=========================================================================
 
-       /*****************************************************
-       /* HANDLERS 
-       /*****************************************************/
+       void wxTabPanelsManager::updateStatusBar(std::string textStatus)
+       {
+               _parent->updateStatusBar(textStatus);
+       }
+
+       //=========================================================================
+
 
 
 }  // EO namespace bbtk
index b987a9b..edf4ca1 100644 (file)
@@ -73,6 +73,7 @@ namespace bbtk
                wxGEditorTabPanel* getActualTabPanel();
 
                void displayBlackBoxInfo(std::string packageName, std::string boxName);
+               void updateStatusBar(std::string textStatus);
                
 
        private: