X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c8ddadff843cef0534220bf5561f095a59a57ea4..cf2918d40e990646a1277ba67a029cafe9e0fec8:/include/wx/gtk/gnome/gprint.h diff --git a/include/wx/gtk/gnome/gprint.h b/include/wx/gtk/gnome/gprint.h index 4386f99305..0901dae2e7 100644 --- a/include/wx/gtk/gnome/gprint.h +++ b/include/wx/gtk/gnome/gprint.h @@ -91,7 +91,11 @@ public: virtual wxPageSetupDialogBase *CreatePageSetupDialog( wxWindow *parent, wxPageSetupDialogData * data = NULL ); +#if wxUSE_NEW_DC + virtual wxDCImpl* CreatePrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data ); +#else virtual wxDC* CreatePrinterDC( const wxPrintData& data ); +#endif virtual bool HasPrintSetupDialog(); virtual wxDialog *CreatePrintSetupDialog( wxWindow *parent, wxPrintData *data ); @@ -207,11 +211,20 @@ private: // wxGnomePrinterDC //----------------------------------------------------------------------------- -class wxGnomePrinterDC: public wxDC +#if wxUSE_NEW_DC +class wxGnomePrinterDCImpl : public wxDCImpl +#else +#define wxGnomePrinterDCImpl wxGnomePrinterDC +class wxGnomePrinterDC : public wxDC +#endif { public: +#if wxUSE_NEW_DC + wxGnomePrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data ); +#else wxGnomePrinterDC( const wxPrintData& data ); - virtual ~wxGnomePrinterDC(); +#endif + virtual ~wxGnomePrinterDCImpl(); bool Ok() const { return IsOk(); } bool IsOk() const; @@ -235,8 +248,6 @@ public: virtual int GetDepth() const { return 24; } void SetBackgroundMode(int WXUNUSED(mode)) { } void SetPalette(const wxPalette& WXUNUSED(palette)) { } - static void SetResolution(int ppi); - static int GetResolution(); protected: bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, int style=wxFLOOD_SURFACE ); @@ -254,7 +265,7 @@ protected: void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height); #if wxUSE_SPLINES void DoDrawSpline(const wxPointList *points); -#endif +#endif bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, wxDC *source, wxCoord xsrc, wxCoord ysrc, int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord); @@ -263,7 +274,10 @@ protected: void DoDrawText(const wxString& text, wxCoord x, wxCoord y ); void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle); void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height); - void DoSetClippingRegionAsRegion( const wxRegion &WXUNUSED(clip) ) { } + void DoSetDeviceClippingRegion( const wxRegion &WXUNUSED(clip) ) + { + wxFAIL_MSG( "not implemented" ); + } void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y, wxCoord *descent = (wxCoord *) NULL, wxCoord *externalLeading = (wxCoord *) NULL, @@ -274,6 +288,10 @@ protected: void SetPrintData(const wxPrintData& data); wxPrintData& GetPrintData() { return m_printData; } + // overriden for wxPrinterDC Impl + virtual wxRect GetPaperRect() const; + virtual int GetResolution() const; + private: wxPrintData m_printData; PangoContext *m_context; @@ -283,7 +301,7 @@ private: unsigned char m_currentRed; unsigned char m_currentGreen; unsigned char m_currentBlue; - + double m_pageHeight; GnomePrintContext *m_gpc; @@ -292,8 +310,8 @@ private: void makeEllipticalPath(wxCoord x, wxCoord y, wxCoord width, wxCoord height); private: - DECLARE_DYNAMIC_CLASS(wxGnomePrinterDC) - DECLARE_NO_COPY_CLASS(wxGnomePrinterDC) + DECLARE_DYNAMIC_CLASS(wxGnomePrinterDCImpl) + DECLARE_NO_COPY_CLASS(wxGnomePrinterDCImpl) }; // ----------------------------------------------------------------------------