X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03647350fc7cd141953c72e0284e928847d30f44..d642db66a5efc82d374b813022c72ba88bc50839:/include/wx/gtk/print.h?ds=sidebyside diff --git a/include/wx/gtk/print.h b/include/wx/gtk/print.h index de57b60979..180d0c6e88 100644 --- a/include/wx/gtk/print.h +++ b/include/wx/gtk/print.h @@ -3,7 +3,7 @@ // Author: Anthony Bretaudeau // Purpose: GTK printing support // Created: 2007-08-25 -// RCS-ID: $Id: print.h,v 1 2007-08-25 05:44:44 PC Exp $ +// RCS-ID: $Id$ // Copyright: (c) Anthony Bretaudeau // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// @@ -19,8 +19,6 @@ #include "wx/printdlg.h" #include "wx/prntbase.h" #include "wx/dc.h" -#include "wx/cairo.h" - typedef struct _GtkPrintOperation GtkPrintOperation; typedef struct _GtkPrintContext GtkPrintContext; @@ -196,8 +194,8 @@ public: GtkPrintSettings* GetPrintConfig() { return m_config; } void SetPrintConfig( GtkPrintSettings * config ); - void SetPrintJob( GtkPrintOperation *job ) { m_job = job; } GtkPrintOperation* GetPrintJob() { return m_job; } + void SetPrintJob(GtkPrintOperation *job) { m_job = job; } GtkPrintContext *GetPrintContext() { return m_context; } void SetPrintContext(GtkPrintContext *context) {m_context = context; } @@ -207,6 +205,8 @@ public: void SetPageSetupToSettings(GtkPrintSettings* settings, GtkPageSetup* page_setup); private: + // NB: m_config is created and owned by us, but the other objects are not + // and their accessors don't change their ref count. GtkPrintSettings *m_config; GtkPrintOperation *m_job; GtkPrintContext *m_context; @@ -228,7 +228,8 @@ public: bool IsOk() const; virtual void* GetCairoContext() const; - + virtual void* GetHandle() const; + bool CanDrawBitmap() const { return true; } void Clear(); void SetFont( const wxFont& font ); @@ -250,7 +251,7 @@ public: void SetPalette(const wxPalette& WXUNUSED(palette)) { } void SetResolution(int ppi); - // overriden for wxPrinterDC Impl + // overridden for wxPrinterDC Impl virtual int GetResolution() const; virtual wxRect GetPaperRect() const; @@ -265,9 +266,9 @@ protected: void DoDrawArc(wxCoord x1,wxCoord y1,wxCoord x2,wxCoord y2,wxCoord xc,wxCoord yc); void DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea); void DoDrawPoint(wxCoord x, wxCoord y); - void DoDrawLines(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0); - void DoDrawPolygon(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle=wxODDEVEN_RULE); - void DoDrawPolyPolygon(int n, int count[], wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle=wxODDEVEN_RULE); + void DoDrawLines(int n, const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0); + void DoDrawPolygon(int n, const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle=wxODDEVEN_RULE); + void DoDrawPolyPolygon(int n, const int count[], const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle=wxODDEVEN_RULE); void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height); void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20.0); void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);