]> Creatis software - bbtkGEditor.git/commitdiff
no message
authordavila <>
Sun, 12 Sep 2010 14:47:04 +0000 (14:47 +0000)
committerdavila <>
Sun, 12 Sep 2010 14:47:04 +0000 (14:47 +0000)
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/ExecuterBBSG.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/ExecuterBBSG.h
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.h

index d485735950da7e543a5a8bb6371455fa992887d2..39df179cd7e1cef112fb3ff879b94b2fdd4f9885 100644 (file)
@@ -48,16 +48,23 @@ namespace bbtk
 
        
 
-       EExecuterBBSG::Pointer EExecuterBBSG::New()
+       EExecuterBBSG::Pointer EExecuterBBSG::New( wxVtkSceneManager* sceneManager,  Factory::Pointer factory )
        {
-                    return MakePointer( new EExecuterBBSG() );
+                    return MakePointer( new EExecuterBBSG( sceneManager, factory) );
        }
 
        
        //=========================================================================
 
-       EExecuterBBSG::EExecuterBBSG()
+       EExecuterBBSG::EExecuterBBSG( wxVtkSceneManager* sceneManager, Factory::Pointer factory )
        {               
+               _factory                = factory;
+               _sceneManager   = sceneManager;
+               
+               _xGeneral               = 10;
+               _yGeneral               = 10;
+               _zGeneral               = 900;   //  ?????
+               
        }
 
        //=========================================================================
@@ -67,7 +74,9 @@ namespace bbtk
        }
 
        //=========================================================================
-
+       
+       
+       
 //--EED
     /// Sets the inputs of the workspace : 
     void EExecuterBBSG::SetInputs(const std::map<std::string,std::string>& m)
@@ -147,10 +156,13 @@ namespace bbtk
        }
        
     /// Creates a new black box in current complex box
-    void EExecuterBBSG::Create ( const std::string& boxType, const std::string&
-                                                boxName)
+    void EExecuterBBSG::Create ( const std::string& boxType, const std::string& boxName)
        {
-               printf("EED EExecuterBBSG::Create\n");
+               std::string packagename = _factory->GetPackageNameOfaBlackBox(boxType);
+//             int idBox                               = _sceneManager->createGBlackBox( 0,0, packagename ,boxType);
+//             _sceneManager->configGBlackBox(idBox, _xGeneral,_yGeneral,_zGeneral,boxName, false , _xGeneral+100, _yGeneral-10 , _zGeneral );
+               _yGeneral = _yGeneral + 30;
+               printf("EED EExecuterBBSG::Create  packagename=%s    boxtype=%s   boxname=%s \n", packagename.c_str(), boxType.c_str(), boxName.c_str() );      
        }
        
     /// Destroys a black box
index 4b0b018dc0bebd88364b8cd7ff302e02048499bf..80e2c10294dc4984c8dadf349ab6203ff3eb94ee 100644 (file)
@@ -39,7 +39,7 @@ Version:   $Revision$
 #define __ExecuterBBSG_h__
 
 //Includes same project
-//..
+#include "wxVtkSceneManager.h"
 
 //Includes bbtk
 #include "bbtkVirtualExec.h"
@@ -54,37 +54,14 @@ Version:   $Revision$
 
 
 
