X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FEditorGraphicBBS%2FbbsWxGUIEditorGraphic%2FbbtkwxGUIEditorGraphicBBS.cxx;h=0f87071f6fdadb24053f960ae8a0102ab488d2b9;hb=cef73d418644dcb545c7731df11c54146fe82174;hp=2d93e2fa7f454775d5d0b196e40184f3a80f31d9;hpb=c8402dc4438aae412055d54bacf221c1449a83d6;p=bbtkGEditor.git diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx index 2d93e2f..0f87071 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx @@ -66,7 +66,7 @@ namespace bbtk initToolbar(); initTabPanelsManager(); initPackageBrowser(); - + initHelpHTMLBrowser(); CreateStatusBar(); _frameAUIMgr->Update(); @@ -90,25 +90,22 @@ namespace bbtk //Adds a tool btn to the toolbar _toolbar->AddTool(wxID_NEW,_T("New"),bmp_new, wxNullBitmap, wxITEM_NORMAL,_T("New tab"), _T("Create a new panel tab")); - - //////////////////// - // TEMP to avoid drag and drop - - _toolbar->AddTool(15,_T("New Box"),bmp_new, wxNullBitmap, wxITEM_NORMAL,_T("New Box"), _T("Create a new Box")); - - - // - //////////////////// - _toolbar->SetMargins( 2, 2 ); _toolbar->Realize(); SetToolBar(_toolbar); // connect command event handlers Connect(wxID_NEW,wxEVT_COMMAND_TOOL_CLICKED,wxCommandEventHandler(wxGUIEditorGraphicBBS::OnToolLeftClick)); - Connect(15,wxEVT_COMMAND_TOOL_CLICKED,wxCommandEventHandler(wxGUIEditorGraphicBBS::OnToolLeftClick)); } + //========================================================================= + void wxGUIEditorGraphicBBS::initHelpHTMLBrowser() + { + //TO FIX THE PATH OF BBTK BIN IN ORDER TO USE REGENERATE EXECUTABLES + //RegenerateAll(); + _helpHtmlBrowser = new WxGUIHtmlBrowser(this,wxSize(200,0)); + _frameAUIMgr->AddPane(_helpHtmlBrowser,wxAuiPaneInfo().Right().MinSize(200,200)); + } //========================================================================= void wxGUIEditorGraphicBBS::initMenu() @@ -121,6 +118,8 @@ namespace bbtk helpMenu->Append(wxID_ABOUT, _T("&About..."), _T("About")); fileMenu->Append(wxID_EXIT, _T("E&xit"), _T("Exit")); + Connect(wxID_EXIT,wxEVT_COMMAND_MENU_SELECTED,wxCommandEventHandler(wxGUIEditorGraphicBBS::OnExit)); + // now append the freshly created menu to the menu bar... wxMenuBar *menuBar = new wxMenuBar(); menuBar->Append(fileMenu, _T("&File")); @@ -144,10 +143,107 @@ namespace bbtk { _pkgBrowser = new WxGUIPackageBrowser2(this); _pkgBrowser->IncludeAll(); - _frameAUIMgr->AddPane(_pkgBrowser,wxAuiPaneInfo().Left().MinSize(200,200).CloseButton(false)); + _frameAUIMgr->AddPane(_pkgBrowser,wxAuiPaneInfo().Left().MinSize(200,200).CloseButton(false)); + } + + //================================================================ + + void wxGUIEditorGraphicBBS::DoRegeneratePackageDoc( const std::string& pack ) + { + std::string mess("Regenerating doc for package '"); + if (pack!="-a"){ + mess += pack + "'"; + } + else + { + mess = "Regenerating doc for all packages"; + } + mess += " ... please wait"; + + SetStatusText( std2wx(mess) ); + + //BBTK_BUSY_CURSOR; + + std::string command; + #if defined(WIN32) + command = "\""; + #endif + command += ConfigurationFile::GetInstance().Get_bin_path(); + command += ConfigurationFile::GetInstance().Get_file_separator(); + command += "bbRegeneratePackageDoc"; + #if defined(WIN32) + command += "\""; + #endif + + command += " " + pack + " -q"; + bbtkMessage("debug",1,"Executing system command '"<addNewTab(); - break; - case 15 : - BlackBoxDescriptor* desc = _pkgBrowser->GetActualSelected(); - + break; } } + void wxGUIEditorGraphicBBS::OnExit(wxCommandEvent& event) + { + Close(true); + } + } // EO namespace bbtk