wxHtmlHelpController* GetController() const { return m_helpController; }
/// Sets the help controller associated with the window.
- void SetController(wxHtmlHelpController* controller) { m_helpController = controller; }
+ void SetController(wxHtmlHelpController* controller);
/// Returns the help window.
wxHtmlHelpWindow* GetHelpWindow() const { return m_HtmlHelpWin; }
{
if (m_Config)
WriteCustomization(m_Config, m_ConfigRoot);
-
+
evt.Skip();
OnQuit();
- m_helpWindow->SetController(NULL);
+ if ( m_helpWindow )
+ m_helpWindow->SetController(NULL);
m_helpWindow = NULL;
m_helpDialog = NULL;
m_helpFrame = NULL;
m_helpController = (wxHtmlHelpController*) NULL;
}
+void wxHtmlHelpFrame::SetController(wxHtmlHelpController* controller)
+{
+ m_helpController = controller;
+ if ( m_HtmlHelpWin )
+ m_HtmlHelpWin->SetController(controller);
+}
+
// Create: builds the GUI components.
bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id,
const wxString& WXUNUSED(title), int style,
wxConfigBase *config, const wxString& rootpath)
{
m_HtmlHelpWin = new wxHtmlHelpWindow(m_Data);
+ m_HtmlHelpWin->SetController(m_helpController);
if ( config)
m_HtmlHelpWin->UseConfig(config, rootpath);
wxHtmlHelpWindow::~wxHtmlHelpWindow()
{
+ if ( m_helpController )
+ m_helpController->SetHelpWindow(NULL);
+
delete m_mergedIndex;
// PopEventHandler(); // wxhtmlhelpcontroller (not any more!)