-
-
-/*
-namespace bbtk
-{
-       
-       class Interpreter;
-       
-       
-       class  Executer : public VirtualExec
-               {
-                       BBTK_OBJECT_INTERFACE(Executer);
-                       typedef VirtualExec Superclass;
-               public:
-                       static Pointer New();
-*/
-
-
-
-
 namespace bbtk
 {
 
        class EExecuterBBSG : public VirtualExec 
        {
-//             BBTK_OBJECT_INTERFACE(EExecuterBBSG);
-//             typedef VirtualExec Superclass;
                public:
-               static Pointer New();
-//                     Pointer New();
-               EExecuterBBSG();
+               static Pointer New( wxVtkSceneManager* sceneManager, Factory::Pointer factory );
+               EExecuterBBSG( wxVtkSceneManager* sceneManager, Factory::Pointer factory );
                ~EExecuterBBSG();
                
                //Public methods
@@ -218,7 +195,11 @@ namespace bbtk
                virtual void Print(const std::string & message);
                
 //--EED                
-               
+               double                          _xGeneral;
+               double                          _yGeneral;
+               double                          _zGeneral;
+               wxVtkSceneManager       *_sceneManager;
+               Factory::Pointer        _factory;
                
        private:
 
index a633abf6d44abd8f98bc303fa2dddc92241eac03..e939b3287665a2c07aef567a34894409f93b5578 100644 (file)
@@ -411,21 +411,21 @@ namespace bbtk
                if (openFileDialog->ShowModal() == wxID_OK)
                {
                        wxString fileName = openFileDialog->GetPath(  );
-                       printf("EED wxGUIEditorGraphicBBS::OnOpenBBS  file=%s\n", (const char*) (fileName.mb_str()) );
+printf("EED wxGUIEditorGraphicBBS::OnOpenBBS  file=%s\n", (const char*) (fileName.mb_str()) );
                        
-                       bbtk::EExecuterBBSG::Pointer exe = bbtk::EExecuterBBSG::New();
-//                     EExecuterBBSG *exe = new EExecuterBBSG();
+                       
+                       _tabsMgr->addNewTab();
+
+                       
+                       bbtk::EExecuterBBSG::Pointer exe = bbtk::EExecuterBBSG::New( this->_tabsMgr->getActualTabPanel()->getSceneManager() , _pkgBrowser->GetFactory() );
                        bbtk::Interpreter::Pointer I = bbtk::Interpreter::New( boost::static_pointer_cast<VirtualExec>(exe) );                  
-//                     bbtk::Interpreter::Pointer I = bbtk::Interpreter::New( ExecuterBBSG::New() );                                           
-//                     bbtk::Interpreter::Pointer I = bbtk::Interpreter::New( );                       
                        
                        // We tell the interpreter to throw exceptions on error
                        I->SetThrow(true);
                        // Interpret the file supposed to define a box called 'Processing'
                        I->InterpretFile( (const char*) (fileName.mb_str()) );
-                       
-                       
                }
+               refreshGUIControls();
        }
 
        void wxGUIEditorGraphicBBS::OnSaveActualBBS(wxCommandEvent& event)
@@ -463,7 +463,6 @@ namespace bbtk
                if (nameDialog->ShowModal() == wxID_OK)
                {
                        wxString fileName = nameDialog->GetValue();
-//EED                  cbName=fileName;
                        cbName=(const char*) (fileName.mb_str());
                }               
 
@@ -475,7 +474,6 @@ namespace bbtk
                                wxString fileName = saveFileDialog->GetPath();
                                
                                ofstream file;
-//EED                          file.open(fileName.c_str());
                                file.open( (const char*) (fileName.mb_str()) );
 
                                std::string content="";
@@ -503,7 +501,6 @@ namespace bbtk
                        wxString fileName = saveFileDialog->GetPath();
                        
                        ofstream file;
-//EED                  file.open(fileName.c_str());
                        file.open( (const char*) (fileName.mb_str()) );
 
                        std::string content="";
@@ -513,7 +510,6 @@ namespace bbtk
                        content += "# - BBTKGEditor v 1.0 BBG BlackBox Diagram file\n";
                        content += "# - ";
 
-//EED                  content += fileName;
                        content += (const char*) (fileName.mb_str());
 
                        content += "\n";
index bf67893b2b439232c248e0baa639a71baba26800..53f6204a248e40dfd4523bc242d2897aa6647c17 100644 (file)
@@ -82,7 +82,7 @@ printf ("EED %p ~wxGEditorTabPanel()\n" , this );
        bool wxGEditorTabPanel::OnDropText(wxCoord x, wxCoord y, const wxString& data)
        {
                std::string packageName="";
-               std::string boxName="";
+               std::string boxType="";
 
                wxString foo( (data) );
                char str[150];
@@ -94,9 +94,9 @@ printf ("EED %p ~wxGEditorTabPanel()\n" , this );
                 packageName += result;
                 
                 result = strtok( NULL, delims );
-                boxName += result;
+                boxType += result;
                 
-               _sceneManager->createGBlackBox(x,y,packageName, boxName);
+               _sceneManager->createGBlackBox(x,y,packageName, boxType);
 
          return true;
        }
@@ -229,6 +229,13 @@ printf ("EED %p ~wxGEditorTabPanel()\n" , this );
 
        //=========================================================================     
 
+       
+       wxVtkSceneManager* wxGEditorTabPanel::getSceneManager()
+       {
+               return _sceneManager;
+       }
+       
+       
 }  // EO namespace bbtk
 
 // EOF
