X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d3c7fc996a73e9f6a83067bc28a3c5581a3fee65..82008f15b709fd4544468aec286663be1b24fc69:/include/wx/generic/dcpsg.h?ds=inline diff --git a/include/wx/generic/dcpsg.h b/include/wx/generic/dcpsg.h index 4debcc07e2..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; @@ -45,7 +46,8 @@ public: // Recommended destructor :-) 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;