X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c0c133e13b36a923c65f94499554e432bc3a0daa..3e33568e0bd8416417916d194fc9a50cab9636bf:/include/wx/richtext/richtextprint.h?ds=sidebyside diff --git a/include/wx/richtext/richtextprint.h b/include/wx/richtext/richtextprint.h index dc7b0c2ac9..5dceccf319 100644 --- a/include/wx/richtext/richtextprint.h +++ b/include/wx/richtext/richtextprint.h @@ -3,7 +3,6 @@ // Purpose: Rich text printing classes // Author: Julian Smart // Created: 2006-10-23 -// RCS-ID: $Id$ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -107,7 +106,7 @@ private: class WXDLLIMPEXP_RICHTEXT wxRichTextPrintout : public wxPrintout { public: - wxRichTextPrintout(const wxString& title = wxT("Printout")); + wxRichTextPrintout(const wxString& title = wxGetTranslation("Printout")); virtual ~wxRichTextPrintout(); /// The buffer to print @@ -145,6 +144,7 @@ private: int m_numPages; wxArrayInt m_pageBreaksStart; wxArrayInt m_pageBreaksEnd; + wxArrayInt m_pageYOffsets; int m_marginLeft, m_marginTop, m_marginRight, m_marginBottom; wxRichTextHeaderFooterData m_headerFooterData; @@ -160,16 +160,20 @@ private: class WXDLLIMPEXP_RICHTEXT wxRichTextPrinting : public wxObject { public: - wxRichTextPrinting(const wxString& name = wxT("Printing"), wxWindow *parentWindow = NULL); + wxRichTextPrinting(const wxString& name = wxGetTranslation("Printing"), wxWindow *parentWindow = NULL); virtual ~wxRichTextPrinting(); /// Preview the file or buffer +#if wxUSE_FFILE && wxUSE_STREAMS bool PreviewFile(const wxString& richTextFile); +#endif bool PreviewBuffer(const wxRichTextBuffer& buffer); /// Print the file or buffer - bool PrintFile(const wxString& richTextFile); - bool PrintBuffer(const wxRichTextBuffer& buffer); +#if wxUSE_FFILE && wxUSE_STREAMS + bool PrintFile(const wxString& richTextFile, bool showPrintDialog = true); +#endif + bool PrintBuffer(const wxRichTextBuffer& buffer, bool showPrintDialog = true); /// Shows page setup dialog void PageSetup(); @@ -201,7 +205,7 @@ public: /// Set print and page setup data void SetPrintData(const wxPrintData& printData); - void SetPageSetupData(const wxPageSetupData& pageSetupData); + void SetPageSetupData(const wxPageSetupDialogData& pageSetupData); /// Set the rich text buffer pointer, deleting the existing object if present void SetRichTextBufferPreview(wxRichTextBuffer* buf); @@ -225,7 +229,7 @@ public: protected: virtual wxRichTextPrintout *CreatePrintout(); virtual bool DoPreview(wxRichTextPrintout *printout1, wxRichTextPrintout *printout2); - virtual bool DoPrint(wxRichTextPrintout *printout); + virtual bool DoPrint(wxRichTextPrintout *printout, bool showPrintDialog); private: wxPrintData* m_printData;