/////////////////////////////////////////////////////////////////////////////
-// 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
// Author: Harm van der Heijden and Vaclav Slavik
-// RCS-ID: $Id$
// Copyright: (c) Harm van der Heijden and Vaclav Slavik
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
wxHtmlHelpController::wxHtmlHelpController(int style, wxWindow* parentWindow):
wxHelpControllerBase(parentWindow)
+{
+ Init(style);
+}
+
+wxHtmlHelpController::wxHtmlHelpController(wxWindow* parentWindow, int style):
+ wxHelpControllerBase(parentWindow)
+{
+ Init(style);
+}
+
+void wxHtmlHelpController::Init(int style)
{
m_helpWindow = NULL;
m_helpFrame = NULL;
#endif // wxUSE_CONFIG
m_titleFormat = _("Help: %s");
m_FrameStyle = style;
+ m_shouldPreventAppExit = false;
}
+
wxHtmlHelpController::~wxHtmlHelpController()
{
#if wxUSE_CONFIG
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;
#endif // wxUSE_CONFIG
);
frame->SetTitleFormat(m_titleFormat);
+ frame->SetShouldPreventAppExit(m_shouldPreventAppExit);
m_helpFrame = frame;
return frame;
}
helpWindow->SetController(this);
}
-void wxHtmlHelpController::SetFrameParameters(const wxString& title,
+void wxHtmlHelpController::SetFrameParameters(const wxString& titleFormat,
const wxSize& size,
const wxPoint& pos,
bool WXUNUSED(newFrameEachTime))
{
- SetTitleFormat(title);
+ SetTitleFormat(titleFormat);
wxHtmlHelpFrame* frame = wxDynamicCast(FindTopLevelWindow(), wxHtmlHelpFrame);
wxHtmlHelpDialog* dialog = wxDynamicCast(FindTopLevelWindow(), wxHtmlHelpDialog);
if (frame)