index 3e75838111ff8b8ef7e456bb599fb73d24436508..0f3b3bf3d1fbbdfc92089da6d0567a4626231fbd 100644 (file)
@@ -135,14 +135,16 @@ namespace bbtk
                // Receives the string from a drag and drop source as for example the BBTK Package Browser
                virtual bool OnDropText(wxCoord x, wxCoord y, const wxString& data);
 
+               
+               wxVtkSceneManager* getSceneManager();
        //=========================================================================
                
        private:
 
-               int _id;
-               wxAuiManager *_panelAUIMgr;
-               wxVtkSceneManager *_sceneManager;
-               wxTabPanelsManager* _panelsManager;
+               int                                             _id;
+               wxAuiManager                    *_panelAUIMgr;
+               wxVtkSceneManager               *_sceneManager;
+               wxTabPanelsManager              * _panelsManager;
 
        protected:
 
index 1573fd28474a9519760dca9b5423427995cbdede..1d3d1078e87b58048394ce7243525539baca6127 100644 (file)
@@ -109,7 +109,6 @@ namespace bbtk
   
        std::string wxVtkSceneManager::generateANewNameForABox()
        {
-               _numBoxes++;
                std::stringstream boxname;
                if(_numBoxes<10)
                {
@@ -117,6 +116,7 @@ namespace bbtk
                }else{
                        boxname << "Box" << _numBoxes;
                }
+               _numBoxes++;
                return boxname.str();
        }
 
@@ -135,11 +135,27 @@ namespace bbtk
        }
 
        //=========================================================================
