X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b42468496c00cc7384234093227c03edcf04d84c..04fa04d8067d235ab45b5bc05b65f0679634b541:/src/html/helpctrl.cpp diff --git a/src/html/helpctrl.cpp b/src/html/helpctrl.cpp index d093b99b73..66c903a364 100644 --- a/src/html/helpctrl.cpp +++ b/src/html/helpctrl.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: helpctrl.cpp +// Name: src/html/helpctrl.cpp // Purpose: wxHtmlHelpController // Notes: Based on htmlhelp.cpp, implementing a monolithic // HTML Help controller class, by Vaclav Slavik @@ -52,6 +52,7 @@ wxHtmlHelpController::wxHtmlHelpController(int style, wxWindow* parentWindow): #endif // wxUSE_CONFIG m_titleFormat = _("Help: %s"); m_FrameStyle = style; + m_shouldPreventAppExit = false; } wxHtmlHelpController::~wxHtmlHelpController() @@ -105,6 +106,13 @@ void wxHtmlHelpController::OnCloseFrame(wxCloseEvent& evt) m_helpFrame = NULL; } +void wxHtmlHelpController::SetShouldPreventAppExit(bool enable) +{ + m_shouldPreventAppExit = enable; + if ( m_helpFrame ) + m_helpFrame->SetShouldPreventAppExit(enable); +} + void wxHtmlHelpController::SetTitleFormat(const wxString& title) { m_titleFormat = title; @@ -163,6 +171,7 @@ wxHtmlHelpFrame* wxHtmlHelpController::CreateHelpFrame(wxHtmlHelpData *data) #endif // wxUSE_CONFIG ); frame->SetTitleFormat(m_titleFormat); + frame->SetShouldPreventAppExit(m_shouldPreventAppExit); m_helpFrame = frame; return frame; }