+ //=========================================================================
+
+ void wxGUIEditorGraphicBBS::editBlackBox(GBlackBoxModel *bbmodel)
+ {
+ wxBlackBoxEditionDialog* dialog = new wxBlackBoxEditionDialog(this,bbmodel);
+ dialog->Show();
+ }
+
+ //=========================================================================
+
+ void wxGUIEditorGraphicBBS::editDiagramParameters(wxVtkSceneManager* scene)
+ {
+ wxBlackBoxEditionDialog* dialog = new wxBlackBoxEditionDialog(this,scene);
+ dialog->Show();
+ }
+
+ //=========================================================================
+
+ void wxGUIEditorGraphicBBS::updateStatusBar(std::string textStatus)
+ {
+ SetStatusText(crea::std2wx(textStatus));
+ }
+
+ //=========================================================================
+
+ void wxGUIEditorGraphicBBS::executeScript(std::string script)
+ {
+ std::string separator = ConfigurationFile::GetInstance().Get_file_separator ();
+ std::string dir = ConfigurationFile::GetInstance().Get_default_temp_dir();
+ std::string filename = dir + separator + "tmp_bbtk.bbs";
+
+ ofstream tempFile;
+ tempFile.open(filename.c_str());
+ tempFile << script;
+ tempFile.close();
+
+ std::string command = "\"";
+
+ #ifdef WIN32
+ command += "\"";
+ #endif
+
+ //command += ConfigurationFile::GetInstance().Get_bin_path();
+ command +="C:/temp/bbtkBIN/RelWithDebInfo//";
+
+ #ifdef MACOSX
+ command += separator + "bbi.app/Contents/MacOS/bbi\" ";
+ #else
+ command += separator + "bbi\" ";
+ #endif
+ command += "\""+filename + "\"";
+
+ #ifdef WIN32
+ command += "\"";
+ #endif
+
+ command += " & ";
+
+ printf ("RaC wxGUIEditorGraphicBBS::executeScript %s \n" , command.c_str() );
+ system( command.c_str() );
+ }
+
+ //=========================================================================
+ // EVENT HANDLERS
+ //=========================================================================
+
+ void wxGUIEditorGraphicBBS::OnCreateNewTab(wxCommandEvent& event)
+ {
+ _tabsMgr->addNewTab();
+ }
+
+ //=========================================================================
+
+ void wxGUIEditorGraphicBBS::OnExecuteActualDiagram(wxCommandEvent& event)
+ {
+ std::string script = _tabsMgr->getActualDiagramScript();
+ cout<<"RaC wxGUIEditorGraphicBBS::executeActualDiagram SCRIPT"<<endl;
+ cout<<script<<endl;
+
+ executeScript(script);
+ }
+
+ //=========================================================================
+
+ void wxGUIEditorGraphicBBS::OnSaveActualDiagram(wxCommandEvent& event)
+ {
+
+ }
+
+ //=========================================================================
+
+ void wxGUIEditorGraphicBBS::OnDeleteAllBoxesActualDiagram(wxCommandEvent& event)
+ {
+ wxMessageDialog *dial = new wxMessageDialog(NULL, wxT("Are you sure to delete all boxes of the diagram?"), wxT("Delete all boxes"), wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION);
+ if(dial->ShowModal() == wxID_YES)
+ {
+ _tabsMgr->deleteAllBoxesActualDiagram();
+ }
+ }
+
+ //=========================================================================
+
+ void wxGUIEditorGraphicBBS::OnCenterViewActualDiagram(wxCommandEvent& event)
+ {
+ _tabsMgr->centerViewActualDiagram();
+ }
+
+ //=========================================================================
+