X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FEditorGraphicBBS%2FbbsWxGUIEditorGraphic%2FwxTabPanelsManager.cxx;h=a1e42a01a27185087d1bf9cd40f96bd23f541a21;hb=5df801578dbf375c6f9f548ac94050a929e9346d;hp=2c5721dbe10fc2298037817ee655a16495625ccf;hpb=343ecf790a799b8089a6d13fec0192fd9ad71da1;p=bbtkGEditor.git diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx index 2c5721d..a1e42a0 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx @@ -44,9 +44,9 @@ namespace bbtk //========================================================================= wxTabPanelsManager::wxTabPanelsManager(wxGUIEditorGraphicBBS *parent) { - _parent = parent; - _lastId = 0; - _notebook = _parent->getAuiNotebook(); + _parent = parent; + _lastId = 0; + _notebook = _parent->getAuiNotebook(); addNewTab(); _notebook->Connect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED,wxAuiNotebookEventHandler(wxTabPanelsManager::OnTabChanged),0,this); } @@ -95,23 +95,23 @@ namespace bbtk //========================================================================= - std::string wxTabPanelsManager::getActualDiagramScript() + std::string wxTabPanelsManager::getActualDiagramBBS() { - return _actual->getDiagramScript(); + return _actual->getDiagramBBS(); } //========================================================================= - void wxTabPanelsManager::editBlackBox(GBlackBoxModel *bbmodel) + std::string wxTabPanelsManager::getActualComplexBoxBBS(std::string cbName,std::string cbAuthor,std::string cbCategory,std::string cbDescription) { - _parent->editBlackBox(bbmodel); + return _actual->saveComplexBoxBBS(cbName,cbAuthor,cbCategory,cbDescription); } //========================================================================= - void wxTabPanelsManager::editDiagramParameters(wxVtkSceneManager* scene) + void wxTabPanelsManager::editBlackBox(GBlackBoxModel *bbmodel) { - _parent->editDiagramParameters(scene); + _parent->editBlackBox(bbmodel); } //========================================================================= @@ -172,13 +172,31 @@ namespace bbtk //========================================================================= + void wxTabPanelsManager::copySelectedBBoxesToComplexDiagram() + { + std::map mapSelected = _actual->getSelectedObjects(); + addNewTab(); + setActualDiagramComplexBox(true); + _actual->addObjects(mapSelected); + _parent->refreshGUIControls(); + } + + //========================================================================= + + int wxTabPanelsManager::getNumActualSelectedObjects() + { + return _actual->getNumSelectedObjects(); + } + + //========================================================================= + void wxTabPanelsManager::OnTabChanged(wxAuiNotebookEvent& event) { int index = event.GetSelection(); wxGEditorTabPanel* tab =(wxGEditorTabPanel*)_notebook->GetPage(index); int id = tab->getPanelId(); _actual = _panels[id]; - _parent->refreshToolbar(); + _parent->refreshGUIControls(); } //=========================================================================