X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FEditorGraphicBBS%2FbbsWxGUIEditorGraphic%2FwxGEditorTabPanel.cxx;h=bf67893b2b439232c248e0baa639a71baba26800;hb=b184acbd5222d80d87287b1de3ef085cfbdd83a3;hp=a82b584fb34160f05bda958c80e3aeb9026de026;hpb=eb765b17b9d4f6952a565569f89e3bc9204f9c6e;p=bbtkGEditor.git diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx index a82b584..bf67893 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx @@ -39,25 +39,28 @@ Version: $Revision$ namespace bbtk { + //========================================================================= wxGEditorTabPanel::wxGEditorTabPanel() { + printf ("EED %p wxGEditorTabPanel 1 ()\n" , this ); } //========================================================================= wxGEditorTabPanel::wxGEditorTabPanel(wxWindow *parent,int id):wxPanel(parent),wxTextDropTarget() { + printf ("EED %p wxGEditorTabPanel 2 ()\n" , this ); _id=id; _panelAUIMgr = new wxAuiManager(this); _sceneManager = NULL; - initWxVtkCanvas(); } //========================================================================= wxGEditorTabPanel::~wxGEditorTabPanel() { - _sceneManager->disconnectDrop(); +printf ("EED %p ~wxGEditorTabPanel()\n" , this ); +//ED02JUIN2010 _sceneManager->disconnectDrop(); } //========================================================================= @@ -65,10 +68,12 @@ namespace bbtk { wxVtk3DBaseView *baseview = new wxVtk3DBaseView(this); baseview->Configure(); - _sceneManager=new wxVtkSceneManager(this,baseview,_id); + printf("RaC-EED 21-06-2010 wxGEditorTabPanel::initWxVtkCanvas Remove the panelAUIMgr, and change to a normal sizer inside the wxGEditorTabPanel\n"); _panelAUIMgr->AddPane((wxWindow*)baseview->GetWxVTKRenderWindowInteractor(),wxAuiPaneInfo().Fixed().CenterPane()); +//EED02JUIN2010 + _panelAUIMgr->Update(); } @@ -119,23 +124,23 @@ namespace bbtk //========================================================================= - std::string wxGEditorTabPanel::getDiagramScript() + std::string wxGEditorTabPanel::getDiagramBBS() { - return _sceneManager->getDiagramScript(); + return _sceneManager->getDiagramBBS(); } //========================================================================= - void wxGEditorTabPanel::editBlackBox(GBlackBoxModel *bbmodel) + std::string wxGEditorTabPanel::saveComplexBoxBBS(std::string cbName,std::string cbAuthor,std::string cbCategory,std::string cbDescription) { - _panelsManager->editBlackBox(bbmodel); + return _sceneManager->saveComplexBoxBBS(cbName,cbAuthor,cbCategory,cbDescription); } //========================================================================= - - void wxGEditorTabPanel::editDiagramParameters(wxVtkSceneManager* scene) + + void wxGEditorTabPanel::editBlackBox(GBlackBoxModel *bbmodel) { - _panelsManager->editDiagramParameters(scene); + _panelsManager->editBlackBox(bbmodel); } //========================================================================= @@ -161,6 +166,69 @@ namespace bbtk //========================================================================= + void wxGEditorTabPanel::loadDiagram(ifstream &inputStream) + { + _sceneManager->loadDiagram(inputStream); + } + + //========================================================================= + + int wxGEditorTabPanel::getPanelId() + { + return _id; + } + + //========================================================================= + + bool wxGEditorTabPanel::isComplexBox() + { + return _sceneManager->isComplexBox(); + } + + //========================================================================= + + void wxGEditorTabPanel::setComplexBox(bool val) + { + _sceneManager->setComplexBox(val); + } + + //========================================================================= + + void wxGEditorTabPanel::addComplexInputPort(std::string portName) + { + _sceneManager->createGComplexBoxInputPort(portName); + } + + //========================================================================= + + void wxGEditorTabPanel::addComplexOutputPort(std::string portName) + { + _sceneManager->createGComplexBoxOutputPort(portName); + } + + //========================================================================= + + std::map wxGEditorTabPanel::getSelectedObjects() + { + return _sceneManager->getSelectedObjects(); + } + + //========================================================================= + + void wxGEditorTabPanel::addObjects(std::map objectsMap) + { + _sceneManager->addObjects(objectsMap); + } + + //========================================================================= + + int wxGEditorTabPanel::getNumSelectedObjects() + { + return _sceneManager->getNumSelectedObjects(); + } + + //========================================================================= + } // EO namespace bbtk // EOF