X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FEditorGraphicBBS%2FbbsWxGUIEditorGraphic%2FbbtkwxGUIEditorGraphicBBS.cxx;h=bf26a19399977d21321a5aa5325c7d5a6000586a;hb=0846876a83badbcceaa83f3e1562ef1708e0d7e0;hp=209007fc096074a549d862dc95c03921dcb5c862;hpb=a9060eb4ac36b5ad914a88ef59d75710ca26b2d2;p=bbtkGEditor.git diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx index 209007f..bf26a19 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx @@ -69,8 +69,8 @@ wxGUIEditorGraphicBBS::wxGUIEditorGraphicBBS(wxFrame *parent) : initToolbar(); initTabPanelsManager(); initPackageBrowser(); - initHelpHTMLBrowser(); - + // JGGR & CM initHelpHTMLBrowser(); + _helpHtmlBrowser = NULL; CreateStatusBar(); _frameAUIMgr->Update(); _actualPkgBrowserBoxName = ""; @@ -155,6 +155,7 @@ void wxGUIEditorGraphicBBS::initToolbar() { // connect command event handlers + Connect(ID_NEW, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(wxGUIEditorGraphicBBS::OnCreateNewTab)); Connect(ID_OPEN, wxEVT_COMMAND_TOOL_CLICKED, @@ -193,11 +194,11 @@ void wxGUIEditorGraphicBBS::initToolbar() { } //========================================================================= void wxGUIEditorGraphicBBS::initHelpHTMLBrowser() { - //TO FIX THE PATH OF BBTK BIN IN ORDER TO USE REGENERATE EXECUTABLES - //RegenerateAll(); + // JGRR & CM _helpHtmlBrowser = new WxGUIHtmlBrowser(this, wxSize(200, 0)); - _frameAUIMgr->AddPane(_helpHtmlBrowser, wxAuiPaneInfo().Right().MinSize( - 200, 200)); + + // EO JGRR & CM + } //========================================================================= @@ -893,10 +894,21 @@ void wxGUIEditorGraphicBBS::OnPlugPackage(wxCommandEvent& event) { //========================================================================= void wxGUIEditorGraphicBBS::OnEditConfig(wxCommandEvent& event) { printf("EED wxGUIEditorGraphicBBS::OnEditConfig ... not implemented ..\n"); -} -//========================================================================= -void wxGUIEditorGraphicBBS::OnShowHTMLDoc(wxCommandEvent& event) { - printf("EED wxGUIEditorGraphicBBS::OnShowHTMLDoc ... not implemented ..\n"); + } + //========================================================================= + + void wxGUIEditorGraphicBBS::OnShowHTMLDoc(wxCommandEvent& event) { + // JGRR & CM WH + if (_helpHtmlBrowser != NULL){ + _frameAUIMgr->DetachPane(_helpHtmlBrowser); + _helpHtmlBrowser->Destroy(); + } + initHelpHTMLBrowser(); + _frameAUIMgr->AddPane(_helpHtmlBrowser, wxAuiPaneInfo().Right().MinSize(200, 200)); + _frameAUIMgr->Update(); + refreshGUIControls(); + + // EO JGRR & CM WH } //========================================================================= void wxGUIEditorGraphicBBS::OnCreateIndex(wxCommandEvent& event) { @@ -909,6 +921,8 @@ void wxGUIEditorGraphicBBS::OnExit(wxCommandEvent& event) { Close(true); } + + //========================================================================= } // EO namespace bbtk