+ //================================================================
+
+ void wxGUIEditorGraphicBBS::initPropertiesPanel()
+ {
+ _propertiesPanel = new wxPropertiesPanel(this);
+ //_frameAUIMgr->AddPane(_propertiesPanel,wxAuiPaneInfo().Right().MinSize(200,200).CloseButton(false).Floatable(false));
+ }
+
+ //================================================================
+
+ void wxGUIEditorGraphicBBS::DoRegeneratePackageDoc( const std::string& pack )
+ {
+ std::string mess("Regenerating doc for package '");
+ if (pack!="-a"){
+ mess += pack + "'";
+ }
+ else
+ {
+ mess = "Regenerating doc for all packages";
+ }
+
+ mess += " ... please wait";
+
+ SetStatusText( std2wx(mess) );
+
+ //BBTK_BUSY_CURSOR;
+
+ std::string command;
+ #if defined(WIN32)
+ command = "\"";
+ #endif
+ command += ConfigurationFile::GetInstance().Get_bin_path();
+ command += ConfigurationFile::GetInstance().Get_file_separator();
+ command += "bbRegeneratePackageDoc";
+ #if defined(WIN32)
+ command += "\"";
+ #endif
+
+ command += " " + pack + " -q";
+ bbtkMessage("debug",1,"Executing system command '"<<command<<"'"<<std::endl);
+
+ if ( ! system ( command.c_str() ) )
+ {
+ SetStatusText( _T("Done !"));
+ /*
+ wxMessageBox(_T("Done !"),_T("Regenerate package '")
+ +std2wx(pack)+_T("' doc"),
+ wxOK | wxICON_INFORMATION);
+ */
+ }
+ else
+ {
+ SetStatusText( _T("Done !"));
+ wxString err(_T("An error occured while running '"));
+ err += bbtk::std2wx(command) + _T("'");
+ wxMessageBox(err,_T("Regenerate package doc"),wxOK | wxICON_ERROR);
+ }
+ }
+
+ //================================================================
+ void wxGUIEditorGraphicBBS::DoRegenerateBoxesLists()
+ {
+ SetStatusText( _T("Regenerating boxes lists ... please wait") );
+ //BBTK_BUSY_CURSOR ;
+
+ std::string command;
+ #if defined(WIN32)
+ command = "\"";
+ #endif
+ command += ConfigurationFile::GetInstance().Get_bin_path();
+ command += ConfigurationFile::GetInstance().Get_file_separator();
+ command += "bbRegenerateBoxesLists";
+
+ #if defined(WIN32)
+ command += "\"";
+ #endif
+ command += " -q";
+
+ bbtkMessage("debug",1,"Executing system command '"<<command<<"'"<<std::endl);
+
+ if ( ! system ( command.c_str() ) )
+ {
+ SetStatusText( _T("Done !"));
+ /*
+ wxMessageBox(_T("Done !"),_T("Regenerate boxes lists"),
+ wxOK | wxICON_INFORMATION);
+ */
+ }
+ else
+ {
+ SetStatusText( _T("Done !"));
+ wxString err(_T("An error occured while running '"));
+ err += bbtk::std2wx(command) + _T("'");
+ wxMessageBox(err,_T("Regenerate boxes lists"),wxOK | wxICON_ERROR);
+ }
+ }
+
+ //================================================================
+ void wxGUIEditorGraphicBBS::RegenerateAll()
+ {
+ DoRegeneratePackageDoc("-a");
+ DoRegenerateBoxesLists();
+ }
+
+ //================================================================
+
+ wxAuiNotebook* wxGUIEditorGraphicBBS::getAuiNotebook()
+ {
+ return _notebook;
+ }
+
+ //================================================================
+
+ void wxGUIEditorGraphicBBS::displayBlackBoxInfo(std::string packageName, std::string boxName)
+ {
+ if(_actualPkgBrowserPkgName != packageName || _actualPkgBrowserBoxName != boxName )
+ {
+ _actualPkgBrowserPkgName = packageName;
+ _actualPkgBrowserBoxName = boxName;
+
+ BlackBoxDescriptor::Pointer descriptor = GObjectsMVCFactory::getInstance()->getBlackBoxDescriptor(packageName, boxName);
+ _pkgBrowser->WxGUIBlackBoxListUserOnSelected(descriptor.get());
+ }
+ }
+
+ //=========================================================================
+
+ void wxGUIEditorGraphicBBS::editBlackBox(GBlackBoxModel *bbmodel)
+ {
+ wxEditionDialog* dialog = new wxEditionDialog(this,bbmodel);
+ dialog->Show();
+ }
+
+ //=========================================================================
+
+ void wxGUIEditorGraphicBBS::editDiagramParameters(wxVtkSceneManager* scene)
+ {
+ wxEditionDialog* dialog = new wxEditionDialog(this,scene);
+ dialog->Show();
+ }
+
+ //=========================================================================
+
+ void wxGUIEditorGraphicBBS::updateStatusBar(std::string textStatus)
+ {
+ SetStatusText(crea::std2wx(textStatus));
+ }
+
+ //=========================================================================
+
+ void wxGUIEditorGraphicBBS::executeActualDiagram()
+ {
+ std::string script = _tabsMgr->getActualDiagramScript();
+ cout<<"RaC wxGUIEditorGraphicBBS::executeActualDiagram SCRIPT"<<endl;
+ cout<<script<<endl;
+
+
+ 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:/RaC/CREATIS/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::executeActualDiagram %s \n" , command.c_str() );
+ system( command.c_str() );
+ }
+
+ //=========================================================================
+