X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e7445ff8ee26e39fab1e35455e1bef954bdf636f..235751501d3bb4141424cc08a7d88dd506746d18:/include/wx/generic/dcpsg.h diff --git a/include/wx/generic/dcpsg.h b/include/wx/generic/dcpsg.h index 7d9ea915f3..1958c18278 100644 --- a/include/wx/generic/dcpsg.h +++ b/include/wx/generic/dcpsg.h @@ -21,6 +21,7 @@ #include "wx/dialog.h" #include "wx/module.h" #include "wx/cmndata.h" +#include "wx/strvararg.h" extern WXDLLIMPEXP_DATA_CORE(int) wxPageNumber; @@ -43,9 +44,10 @@ public: wxPostScriptDC(const wxPrintData& printData); // Recommended destructor :-) - ~wxPostScriptDC(); + virtual ~wxPostScriptDC(); - virtual bool Ok() const; + virtual bool Ok() const { return IsOk(); } + virtual bool IsOk() const; bool CanDrawBitmap() const { return true; } @@ -84,15 +86,13 @@ public: static void SetResolution(int ppi); static int GetResolution(); - void PsPrintf( const wxChar* fmt, ... ); - void PsPrint( const char* psdata ); + WX_DEFINE_VARARG_FUNC_VOID(PsPrintf, DoPsPrintfFormat) + void PsPrint( const wxString& psdata ); void PsPrint( int ch ); -#if wxUSE_UNICODE - void PsPrint( const wxChar* psdata ) { PsPrint( wxConvUTF8.cWX2MB( psdata ) ); } -#endif - private: + void DoPsPrintfFormat(const wxChar *fmt, ... ); + static float ms_PSScaleFactor; protected: @@ -124,7 +124,7 @@ protected: void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y, wxCoord *descent = NULL, wxCoord *externalLeading = NULL, - wxFont *theFont = NULL) const; + const wxFont *theFont = NULL) const; void DoGetSize(int* width, int* height) const; void DoGetSizeMM(int *width, int *height) const;