X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FEditorGraphicBBS%2FbbsWxGUIEditorGraphic%2FbbtkwxGUIEditorGraphicBBS.cxx;h=a26f9ddf12a32ba145b9b6f468d54cae00dd5c61;hb=9c270766f2c28346e128543a8b7c24fb7f4f5b85;hp=af3e5ce7d1e592f1ebddd3f15cc0c8e569f48a21;hpb=de7c0454ab8fc1b0b97dcd7112dfdb4a55ac0215;p=bbtkGEditor.git diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx index af3e5ce..a26f9dd 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx @@ -45,10 +45,10 @@ namespace bbtk { //========================================================================= -wxGUIEditorGraphicBBS::wxGUIEditorGraphicBBS(wxFrame *parent) : - wxFrame(parent, -1, _T("bbtkGEditor"), wxDefaultPosition, wxSize( - 1200, 800)) { - +wxGUIEditorGraphicBBS::wxGUIEditorGraphicBBS(wxFrame *parent) + : wxFrame( parent, -1, _T("bbtkGEditor"), wxDefaultPosition, wxSize(1200,800) ) +{ + _pkgBrowser = NULL; _frameAUIMgr = new wxAuiManager(this); /*std::string datadir( crea::System::GetExecutablePath() ); @@ -69,8 +69,8 @@ wxGUIEditorGraphicBBS::wxGUIEditorGraphicBBS(wxFrame *parent) : initMenu(); initToolbar(); - initTabPanelsManager(); initPackageBrowser(); + initTabPanelsManager(); // JGGR & CM initHelpHTMLBrowser(); _helpHtmlBrowser = NULL; CreateStatusBar(); @@ -430,16 +430,22 @@ wxAuiNotebook* wxGUIEditorGraphicBBS::getAuiNotebook() { //================================================================ -void wxGUIEditorGraphicBBS::displayBlackBoxInfo(std::string packageName, - std::string boxName) { - if (_actualPkgBrowserPkgName != packageName || _actualPkgBrowserBoxName - != boxName) { +void wxGUIEditorGraphicBBS::displayBlackBoxInfo(std::string packageName, std::string boxName) +{ + if (_actualPkgBrowserPkgName != packageName || _actualPkgBrowserBoxName != boxName) + { _actualPkgBrowserPkgName = packageName; _actualPkgBrowserBoxName = boxName; - BlackBoxDescriptor::Pointer descriptor = - GObjectsMVCFactory::getInstance()->getBlackBoxDescriptor( - packageName, boxName); +//EED 15 oct 2012 BlackBoxDescriptor::Pointer descriptor = GObjectsMVCFactory::getInstance()->getBlackBoxDescriptor(packageName, boxName); + + Package::Pointer k; + BlackBoxDescriptor::Pointer descriptor; + std::map< std::string, BlackBoxDescriptor::Pointer> mapDesc; + k = _pkgBrowser->GetFactory()->GetPackage(packageName); + mapDesc = k->GetDescriptorMap(); + descriptor = mapDesc[boxName]; + _pkgBrowser->WxGUIBlackBoxListUserOnSelected(descriptor.get()); } } @@ -1004,7 +1010,9 @@ void wxGUIEditorGraphicBBS::OnClickBtnBox(wxCommandEvent& event) { if (pnl != NULL) { wxVtkSceneManager *scn = pnl->getSceneManager(); +printf("EED wxGUIEditorGraphicBBS::OnClickBtnBox 1.\n"); scn->createGBlackBox(50, 50, packageName, typeName); +printf("EED wxGUIEditorGraphicBBS::OnClickBtnBox 2.\n"); scn->refresh(); } @@ -1183,7 +1191,16 @@ void wxGUIEditorGraphicBBS::OnExit(wxCommandEvent& event) { Close(true); } -//========================================================================= +Factory::Pointer wxGUIEditorGraphicBBS::GetBBTKFactory() +{ + if (_pkgBrowser==NULL) + { + printf ("EED ERROR! wxGUIEditorGraphicBBS::GetBBTKFactory _pkgBrowser = NULL\n"); + } + return _pkgBrowser->GetFactory(); +} + + //========================================================================= void wxGUIEditorGraphicBBS::enableComplexBox() { _tabsMgr->setActualDiagramComplexBox(true); @@ -1240,6 +1257,7 @@ std::string wxGUIEditorGraphicBBS::getCurrentDiagramCategory() return _tabsMgr->GetCategory(); } + //========================================================================= bool wxGUIEditorGraphicBBS::isCurrentDiagramComplexBox()