From: corredor <> Date: Tue, 30 Mar 2010 08:34:38 +0000 (+0000) Subject: Exit menu option activated X-Git-Tag: v1_0_0~116 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=aba99a619bc99b4a4e58267f700958d4745659bf;p=bbtkGEditor.git Exit menu option activated --- diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx index 2d93e2f..8d8c577 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(); @@ -109,6 +109,13 @@ namespace bbtk Connect(15,wxEVT_COMMAND_TOOL_CLICKED,wxCommandEventHandler(wxGUIEditorGraphicBBS::OnToolLeftClick)); } + //========================================================================= + void wxGUIEditorGraphicBBS::initHelpHTMLBrowser() + { + + _helpHtmlBrowser = new WxGUIHtmlBrowser(this,wxSize(200,0)); + _frameAUIMgr->AddPane(_helpHtmlBrowser,wxAuiPaneInfo().Right().MinSize(200,200)); + } //========================================================================= void wxGUIEditorGraphicBBS::initMenu() @@ -121,6 +128,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,8 +153,7 @@ 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)); } /***************************************************** @@ -166,6 +174,11 @@ namespace bbtk } } + 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 91b9d50..a1b3878 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.h +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.h @@ -43,21 +43,29 @@ #ifndef __WxGUIEditorGraphicBBS_h__ #define __WxGUIEditorGraphicBBS_h__ +//Includes same project +#include "wxTabPanelsManager.h" +#include "wxart_new.xpm" + +//Includes creaMaracasVisu + +//Includes bbtk +#include +#include +#include + +//Includes vtk + +//Includes wxWidgets #include #include #include -#include #include #include #include #include -#include "wxart_new.xpm" #include -#include - -#include "wxTabPanelsManager.h" - namespace bbtk { @@ -71,8 +79,10 @@ namespace bbtk void initMenu(); void initTabPanelsManager(); void initPackageBrowser(); + void initHelpHTMLBrowser(); void OnToolLeftClick(wxCommandEvent& event); + void OnExit(wxCommandEvent& event); private: @@ -80,6 +90,7 @@ namespace bbtk wxTabPanelsManager *_tabsMgr; wxAuiNotebook *_notebook; WxGUIPackageBrowser2 *_pkgBrowser; + WxGUIHtmlBrowser *_helpHtmlBrowser; std::string _dataDir;