#ifndef _WX_HTMPRINT_H_
#define _WX_HTMPRINT_H_
-#if defined(__GNUG__) && !defined(__APPLE__)
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "htmprint.h"
#endif
#include "wx/html/htmlcell.h"
#include "wx/html/winpars.h"
+#include "wx/html/htmlfilt.h"
#include "wx/print.h"
#include "wx/printdlg.h"
// portion of DC
//--------------------------------------------------------------------------------
-class WXDLLEXPORT wxHtmlDCRenderer : public wxObject
+class WXDLLIMPEXP_HTML wxHtmlDCRenderer : public wxObject
{
public:
wxHtmlDCRenderer();
//--------------------------------------------------------------------------------
// wxHtmlPrintout
-// This class is derived from standard wxWindows printout class
+// This class is derived from standard wxWidgets printout class
// and is used to print HTML documents.
//--------------------------------------------------------------------------------
-class WXDLLEXPORT wxHtmlPrintout : public wxPrintout
+class WXDLLIMPEXP_HTML wxHtmlPrintout : public wxPrintout
{
public:
wxHtmlPrintout(const wxString& title = wxT("Printout"));
bool HasPage(int page);
void GetPageInfo(int *minPage, int *maxPage, int *selPageFrom, int *selPageTo);
bool OnBeginDocument(int startPage, int endPage);
+ void OnPreparePrinting();
+
+ // Adds input filter
+ static void AddFilter(wxHtmlFilter *filter);
+
+ // Cleanup
+ static void CleanUpStatics();
private:
wxHtmlDCRenderer *m_Renderer, *m_RendererHdr;
float m_MarginTop, m_MarginBottom, m_MarginLeft, m_MarginRight, m_MarginSpace;
+ // list of HTML filters
+ static wxList m_Filters;
+
DECLARE_NO_COPY_CLASS(wxHtmlPrintout)
};
// stores page&printer settings in it.
//--------------------------------------------------------------------------------
-class WXDLLEXPORT wxHtmlEasyPrinting : public wxObject
+class WXDLLIMPEXP_HTML wxHtmlEasyPrinting : public wxObject
{
public:
- wxHtmlEasyPrinting(const wxString& name = wxT("Printing"), wxFrame *parent_frame = NULL);
+ wxHtmlEasyPrinting(const wxString& name = wxT("Printing"), wxWindow *parentWindow = NULL);
~wxHtmlEasyPrinting();
bool PreviewFile(const wxString &htmlfile);
void SetFonts(wxString normal_face, wxString fixed_face, const int *sizes = 0);
// Sets fonts to be used when displaying HTML page. (if size null then default sizes used)
- wxPrintData *GetPrintData() {return m_PrintData;}
+ wxPrintData *GetPrintData();
wxPageSetupDialogData *GetPageSetupData() {return m_PageSetupData;}
// return page setting data objects.
// (You can set their parameters.)
int *m_FontsSizes;
wxString m_FontFaceFixed, m_FontFaceNormal;
wxString m_Headers[2], m_Footers[2];
- wxFrame *m_Frame;
+ wxWindow *m_ParentWindow;
DECLARE_NO_COPY_CLASS(wxHtmlEasyPrinting)
};