#endif
#include "wx/html/helpfrm.h"
+#include "wx/html/helpctrl.h"
#include "wx/notebook.h"
#include "wx/imaglist.h"
#include "wx/treectrl.h"
public:
wxHtmlHelpHashData(int index, wxTreeItemId id) : wxObject()
{ m_Index = index; m_Id = id;}
+ ~wxHtmlHelpHashData() {}
int m_Index;
wxTreeItemId m_Id;
m_PagesHash = NULL;
m_UpdateContents = TRUE;
+ m_helpController = (wxHelpControllerBase*) NULL;
}
// Create: builds the GUI components.
wxHtmlHelpFrame::~wxHtmlHelpFrame()
{
- PopEventHandler(); // wxhtmlhelpcontroller
+ // PopEventHandler(); // wxhtmlhelpcontroller (not any more!)
delete m_ContentsImageList;
if (m_DataCreated)
delete m_Data;
if (m_NormalFonts) delete m_NormalFonts;
if (m_FixedFonts) delete m_FixedFonts;
+ if (m_PagesHash) delete m_PagesHash;
}
wxProgressDialog progress(_("Searching..."), _("No matching page found yet"),
status.GetMaxIndex(), this,
- wxPD_APP_MODAL | wxPD_CAN_ABORT | wxPD_AUTO_HIDE | wxGA_SMOOTH);
+ wxPD_APP_MODAL | wxPD_CAN_ABORT | wxPD_AUTO_HIDE);
while (status.IsActive()) {
curi = status.GetCurIndex();
"</body></html>"));
}
- void OnUpdate(wxCloseEvent& event)
+ void OnUpdate(wxCommandEvent& event)
{
UpdateTestWin();
}
{
if (m_Printer == NULL)
m_Printer = new wxHtmlEasyPrinting(_("Help Printing"), this);
- m_Printer -> PrintFile(m_HtmlWin -> GetOpenedPage());
+ if (!m_HtmlWin -> GetOpenedPage())
+ wxLogWarning(_("Cannot print empty page."));
+ else
+ m_Printer -> PrintFile(m_HtmlWin -> GetOpenedPage());
}
break;
#endif
if (m_Config)
WriteCustomization(m_Config, m_ConfigRoot);
+ if (m_helpController && m_helpController->IsKindOf(CLASSINFO(wxHtmlHelpController)))
+ {
+ ((wxHtmlHelpController*) m_helpController)->OnCloseFrame(evt);
+ }
+
evt.Skip();
}