const int ID_EDITPROPERTIES = 1028; // RaC 2nd HackFest
const int ID_SHOWTREE = 1029; // CFT
+
+ //EED 2022-10-28
+ const int ID_BTNSELETBOXES = 1032;
+
+
}
// namespace bbtk
#endif
toolbar->AddTool(ID_CENTERVIEW, _T("Center view"), bmp_centerview,
wxNullBitmap, wxITEM_NORMAL, _T("Center view"), _T("Center view"));
toolbar->AddSeparator();
- toolbar->AddTool(ID_BTNBOX, _T("New Box"), bmp_box, wxNullBitmap,
- wxITEM_NORMAL, _T("New Box"), _T("Nex Box"));
+ toolbar->AddTool(ID_BTNBOX, _T("New Box"), bmp_box, wxNullBitmap,wxITEM_NORMAL, _T("New Box"), _T("Nex Box"));
+ toolbar->AddTool(ID_BTNSELETBOXES, _T("Select Boxes"), bmp_box, wxNullBitmap,wxITEM_NORMAL, _T("Select Boxes"), _T("Select Boxes"));
toolbar->AddSeparator();
toolbar->AddTool(ID_BTEXECUTABLEBOX, _T("Select as executable Box"),
bmp_executablebox, wxNullBitmap, wxITEM_NORMAL,
ID_CENTERVIEW,
wxEVT_COMMAND_TOOL_CLICKED,
wxCommandEventHandler(wxGUIEditorGraphicBBS::OnCenterViewActualDiagram));
- Connect(ID_BTNBOX, wxEVT_COMMAND_TOOL_CLICKED,
- wxCommandEventHandler(wxGUIEditorGraphicBBS::OnClickBtnBox));
+ Connect(ID_BTNBOX, wxEVT_COMMAND_TOOL_CLICKED,wxCommandEventHandler(wxGUIEditorGraphicBBS::OnClickBtnBox));
+ Connect(ID_BTNSELETBOXES, wxEVT_COMMAND_TOOL_CLICKED , wxCommandEventHandler(wxGUIEditorGraphicBBS::OnClickBtnSelectBoxes) );
Connect(
ID_BTEXECUTABLEBOX,
wxEVT_COMMAND_TOOL_CLICKED,
}// if bbDes
}
+//=========================================================================
+//2022-10-28
+void wxGUIEditorGraphicBBS::OnClickBtnSelectBoxes(wxCommandEvent& event)
+{
+ std::string nameFilter = _pkgBrowser->GetNameFilter();
+ _tabsMgr->SelectBoxWithPossibleName( nameFilter );
+}
+
//=========================================================================
void wxGUIEditorGraphicBBS::OnClickBtnExecutableBox(wxCommandEvent& event)
void OnDeleteAllBoxesActualDiagram(wxCommandEvent& event);
void OnCenterViewActualDiagram(wxCommandEvent& event);
void OnClickBtnBox(wxCommandEvent& event);
+ void OnClickBtnSelectBoxes(wxCommandEvent& event);
void OnClickBtnComplexBox(wxCommandEvent& event);
void OnAddComplexBoxInput(wxCommandEvent& event);
void OnAddComplexBoxOutput(wxCommandEvent& event);
// RaC 2012 2nd HackFest
std::string _currentBBGversion;
- NodeTreeC tree;
- wxVtkSceneManager *_sceneM;
+ NodeTreeC tree;
+ wxVtkSceneManager *_sceneM;
protected:
return( this->_fileName );
}
+ //=========================================================================
+ // EED 2022-10-28
+ bool wxGEditorTabPanel::SelectBoxWithPossibleName(std::string nameFilter )
+ {
+ getSceneManager()->SelectBoxWithPossibleName( nameFilter );
+ }
+
std::string GetMessageKind();
std::string GetMessageLevel();
+ bool SelectBoxWithPossibleName(std::string nameFilter );
+
//=========================================================================
private:
{
return _parent->TryToOpenScriptApplication( packageName, boxType );
}
-
+
+ //=========================================================================
+ // EED 2022-10-28
+ bool wxTabPanelsManager::SelectBoxWithPossibleName(std::string nameFilter )
+ {
+ _actual->SelectBoxWithPossibleName( nameFilter );
+ }
+
} // EO namespace bbtk
// EOF
std::string GetCurrentTabPanelPath( ); //DFCH
int FindTab(std::string filename);
bool TryToOpenScriptApplication(std::string packageName ,std::string boxType);
-
+ bool SelectBoxWithPossibleName(std::string nameFilter );
+
private:
// Private Attributes
}
//=========================================================================
-
-
-
-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
void getCleanLine(std::stringstream &inputStream, std::string &line);
// JGRR & CM
void printAll( int com, int sta );
+
+ //EED 2022-10-28
+ void SelectBoxWithPossibleName( std::string possibleName );
+
std::vector<std::string> boxesDiagram;//CFT
private:
std::string _cbName;