]> Creatis software - bbtkGEditor.git/commitdiff
Exit menu option activated
authorcorredor <>
Tue, 30 Mar 2010 08:34:38 +0000 (08:34 +0000)
committercorredor <>
Tue, 30 Mar 2010 08:34:38 +0000 (08:34 +0000)
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx
lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.h

index 2d93e2fa7f454775d5d0b196e40184f3a80f31d9..8d8c5774f5e74919c41593bcaecc8b19f479750a 100644 (file)
@@ -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
 
index 91b9d50bd571a7b21efef4a3358b635b0ea1f483..a1b3878d127890ce2eac5624f8e00338a06f9cd6 100644 (file)
 #ifndef __WxGUIEditorGraphicBBS_h__
 #define __WxGUIEditorGraphicBBS_h__
 
+//Includes same project
+#include "wxTabPanelsManager.h"
+#include "wxart_new.xpm"
+
+//Includes creaMaracasVisu
+
+//Includes bbtk
+#include <bbtkWxGUIPackageBrowser2.h>
+#include <bbtkWxGUIHtmlBrowser.h>
+#include <bbtkBlackBoxDescriptor.h>
+
+//Includes vtk
+
+//Includes wxWidgets
 #include <wx/frame.h>
 #include <wx/aui/aui.h>
 #include <wx/aui/auibook.h>
-#include <bbtkWxGUIPackageBrowser2.h>
 #include <wx/panel.h>
 #include <wx/toolbar.h>
 #include <wx/bitmap.h>
 #include <wx/menu.h>
-#include "wxart_new.xpm"
 #include <wx/dnd.h>
 
-#include <bbtkBlackBoxDescriptor.h>
-
-#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;