More DC changes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49901 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2007-11-13 13:20:15 +00:00
parent 88fb99a262
commit c8ddadff84
8 changed files with 184 additions and 123 deletions

View File

@@ -41,6 +41,8 @@ class WXDLLIMPEXP_FWD_CORE wxPaintDC;
class WXDLLIMPEXP_FWD_CORE wxWindowDC;
class WXDLLIMPEXP_FWD_CORE wxScreenDC;
class WXDLLIMPEXP_FWD_CORE wxMemoryDC;
class WXDLLIMPEXP_FWD_CORE wxPrinterDC;
#include "wx/cmndata.h"
#else
class WXDLLIMPEXP_FWD_CORE wxDCBase;
#endif
@@ -131,6 +133,7 @@ public:
virtual wxImplDC* CreateMemoryDC( wxMemoryDC *owner, wxBitmap &bitmap ) = 0;
virtual wxImplDC* CreateMemoryDC( wxMemoryDC *owner, wxDC *dc ) = 0;
virtual wxImplDC* CreateScreenDC( wxScreenDC *owner ) = 0;
virtual wxImplDC* CreatePrinterDC( wxPrinterDC *owner, const wxPrintData &data ) = 0;
static void SetDCFactory( wxDCFactory *factory );
static wxDCFactory *GetFactory();
@@ -157,6 +160,7 @@ public:
virtual wxImplDC* CreateMemoryDC( wxMemoryDC *owner, wxBitmap &bitmap );
virtual wxImplDC* CreateMemoryDC( wxMemoryDC *owner, wxDC *dc );
virtual wxImplDC* CreateScreenDC( wxScreenDC *owner );
virtual wxImplDC* CreatePrinterDC( wxPrinterDC *owner, const wxPrintData &data );
};
//-----------------------------------------------------------------------------

View File

@@ -16,6 +16,34 @@
#if wxUSE_PRINTING_ARCHITECTURE
#if wxUSE_NEW_DC
#include "wx/dc.h"
//-----------------------------------------------------------------------------
// wxPrinterDC
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxPrinterImplDCBase
{
public:
wxPrinterImplDCBase() { }
virtual wxRect DoGetPaperRect() = 0;
};
class WXDLLIMPEXP_CORE wxPrinterDC: public wxDC
{
public:
wxPrinterDC( const wxPrintData& data );
wxRect GetPaperRect();
};
#else
#if defined(__WXPALMOS__)
#include "wx/palmos/dcprint.h"
#elif defined(__WXMSW__)
@@ -28,6 +56,7 @@
#include "wx/mac/dcprint.h"
#endif
#endif // wxUSE_NEW_DC
#endif // wxUSE_PRINTING_ARCHITECTURE
#endif
// _WX_DCPRINT_H_BASE_

View File

@@ -52,5 +52,6 @@ private:
#include "wx/os2/dcscreen.h"
#endif
#endif
// _WX_DCSCREEN_H_BASE_

View File

@@ -204,14 +204,14 @@ private:
};
//-----------------------------------------------------------------------------
// wxGnomePrintDC
// wxGnomePrinterDC
//-----------------------------------------------------------------------------
class wxGnomePrintDC: public wxDC
class wxGnomePrinterDC: public wxDC
{
public:
wxGnomePrintDC( const wxPrintData& data );
virtual ~wxGnomePrintDC();
wxGnomePrinterDC( const wxPrintData& data );
virtual ~wxGnomePrinterDC();
bool Ok() const { return IsOk(); }
bool IsOk() const;
@@ -254,7 +254,7 @@ protected:
void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
#if wxUSE_SPLINES
void DoDrawSpline(const wxPointList *points);
#endif // wxUSE_SPLINES
#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);
@@ -292,8 +292,8 @@ private:
void makeEllipticalPath(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
private:
DECLARE_DYNAMIC_CLASS(wxGnomePrintDC)
DECLARE_NO_COPY_CLASS(wxGnomePrintDC)
DECLARE_DYNAMIC_CLASS(wxGnomePrinterDC)
DECLARE_NO_COPY_CLASS(wxGnomePrinterDC)
};
// ----------------------------------------------------------------------------

View File

@@ -215,14 +215,14 @@ private:
};
//-----------------------------------------------------------------------------
// wxGtkPrintDC
// wxGtkPrinterDC
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxGtkPrintDC: public wxDC
class WXDLLIMPEXP_CORE wxGtkPrinterDC: public wxDC
{
public:
wxGtkPrintDC( const wxPrintData& data );
virtual ~wxGtkPrintDC();
wxGtkPrinterDC( const wxPrintData& data );
virtual ~wxGtkPrinterDC();
bool Ok() const { return IsOk(); }
bool IsOk() const;
@@ -267,7 +267,7 @@ protected:
void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
#if wxUSE_SPLINES
void DoDrawSpline(const wxPointList *points);
#endif // wxUSE_SPLINES
#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);
@@ -304,8 +304,8 @@ private:
double m_PS2DEV;
double m_DEV2PS;
DECLARE_DYNAMIC_CLASS(wxGtkPrintDC)
DECLARE_NO_COPY_CLASS(wxGtkPrintDC)
DECLARE_DYNAMIC_CLASS(wxGtkPrinterDC)
DECLARE_NO_COPY_CLASS(wxGtkPrinterDC)
};
// ----------------------------------------------------------------------------