]> 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 672a4bd622018a3ddf9df4a733fe3034b08ae1e4..e58e73aebfef1f301a2fd0023bdfec9728feba0d 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 5da5e84019f3711813ea9d6095c7bd3c8c5dcda5..209af977ce1c21c20357dc2466f4a4b47f017509 100644 (file)
@@ -80,6 +80,8 @@ namespace bbtk
                std::string getBBTKPackage();
                void setBBTKPackage(std::string obpackage);
 
+               virtual std::string getStatusText();
+
        private:
 
                //Private Attributes
index b33bb80e65f94a3350c81ca0cec9b027f57f2838..46e77d4888d10e560e581121e139d7f24f11dc25 100644 (file)
@@ -168,6 +168,14 @@ namespace bbtk
 
        //=========================================================================
 
+       std::string GObjectModel::getStatusText()//virtual
+       {
+               std::string virt = "";
+               return virt;
+       }
+
+       //=========================================================================
+
 
 }  // EO namespace bbtk
 
index 5c3deea3dd6361793a1af444f758c4920d3522a5..d1d3ce25175cfe57c29b562b5b9e55f9ebf73cd4 100644 (file)
@@ -88,6 +88,8 @@ namespace bbtk
                
                std::string getBBTKName();
                void setBBTKName(std::string obname);
+
+               virtual std::string getStatusText();
                
        private:
 
index 227b31320c26224f6fbd15ef31c97fb2b7a7c87c..acef109612295c56b8a24831a0ffa5eba3c9a68c 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 9f731cc6fb3f0df17a9f34cf230ccfe27af79e78..c18e225d0b277d63a0e1cb9d479e099bf5504b48 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 2e6605b62f8f54af740049f35efe3d84ef35b020..eafadc4a5a392501c910cba66afd5537c1adb8e9 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 78ece891bb13c29bcdf5cd1ba7c2fc752074978e..f1f1fed1e047a0ab667d5f178a6c9842c147b749 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 c6f7a6b11468719bec613bf3d7e03722b71d654b..5f1fcc50402b7617c7eb4b7770d491c2fbd49184 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 689d3beb76a9788ec0bb47a693ece33117ebd1ca..7926e68ca20b4050a064ddd4c2cc3a5c3c02616e 100644 (file)
@@ -168,6 +168,13 @@ namespace bbtk
 
        //=========================================================================
 
+       std::string GObjectController::getStatusText()
+       {
+               return _model->getStatusText();
+       }
+
+       //=========================================================================
+
 }  // EO namespace bbtk
 
 // EOF
index 664ad9afe6666c37302622d48c64c854072a78f3..6c5fe8d0b189b312bacb604ec6bc05dc7d0d3382 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 6457cf456125ce7a115b02415858e39d4a68aaa7..70aed5fc40e4c8e92e34bf7e119f97a59d1d0fd1 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 18504607cb2325e76d57ca4a397f6a1affaa3176..46505030d50bbef2168b59804a84a32f5d0a0d66 100644 (file)
@@ -84,9 +84,6 @@ namespace bbtk
        private:
 
                //Private Attributes
-               vtkPoints *_pts;
-               vtkPoints *_ptsFill;
-               vtkPolyDataMapper* bboxMapperFill;
                vtkTextActor3D* _nameActor;
                vtkTextActor3D* _typeActor;
 
index 1c2fd8f8d1e6622f3fb1bab6d619033b61697fb2..7ed876b3b8640cc05d1cb3ff78a09e5c817e6356 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 3c6908a9605c3dd839a0ef34b8435d8b6aa970cf..691d2ef3290690c5887ebc58badc5272d261222d 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 6cf1839fdd013e9b9f6db0b275db93b7e0bf2765..a21ba849c2e44a5c14a7d58d977406ec16a066b4 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 b66f52952d5a2facc29a46b31d0596a099acafa8..7f94560985082ee0b496c2e157e2210427d86afe 100644 (file)
@@ -81,7 +81,7 @@ namespace bbtk
        private:
 
                //Private Attributes
-               vtkPoints *_pts;
+               
 
                //Private Methods
 
index 12708e34400425a58447bfa5a7e9e2f95dca78a3..bafa007f88e0dc97733875493bc1da8fca77d973 100644 (file)
@@ -276,6 +276,13 @@ namespace bbtk
 
        //=========================================================================
 
+       void wxGUIEditorGraphicBBS::updateStatusBar(std::string textStatus)
+       {
+               SetStatusText(_T(textStatus));
+       }
+
+       //=========================================================================
+
        /*****************************************************
        /* HANDLERS 
        /*****************************************************/
index 5771c39271ba8e8d472949ccfab9dd2de8f46d6e..997f4d3368ea9eefb6cb109c482929a0abcd2d66 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 c2f538c5baaddaedd95e0acad8988bc28799cbb8..3171eb227cb86bdcf9563d09c860c36acdded80d 100644 (file)
@@ -113,6 +113,13 @@ namespace bbtk
 
        //=========================================================================
 
+       void wxGEditorTabPanel::updateStatusBar(std::string textStatus)
+       {
+               _panelsManager->updateStatusBar(textStatus);
+       }
+
+       //=========================================================================
+
 }  // EO namespace bbtk
 
 // EOF
index 39e0ab06eb2a8696318496fcbb0b09027d22f922..e3affc59c3597992d38915f734d2283adadba467 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 6f1ee930aafa75ad0575aeedd98c6a2d43c01a4e..c9e748d3f854c32adb0f6fb57d52d696d47442fc 100644 (file)
@@ -89,9 +89,13 @@ namespace bbtk
 
        //=========================================================================
 
-       /*****************************************************
-       /* HANDLERS 
-       /*****************************************************/
+       void wxTabPanelsManager::updateStatusBar(std::string textStatus)
+       {
+               _parent->updateStatusBar(textStatus);
+       }
+
+       //=========================================================================
+
 
 
 }  // EO namespace bbtk
index b987a9bdd9ca06c8a4d51344c27d11ec6c53873d..edf4ca19ec6a86475ad051310091ed91bac91b93 100644 (file)
@@ -73,6 +73,7 @@ namespace bbtk
                wxGEditorTabPanel* getActualTabPanel();
 
                void displayBlackBoxInfo(std::string packageName, std::string boxName);
+               void updateStatusBar(std::string textStatus);
                
 
        private: