+void wxHtmlPrintout::CleanUpStatics()
+{
+ WX_CLEAR_LIST(wxList, m_Filters);
+}
+
+// Adds input filter
+void wxHtmlPrintout::AddFilter(wxHtmlFilter *filter)
+{
+ m_Filters.Append(filter);
+}
+
+bool
+wxHtmlPrintout::CheckFit(const wxSize& pageArea, const wxSize& docArea) const
+{
+ if ( docArea.x > pageArea.x )
+ {
+ wxMessageDialog
+ dlg
+ (
+ NULL,
+ wxString::Format
+ (
+ _("The document \"%s\" doesn't fit on the page "
+ "horizontally and will be truncated if printed.\n"
+ "\n"
+ "Would you like to proceed with printing it nevertheless?"),
+ GetTitle()
+ ),
+ _("Printing"),
+ wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION
+ );
+ dlg.SetExtendedMessage
+ (
+ _("If possible, try changing the layout parameters to "
+ "make the printout more narrow")
+ );
+ dlg.SetYesNoLabels(_("&Print"), _("&Cancel"));
+
+ if ( dlg.ShowModal() != wxID_YES )
+ return false;
+ }