}
//=========================================================================
-
-
-
-void wxVtkSceneManager::printAll(int com , int sta ){
-
+void wxVtkSceneManager::printAll(int com , int sta )
+{
int tmpState = sta ;
if ( tmpState == NOTHING_HAPPENS ) {
std::cout << "CONTROLER STATE---->NOTHING_HAPPENS\n" ;
}
+//=========================================================================
+//EED 2022-10-28
+void wxVtkSceneManager::SelectBoxWithPossibleName( std::string possibleName )
+{
+ UnSelectBlackBoxes();
+ std::map<int, GObjectController*>::iterator it;
+ GObjectController *desc;
+ int type;
+ int id;
+ int pos;
+ std::string possibleNameAA = possibleName;
+ std::string boxNameBB;
+ int i,size;
+ size = possibleNameAA.length();
+ for (i=0;i<size;i++)
+ {
+ if ((possibleNameAA[i]>='A')&&(possibleNameAA[i]<='Z')) { possibleNameAA[i]=possibleNameAA[i]+32; }
+ } //for i
+ for (it = _controllers.begin(); it != _controllers.end(); ++it)
+ {
+ desc = it->second;
+ type = desc->getGObjectType();
+ if ( type==GBLACKBOX)
+ {
+ boxNameBB = desc->getModel()->getBBTKType() +":"+ desc->getModel()->getBBTKName();
+ size=boxNameBB.length();
+ for (i=0;i<size;i++)
+ {
+ if ((boxNameBB[i]>='A')&&(boxNameBB[i]<='Z')) { boxNameBB[i]=boxNameBB[i]+32; }
+ } // for i
+
+ pos=boxNameBB.find( possibleNameAA );
+ if (pos>=0)
+ {
+ desc->getView()->setState(SELECTED);
+ id = desc->getModel()->getObjectId();
+ desc->getModel()->notifyObservers( id , ADD_TO_SELECTED );
+ } // if pos
+ } // if type == 1
+ } // for it
+ refresh();
+}
} // EO namespace bbtk