X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FEditorGraphicBBS%2FbbsWxGUIEditorGraphic%2FwxGEditorTabPanel.cxx;h=3171eb227cb86bdcf9563d09c860c36acdded80d;hb=3babfd57a9b4b3cffba34415e928239592e7d4a1;hp=93653067a8b58e6dfb875614cd0d30aeb10fa1cb;hpb=1910361932998533c37b53ea81d580bba29f0ee1;p=bbtkGEditor.git diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx index 9365306..3171eb2 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx @@ -45,7 +45,7 @@ namespace bbtk } //========================================================================= - wxGEditorTabPanel::wxGEditorTabPanel(wxWindow *parent,int id):wxPanel(parent) + wxGEditorTabPanel::wxGEditorTabPanel(wxWindow *parent,int id):wxPanel(parent),wxTextDropTarget() { _id=id; _panelAUIMgr = new wxAuiManager(this); @@ -57,6 +57,7 @@ namespace bbtk //========================================================================= wxGEditorTabPanel::~wxGEditorTabPanel() { + _sceneManager->disconnectDrop(); } //========================================================================= @@ -64,7 +65,8 @@ namespace bbtk { wxVtk3DBaseView *baseview = new wxVtk3DBaseView(this); baseview->Configure(); - _sceneManager=new wxVtkSceneManager(baseview,_id); + + _sceneManager=new wxVtkSceneManager(this,baseview,_id); _panelAUIMgr->AddPane((wxWindow*)baseview->GetWxVTKRenderWindowInteractor(),wxAuiPaneInfo().Fixed().CenterPane()); _panelAUIMgr->Update(); @@ -74,10 +76,46 @@ namespace bbtk bool wxGEditorTabPanel::OnDropText(wxCoord x, wxCoord y, const wxString& data) { + std::string packageName=""; + std::string boxName=""; + + wxString foo( wxT(data) ); + char str[150]; + strcpy( str, (const char*)foo.mb_str(wxConvUTF8) ); + + char delims[] = ":"; + char *result = NULL; + result = strtok( str, delims ); + packageName += result; + + result = strtok( NULL, delims ); + boxName += result; + + _sceneManager->createGBlackBox(x,y,packageName, boxName); - cout<<"RaC DyD:"<displayBlackBoxInfo(packageName,boxName); + } + + //========================================================================= + + void wxGEditorTabPanel::updateStatusBar(std::string textStatus) + { + _panelsManager->updateStatusBar(textStatus); } //=========================================================================