]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsKernelEditorGraphic/GBlackBoxModel.cxx
Move box and refresh position ... ports don't refresh automatically their position...
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsKernelEditorGraphic / GBlackBoxModel.cxx
index 2a2081f463a1bec9826708452acaf87bfa475fc0..f2866f599afa50e52256b0458ae34be28f6ac38e 100644 (file)
@@ -89,6 +89,43 @@ namespace bbtk
 
        //=========================================================================
 
+       void GBlackBoxModel::move(double xx,double yy,double zz)
+       {
+               setInicPoint(xx,yy,zz);
+               //std::cout<<"GBlackBoxModel::move xx:"<<xx<<" yy:"<<yy<<" zz:"<<zz<<std::endl;
+
+               //Refresh inputs position
+               int i;
+               for(i=0;i<_inputs.size();i++)
+               {
+                       _inputs[i]->updatePortPosition(i);
+               }
+               
+               //Refresh outputs position
+               for(i=0;i<_outputs.size();i++)
+               {
+                       _outputs[i]->updatePortPosition(i);
+               }
+
+       }
+       
+       //=========================================================================
+
+       GPortModel* GBlackBoxModel::getStartInputPort()
+       {
+               GPortModel* temp = NULL;
+
+               for(int i=0; i<_inputs.size() && temp == NULL;i++)
+               {
+                       if(_inputs[i]->getState() == CREATING_CONTOUR)
+                       {
+                               temp = _inputs[i];
+                       }
+               }
+
+               return temp;
+       }
+
 }  // EO namespace bbtk
 
 // EOF