X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1a5a83677555023d476401bab5809a1107222c74..4259a48e0b5799e015061f8e649ab54ad2d9dc7f:/include/wx/postscrp.h?ds=sidebyside diff --git a/include/wx/postscrp.h b/include/wx/postscrp.h index fb6cc90850..bd222d8715 100644 --- a/include/wx/postscrp.h +++ b/include/wx/postscrp.h @@ -9,8 +9,8 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __POSTSCRPH__ -#define __POSTSCRPH__ +#ifndef _WX_POSTSCRPH__ +#define _WX_POSTSCRPH__ #ifdef __GNUG__ #pragma interface "postscrp.h" @@ -18,10 +18,31 @@ #include "wx/dc.h" #include "wx/dialog.h" +#include "wx/module.h" -#if USE_POSTSCRIPT +#if wxUSE_POSTSCRIPT + +// A module to allow initialization/cleanup of PostScript-related +// things without calling these functions from app.cpp. + +class WXDLLEXPORT wxPostScriptModule: public wxModule +{ +DECLARE_DYNAMIC_CLASS(wxPostScriptModule) +public: + wxPostScriptModule() {} + bool OnInit(); + void OnExit(); +}; + +#if wxUSE_IOSTREAMH +# include +#else +# include +# ifdef _MSC_VER + using namespace std; +# endif +#endif -class WXDLLIMPORT ofstream; class WXDLLEXPORT wxPostScriptDC: public wxDC { DECLARE_DYNAMIC_CLASS(wxPostScriptDC) @@ -29,13 +50,13 @@ class WXDLLEXPORT wxPostScriptDC: public wxDC public: // Create a printer DC wxPostScriptDC(void); - wxPostScriptDC(const wxString& output, bool interactive = TRUE, wxWindow *parent = NULL); + wxPostScriptDC(const wxString& output, bool interactive = TRUE, wxWindow *parent = (wxWindow *) NULL); ~wxPostScriptDC(void); - bool Create(const wxString& output, bool interactive = TRUE, wxWindow *parent = NULL); + bool Create(const wxString& output, bool interactive = TRUE, wxWindow *parent = (wxWindow *) NULL); - virtual bool PrinterDialog(wxWindow *parent = NULL); + virtual bool PrinterDialog(wxWindow *parent = (wxWindow *) NULL); inline virtual void BeginDrawing(void) {} ; inline virtual void EndDrawing(void) {} ; @@ -62,20 +83,13 @@ class WXDLLEXPORT wxPostScriptDC: public wxDC void DrawRoundedRectangle(long x, long y, long width, long height, double radius = 20); void DrawEllipse(long x, long y, long width, long height); - // RR: I define these in wxDC, after all they all do the same everywhere - -#ifdef __WXMSW__ - // Splines - // 3-point spline - void DrawSpline(long x1, long y1, long x2, long y2, long x3, long y3); - // Any number of control points - a list of pointers to wxPoints void DrawSpline(wxList *points); - void DrawSpline(int n, wxPoint points[]); -#endif - - void DrawOpenSpline(wxList *points); void DrawIcon(const wxIcon& icon, long x, long y); +#ifdef __WXGTK__ + void DrawIcon(const wxIcon& icon, long x, long y, bool WXUNUSED(usemask) ) + { DrawIcon( icon, x, y ); } +#endif void DrawText(const wxString& text, long x, long y, bool use16 = FALSE); void Clear(void); @@ -95,8 +109,9 @@ class WXDLLEXPORT wxPostScriptDC: public wxDC long GetCharHeight(void); long GetCharWidth(void); void GetTextExtent(const wxString& string, long *x, long *y, - long *descent = NULL, long *externalLeading = NULL, - wxFont *theFont = NULL, bool use16 = FALSE); + long *descent = (long *) NULL, + long *externalLeading = (long *) NULL, + wxFont *theFont = (wxFont *) NULL, bool use16 = FALSE); virtual void SetLogicalOrigin(long x, long y); virtual void CalcBoundingBox(long x, long y); @@ -268,7 +283,7 @@ class WXDLLEXPORT wxPrintPaperType: public wxObject int heightPixels; char *pageName; - wxPrintPaperType(const char *name = NULL, int wmm = 0, int hmm = 0, int wp = 0, int hp = 0); + wxPrintPaperType(const char *name = (const char *) NULL, int wmm = 0, int hmm = 0, int wp = 0, int hp = 0); ~wxPrintPaperType(void); }; @@ -289,6 +304,6 @@ class WXDLLEXPORT wxPrintPaperDatabase: public wxList WXDLLEXPORT_DATA(extern wxPrintPaperDatabase*) wxThePrintPaperDatabase; -#endif // USE_POSTSCRIPT +#endif // wxUSE_POSTSCRIPT #endif - // __POSTSCRPH__ + // _WX_POSTSCRPH__