+//ups1 eed
+       void wxVtkSceneManager::configGBlackBox(int idBox, double xIn, double yIn, double zIn, std::string name, bool boxExecutable,double xEn,double yEn,double zEn)
+       {
+               GObjectController *cont = _controllers[idBox];
+               GBlackBoxModel *bbmod   = (GBlackBoxModel*)cont->getModel();
+               bbmod->setBBTKName(name);
+               bbmod->setInicPoint(xIn,yIn,zIn);
+               bbmod->setFinalPoint(xEn,yEn,zEn);
+               bbmod->setExecutable(boxExecutable);                            
+               
+               bbmod->notifyObservers(_idManager);
 
-       int wxVtkSceneManager::createGBlackBox(int x, int y, std::string packageName, std::string boxType)
+       } 
+       
+       
+       //=========================================================================
+
+       int wxVtkSceneManager::createGBlackBox(int x, int y,  std::string packageName, std::string boxType)
        {
                _worldState                                                             = NOTHING_HAPPENS;
-               int windowWidth                                                 = _baseView->GetRenWin()->GetSize()[0];
+//EED          int windowWidth                                                 = _baseView->GetRenWin()->GetSize()[0];
                int windowHeight                                                = _baseView->GetRenWin()->GetSize()[1];
 
                int type                                                                = GBLACKBOX;
@@ -164,21 +180,14 @@ namespace bbtk
                _baseView->TransCoordScreenToWorld(xx,yy,zz);
                model->setInicPoint(xx,yy,zz);
                
-//EED Borrame          _numBoxes++;
                std::stringstream stream;
                
-               str:string newBoxName = findANewNameForABox();
+               std::string newBoxName;
+               newBoxName = findANewNameForABox();
+                       
+               
                stream << newBoxName;
-/* EED Borrame
-               if(_numBoxes<10)
-               {
-                       stream << "Box0" << _numBoxes;
-               }
-               else
-               {
-                       stream << "Box" << _numBoxes;
-               }
-*/
+               
                std::string arraystring = stream.str();
 
                model->setBBTKName(arraystring);
@@ -235,24 +244,24 @@ namespace bbtk
 
        int wxVtkSceneManager::createGComplexBoxInputPort(std::string inputName)
        {
-               int windowWidth=_baseView->GetRenWin()->GetSize()[0];
+//EED          int windowWidth=_baseView->GetRenWin()->GetSize()[0];
                int windowHeight=_baseView->GetRenWin()->GetSize()[1];
                
-               int type = GCOMPLEXINPUTPORT;
+               int type                                                = GCOMPLEXINPUTPORT;
 
                //Create the MVC Objects
                
-               GComplexBoxPortModel *model = (GComplexBoxPortModel*)GObjectsMVCFactory::getInstance()->createGObjectModel(type);
-               vtkGObjectView *view = GObjectsMVCFactory::getInstance()->createGObjectView(type);
-               GObjectController* controller = GObjectsMVCFactory::getInstance()->createGObjectController(type);
+               GComplexBoxPortModel *model             = (GComplexBoxPortModel*)GObjectsMVCFactory::getInstance()->createGObjectModel(type);
+               vtkGObjectView *view                    = GObjectsMVCFactory::getInstance()->createGObjectView(type);
+               GObjectController* controller   = GObjectsMVCFactory::getInstance()->createGObjectController(type);
                                
                //Prepares the initial model 
 
-               double xx = 5;
-               double yy = windowHeight-5;
+               double xx                                               = 5;
+               double yy                                               = windowHeight-5;
                
                //z value is not important yet, because it is only used a parallel projection
-               double zz = 900;
+               double zz                                               = 900;
 
                _baseView->TransCoordScreenToWorld(xx,yy,zz);
                model->setInicPoint(xx,yy,zz);
@@ -288,24 +297,24 @@ namespace bbtk
        
        int wxVtkSceneManager::createGComplexBoxOutputPort(std::string outputName)
        {
-               int windowWidth=_baseView->GetRenWin()->GetSize()[0];
+//EED          int windowWidth=_baseView->GetRenWin()->GetSize()[0];
                int windowHeight=_baseView->GetRenWin()->GetSize()[1];
 
-               int type = GCOMPLEXOUTPUTPORT;
+               int type                                                = GCOMPLEXOUTPUTPORT;
 
                //Create the MVC Objects
                
-               GComplexBoxPortModel *model = (GComplexBoxPortModel*)GObjectsMVCFactory::getInstance()->createGObjectModel(type);
-               vtkGObjectView *view = GObjectsMVCFactory::getInstance()->createGObjectView(type);
-               GObjectController* controller = GObjectsMVCFactory::getInstance()->createGObjectController(type);
+               GComplexBoxPortModel *model             = (GComplexBoxPortModel*)GObjectsMVCFactory::getInstance()->createGObjectModel(type);
+               vtkGObjectView *view                    = GObjectsMVCFactory::getInstance()->createGObjectView(type);
+               GObjectController* controller   = GObjectsMVCFactory::getInstance()->createGObjectController(type);
                                
                //Prepares the initial model 
 
-               double xx = 5;
-               double yy = windowHeight-5;
+               double xx                                               = 5;
+               double yy                                               = windowHeight-5;
                
                //z value is not important yet, because it is only used a parallel projection
-               double zz = 900;
+               double zz                                               = 900;
 
                _baseView->TransCoordScreenToWorld(xx,yy,zz);
                model->setInicPoint(xx,yy,zz);
@@ -499,10 +508,10 @@ namespace bbtk
                {
                        if(command == ADD_TO_SELECTED)
                        {
-                               GObjectController* cont = _controllers[idController];
+//EED                          GObjectController* cont = _controllers[idController];
 
                                bool foundID=false;
-                               for (int i=0; i<_selectedObjects.size() && foundID==false; i++)
+                               for (int i=0; i<(int)_selectedObjects.size() && foundID==false; i++)
                                {
                                        int id = _selectedObjects[i];
                                        if(id==idController)
@@ -604,7 +613,7 @@ namespace bbtk
                
                if(_worldState == DRAG_OBJECTS)
                {                       
-                       for (int i=0; i<_selectedObjects.size(); i++)
+                       for (int i=0; i<(int)_selectedObjects.size(); i++)
                        {
                                int id = _selectedObjects[i];
                                GObjectController* cont = _controllers[id];
@@ -703,7 +712,7 @@ namespace bbtk
                        _worldState = DRAG_OBJECTS;
                        _startDragging = true;
 
-                       for (int i = 0; i < _selectedObjects.size(); i++)
+                       for (int i = 0; i < (int)_selectedObjects.size(); i++)
                        {
                                int id = _selectedObjects[i];
                                GObjectController* cont = _controllers[id];
@@ -725,7 +734,7 @@ namespace bbtk
                {
                        _worldState = NOTHING_HAPPENS;
 
-                       for (int i = 0; i < _selectedObjects.size(); i++)
+                       for (int i = 0; i < (int)_selectedObjects.size(); i++)
                        {
                                int id = _selectedObjects[i];
                                GObjectController* cont = _controllers[id];
@@ -760,7 +769,7 @@ namespace bbtk
                }
 
                        
-               for (int i = 0; i < _selectedObjects.size(); i++)
+               for (int i = 0; i < (int)_selectedObjects.size(); i++)
                {
                        int id = _selectedObjects[i];
                        GObjectController* cont = _controllers[id];
@@ -796,7 +805,7 @@ namespace bbtk
                        {
                                if(type==GBLACKBOX)
                                {
-                                       for (int i=0; i<_selectedObjects.size(); i++)
+                                       for (int i=0; i< (int)_selectedObjects.size(); i++)
                                        {
                                                int id = _selectedObjects[i];
                                                GObjectController* control = _controllers[id];
@@ -990,7 +999,7 @@ namespace bbtk
                                
                                std::string pkg = mod->getBBTKPackage();
                                bool existsPkg = false;
-                               for(int t = 0;t<packages.size() && existsPkg == false;t++)
+                               for(int t = 0;t< (int)packages.size() && existsPkg == false;t++)
                                {
                                        if(packages[t]==pkg)
                                        {
@@ -1024,7 +1033,7 @@ namespace bbtk
                        script+="include std\n"; // EED
                        script+="include itkvtk\n"; // EED
                        int i;
-                       for(i = 0; i<packages.size();i++)
+                       for(i = 0; i< (int)packages.size();i++)
                        {
                                script+="include ";
                                script+=packages[i];
@@ -1033,7 +1042,7 @@ namespace bbtk
 
                        // script+="include std\n"; // JPR
 
-                       for(i = 0; i<boxes.size();i++)
+                       for(i = 0; i < (int)boxes.size();i++)
                        {
                                script+="new ";
                                int id = boxes[i];
@@ -1046,7 +1055,7 @@ namespace bbtk
                                script+="\n";
 
                                std::vector<GPortModel*> inputs = model->getInputPorts();
-                               for(int j = 0; j<inputs.size();j++)
+                               for(int j = 0; j < (int)inputs.size();j++)
                                {
                                        GPortModel* inputPort = inputs[j];
                                        if(inputPort->isValueSet())
@@ -1063,7 +1072,7 @@ namespace bbtk
 
                        }
 
-                       for(i = 0; i<connections.size();i++)
+                       for(i = 0; i<(int)connections.size();i++)
                        {
                                script+="connect ";
                                int id = connections[i];
@@ -1126,7 +1135,7 @@ namespace bbtk
                                
                                std::string pkg = mod->getBBTKPackage();
                                bool existsPkg = false;
-                               for(int t = 0;t<packages.size() && existsPkg == false;t++)
+                               for(int t = 0;t<(int)packages.size() && existsPkg == false;t++)
                                {
                                        if(packages[t]==pkg)
                                        {
@@ -1156,7 +1165,7 @@ namespace bbtk
                script+="include std\n";    // EED
                script+="include itkvtk\n"; // EED
                int i;
-               for(i = 0; i<packages.size();i++)
+               for(i = 0; i<(int)packages.size();i++)
                {
                        script+="include ";
                        script+=packages[i];
@@ -1190,7 +1199,7 @@ namespace bbtk
                        script+="\n";
 
                                std::vector<GPortModel*> inputs = model->getInputPorts();
-                               for(int j = 0; j<inputs.size();j++)
+                               for(int j = 0; j<(int)inputs.size();j++)
                                {
                                        GPortModel* inputPort = inputs[j];
                                        if(inputPort->isValueSet())
@@ -1212,7 +1221,7 @@ namespace bbtk
                        std::string complexInputs="";
                        std::string complexOutputs="";
 
-                       for(i = 0; i<connections.size();i++)
+                       for(i = 0; i<(int)connections.size();i++)
                        {
                                int id = connections[i];
                                GObjectController *control = _controllers[id];
@@ -1273,7 +1282,7 @@ namespace bbtk
                                }
                        }
 
-                       for(i = 0; i<execBoxes.size();i++)
+                       for(i = 0; i<(int)execBoxes.size();i++)
                        {
                                script+="exec ";
                                int id = execBoxes[i];
@@ -1544,6 +1553,7 @@ namespace bbtk
 
                                        getline(inputStream,line);//FIN_COMPLEX_PORT
 
+                                       
                                        int idOutputPort = createGComplexBoxOutputPort(outputPortName);
                                        GObjectController *cont = _controllers[idOutputPort];
                                        GBoxModel *cbmod = (GBoxModel*)cont->getModel();
@@ -1622,21 +1632,26 @@ namespace bbtk
                                std::istringstream zEt(zEnd);
                                zEt >> zEn;
 
-                               int idBox = createGBlackBox(0,0,package,type);
-                               GObjectController *cont = _controllers[idBox];
-                               GBlackBoxModel *bbmod = (GBlackBoxModel*)cont->getModel();
-                               bbmod->setBBTKName(name);
-                               bbmod->setInicPoint(xIn,yIn,zIn);
-                               bbmod->setFinalPoint(xEn,yEn,zEn);
-
+                               bool boxExecutable=false;
                                if(isExec=="TRUE")
                                {
-                                       bbmod->setExecutable(true);
-                               }
-                               else if(isExec=="FALSE")
-                               {
-                                       bbmod->setExecutable(false);
+                                       boxExecutable= true;
                                }
+                               
+                               int idBox                               = createGBlackBox(xIn,yIn,package,type);
+                               GObjectController *cont = _controllers[idBox];
+                               GBlackBoxModel *bbmod   = (GBlackBoxModel*)cont->getModel();
+                               configGBlackBox(idBox, xIn,yIn,zIn,name, boxExecutable,xEn,yEn,zEn);
+                               
+                               
+//ups2 eed                             
+//                             GObjectController *cont = _controllers[idBox];
+//                             GBlackBoxModel *bbmod   = (GBlackBoxModel*)cont->getModel();
+//                             bbmod->setBBTKName(name);
+//                             bbmod->setInicPoint(xIn,yIn,zIn);
+//                             bbmod->setFinalPoint(xEn,yEn,zEn);
+//                             bbmod->setExecutable(boxExecutable);
+
                                                        
                                //----------
                                getline(inputStream,line);//PORT o FIN_BOX
@@ -1657,7 +1672,7 @@ namespace bbtk
                                        port=line.substr(0,4);
                                } // while              
 
-                               bbmod->notifyObservers(_idManager);
+//EED                          bbmod->notifyObservers(_idManager);
                        } // boxes
 
                        /// CONNECTIONS
@@ -2003,11 +2018,11 @@ namespace bbtk
                        std::vector<int> newInputConnections = newBox->getConnectedInputs();
                        std::vector<int> newOutputConnections = newBox->getConnectedOutputs();
 
-                       for(int k = 0; k<oldInputConnections.size();k++)
+                       for(int k = 0; k<(int)oldInputConnections.size();k++)
                        {
                                bool exist=false;
-                               int toCreate=-1;
-                               for(int l = 0; l<newInputConnections.size() && !exist;l++)
+//EED                          int toCreate=-1;
+                               for(int l = 0; l<(int)newInputConnections.size() && !exist;l++)
                                {
                                        if(oldInputConnections[k]==newInputConnections[l])
                                        {
@@ -2046,11 +2061,11 @@ namespace bbtk
                        }
                        
 
-                       for(int k = 0; k<oldOutputConnections.size();k++)
+                       for(int k = 0; k<(int)oldOutputConnections.size();k++)
                        {
                                bool exist=false;
-                               int toCreate=-1;
-                               for(int l = 0; l<newOutputConnections.size() && !exist;l++)
+//EED                          int toCreate=-1;
+                               for(int l = 0; l<(int)newOutputConnections.size() && !exist;l++)
                                {
                                        if(oldOutputConnections[k]==newOutputConnections[l])
                                        {
index acfd7e183b233619884a390b1ea956ed90f42ae9..1c05f16d646c56509b1d3d310f8bd99e8511dc42 100644 (file)
@@ -100,13 +100,13 @@ namespace bbtk
 
                virtual bool OnChar();
                virtual bool OnMouseMove();
-               virtual bool  OnLeftButtonDown(); 
-               virtual bool  OnLeftButtonUp();
+               virtual bool OnLeftButtonDown(); 
+               virtual bool OnLeftButtonUp();
                virtual bool OnRightButtonUp();
                virtual bool OnLeftDClick();
 
                //-------
-               int createGBlackBox(int x, int y,std::string packageName, std::string boxType);
+               int createGBlackBox(int x, int y, std::string packageName, std::string boxType );
                int createGComplexBoxInputPort(std::string inputName);
                int createGComplexBoxOutputPort(std::string outputName);
                GPortController* createGPort(int portType, std::string bbtkName, std::string bbtkType, int posinBox,GBoxModel *blackBox);
@@ -114,6 +114,9 @@ namespace bbtk
                int createGOutputPort(int portType, int posinBox,GBoxModel *blackBox, BlackBoxOutputDescriptor *desc);
                int createGConnector(GPortModel* startPort);
 
+               void configGBlackBox(int idBox, double xIn, double yIn, double zIn, std::string name, bool boxExecutable,double xEn,double yEn,double zEn);
+
+               
                vtkRenderWindow* getRenderWindow();
                vtkRenderer* getRenderer();             
 
@@ -160,7 +163,6 @@ namespace bbtk
                
                void AddControlerToBeRemove(std::vector<int> *controllersToRemove, int id);
 
-
                //Clear list of controllers and refresh
                void deleteAllBoxes();