+ //=========================================================================
+
+ void wxTabPanelsManager::OnTabClose(wxAuiNotebookEvent& event)
+ {
+
+ std::cout<<"RaC wxTabPanelsManager::OnTabClose Start... "<<_panels.size()<<std::endl;
+ int index = event.GetSelection();
+
+ if(_panels.size()>0)
+ {
+ wxGEditorTabPanel* tab = (wxGEditorTabPanel*)_notebook->GetPage(index);
+ int id = tab->getPanelId();
+ tab->deleteAllBoxes();
+ _panels.erase(id);
+
+ _notebook->RemovePage(index);
+
+ std::cout<<"RaC wxTabPanelsManager::OnTabClose IMPORTANT. The complete tab is not erased from memory... "<<std::endl;
+ //////////////////////////////
+ // TO FIX . RaC May 2012 - IMPORTANT. The complete tab is not erased from memory.
+ // Only the objects are deleted and the tab is hidden
+ // Execution problems when a tab is deleted using delete or DeletePage
+ // delete tab;
+
+ map<int, wxGEditorTabPanel*>::iterator it = _panels.begin() ;
+ _actual=(*it).second;
+
+ std::cout<<"RaC wxTabPanelsManager::OnTabClose End..."<< std::endl;
+ }
+ }
+
+ //=========================================================================
+ std::string wxTabPanelsManager::GetCbName()
+ {
+ return _actual->GetCbName();
+ }
+
+ //=========================================================================
+ void wxTabPanelsManager::SetNameTabPanel(wxString tabpanelname)
+ {
+ int id = _notebook->GetSelection();
+ _notebook->SetPageText( id , tabpanelname );
+ }
+
+ std::string wxTabPanelsManager::GetNameTabPanel()
+ {
+ int id = _notebook->GetSelection();
+ return crea::wx2std(_notebook->GetPageText(id));
+ }
+
+ //=========================================================================
+ //DFCH
+ std::string wxTabPanelsManager::GetCurrentTabPanelPath( )
+ {
+ int id = _notebook->GetSelection();
+ wxGEditorTabPanel* auxPanel = (wxGEditorTabPanel*) _notebook->GetPage(id);
+ return( auxPanel->GetFullPath( ) );
+ //return ( (wxGEditorTabPanel) _notebook->GetPage(id)->GetFullPath( ) );
+ }
+
+ //=========================================================================
+
+ int wxTabPanelsManager::FindTab(std::string filename)
+ {
+ std::map<int, wxGEditorTabPanel*>::iterator it;
+ for (it = _panels.begin(); it != _panels.end(); ++it)
+ {
+ wxGEditorTabPanel *obj = it->second;
+ int id = it->first;
+ if(obj->GetFullPath()==filename)
+ return id;
+ }
+ return -1;
+ }
+
+ //=========================================================================
+ std::string wxTabPanelsManager::GetCbPackageName()
+ {
+ return _actual->GetCbPackageName();
+ }
+
+ //=========================================================================
+ std::string wxTabPanelsManager::GetAuthor()
+ {
+ return _actual->GetAuthor();
+ }
+
+ //=========================================================================
+ std::string wxTabPanelsManager::GetDescription()
+ {
+ return _actual->GetDescription();
+ }
+
+ //=========================================================================
+ std::string wxTabPanelsManager::GetCategory()
+ {
+ return _actual->GetCategory();
+ }
+
+ //=========================================================================
+ std::string wxTabPanelsManager::GetMessageKind()
+ {
+ return _actual->GetMessageKind();
+ }
+
+ //=========================================================================
+ std::string wxTabPanelsManager::GetMessageLevel()
+ {
+ return _actual->GetMessageLevel();
+ }
+
+ //=========================================================================
+ void wxTabPanelsManager::SetCbName(std::string cbName)
+ {
+ _actual->SetCbName( cbName );
+ }
+
+ //=========================================================================
+ void wxTabPanelsManager::SetCbPackageName(std::string packagename)
+ {
+ _actual->SetCbPackageName( packagename );
+ }
+
+
+ //=========================================================================
+ void wxTabPanelsManager::SetAuthor(std::string author)
+ {
+ _actual->SetAuthor( author );
+ }
+
+
+ //=========================================================================
+ void wxTabPanelsManager::SetCategory(std::string category)
+ {
+ _actual->SetCategory( category );
+ }
+
+ //=========================================================================
+ void wxTabPanelsManager::SetDescription(std::string description)
+ {
+ _actual->SetDescription( description );
+ }
+
+
+ //=========================================================================
+ void wxTabPanelsManager::SetMessageKind(std::string kind){
+ _actual->SetMessageKind(kind);
+ }
+
+
+ //=========================================================================
+ void wxTabPanelsManager::SetMessageLevel(std::string level){
+ _actual->SetMessageLevel(level);
+ }
+
+ //=========================================================================
+ bool wxTabPanelsManager::TryToOpenScriptApplication(std::string packageName ,std::string boxType)
+ {
+ return _parent->TryToOpenScriptApplication( packageName, boxType );
+ }
+