]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx
Bug #1760
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsWxGUIEditorGraphic / wxTabPanelsManager.cxx
index 6548a8d406b5317f12dc1bb081ce97d87de36b1c..6456c6a7685f198d7a41a3110a12bbb2c6eef792 100644 (file)
@@ -60,13 +60,14 @@ namespace bbtk
        //=========================================================================
        void wxTabPanelsManager::addNewTab(wxString tabName)
        {
-
                _lastId++;
-               wxGEditorTabPanel *newPanel         = new wxGEditorTabPanel(_notebook,_lastId);
+
+               //EED 13/10/2012                wxGEditorTabPanel *newPanel         = new wxGEditorTabPanel( _notebook,_lastId );
+               wxGEditorTabPanel *newPanel         = new wxGEditorTabPanel( _notebook,_lastId, _parent->GetBBTKFactory() );
+
                newPanel->setPanelsManager(this);
                _panels[_lastId]                    = newPanel;
                _actual                             = newPanel;
-
                _notebook->AddPage(newPanel, tabName  ,true);
        }
 
@@ -304,6 +305,20 @@ printf("wxTabPanelsManager::VerifyActualTabPanel  %d \n", this->_notebook->GetPa
            //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()
@@ -355,22 +370,18 @@ printf("wxTabPanelsManager::VerifyActualTabPanel  %d \n", this->_notebook->GetPa
         _actual->SetCategory( category );
     }
 
-
        //=========================================================================
     void wxTabPanelsManager::SetDescription(std::string description)
     {
         _actual->SetDescription( description );
     }
 
-
-
-
-
-
-
-
-
-
+       //=========================================================================
+       bool wxTabPanelsManager::TryToOpenScriptApplication(std::string packageName ,std::string boxType)
+    {
+        return _parent->TryToOpenScriptApplication( packageName, boxType );
+    }
+               
 }  // EO namespace bbtk
 
 // EOF