X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FEditorGraphicBBS%2FbbsWxGUIEditorGraphic%2FwxGEditorTabPanel.cxx;h=7b9736e259d56fb183f6a5952a1b6b9c840ee1ed;hb=66d85963bdb3dea88f7d8e8931855d092629b37c;hp=5995ea2a9efa248796f8256b78f0b9366fe9fa4b;hpb=be7230c59a3a7d7aa5bfee591b35d31e5e7a93b3;p=bbtkGEditor.git diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx index 5995ea2..7b9736e 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx @@ -35,29 +35,32 @@ Version: $Revision$ #include "wxGEditorTabPanel.h" - +#include "creaWx.h" 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,10 @@ namespace bbtk { wxVtk3DBaseView *baseview = new wxVtk3DBaseView(this); baseview->Configure(); - _sceneManager=new wxVtkSceneManager(this,baseview,_id); - _panelAUIMgr->AddPane((wxWindow*)baseview->GetWxVTKRenderWindowInteractor(),wxAuiPaneInfo().Fixed().CenterPane()); +//EED02JUIN2010 + _panelAUIMgr->Update(); } @@ -79,7 +82,7 @@ namespace bbtk std::string packageName=""; std::string boxName=""; - wxString foo( wxT(data) ); + wxString foo( (data) ); char str[150]; strcpy( str, (const char*)foo.mb_str(wxConvUTF8) ); @@ -94,7 +97,6 @@ namespace bbtk _sceneManager->createGBlackBox(x,y,packageName, boxName); return true; - } //========================================================================= @@ -120,9 +122,16 @@ namespace bbtk //========================================================================= - std::string wxGEditorTabPanel::getDiagramScript() + std::string wxGEditorTabPanel::getDiagramBBS() { - return _sceneManager->getDiagramScript(); + return _sceneManager->getDiagramBBS(); + } + + //========================================================================= + + std::string wxGEditorTabPanel::saveComplexBoxBBS(std::string cbName,std::string cbAuthor,std::string cbCategory,std::string cbDescription) + { + return _sceneManager->saveComplexBoxBBS(cbName,cbAuthor,cbCategory,cbDescription); } //========================================================================= @@ -133,8 +142,98 @@ namespace bbtk } //========================================================================= + + void wxGEditorTabPanel::editDiagramParameters(wxVtkSceneManager* scene) + { + _panelsManager->editDiagramParameters(scene); + } + + //========================================================================= + + void wxGEditorTabPanel::deleteAllBoxes() + { + _sceneManager->deleteAllBoxes(); + } + + //========================================================================= + + void wxGEditorTabPanel::centerView() + { + _sceneManager->centerView(); + } + + //========================================================================= + + void wxGEditorTabPanel::saveDiagram(std::string &content) + { + _sceneManager->saveDiagram(content); + } + + //========================================================================= + + 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 -