From 0846876a83badbcceaa83f3e1562ef1708e0d7e0 Mon Sep 17 00:00:00 2001 From: mouton <> Date: Wed, 23 May 2012 10:56:54 +0000 Subject: [PATCH] Documentation panel on the right of bbEditor as a menu option, for lake of use. --- .../bbtkwxGUIEditorGraphicBBS.cxx | 34 +++++++++++++------ .../bbtkwxGUIEditorGraphicBBS.h | 1 + 2 files changed, 25 insertions(+), 10 deletions(-) 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 diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.h b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.h index 8e29061..f14acf5 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.h +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.h @@ -50,6 +50,7 @@ #include "wxVtkSceneManager.h" #include "GlobalConstants.h" + #include "wxart_new.xpm" // JPR #include "wxart_open.xpm" #include "wxart_save.xpm" -- 2.45.0