Further wxDC changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
|
||||
|
||||
#if wxUSE_NEW_DC
|
||||
class WXDLLIMPEXP_CORE wxGTKMemoryImplDC : public wxGTKWindowImplDC, public wxMemoryImplDCBase
|
||||
class WXDLLIMPEXP_CORE wxGTKMemoryImplDC : public wxGTKWindowImplDC
|
||||
#else
|
||||
#define wxGTKMemoryImplDC wxMemoryDC
|
||||
class WXDLLIMPEXP_CORE wxMemoryDC : public wxWindowDC, public wxMemoryDCBase
|
||||
@@ -48,19 +48,19 @@ public:
|
||||
virtual void SetTextForeground( const wxColour &col );
|
||||
virtual void SetTextBackground( const wxColour &col );
|
||||
|
||||
// implementation
|
||||
wxBitmap GetSelectedBitmap() const { return m_selected; }
|
||||
|
||||
protected:
|
||||
// overridden from wxImplDC
|
||||
virtual void DoGetSize( int *width, int *height ) const;
|
||||
virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const;
|
||||
|
||||
// overridden from wxMemoryImplDCBase
|
||||
// overridden for wxMemoryDC Impl
|
||||
virtual void DoSelect(const wxBitmap& bitmap);
|
||||
virtual const wxBitmap& DoGetSelectedBitmap() const;
|
||||
virtual wxBitmap& DoGetSelectedBitmap();
|
||||
|
||||
public:
|
||||
virtual const wxBitmap& GetSelectedBitmap() const;
|
||||
virtual wxBitmap& GetSelectedBitmap();
|
||||
|
||||
private:
|
||||
wxBitmap m_selected;
|
||||
|
||||
private:
|
||||
|
@@ -91,7 +91,11 @@ public:
|
||||
virtual wxPageSetupDialogBase *CreatePageSetupDialog( wxWindow *parent,
|
||||
wxPageSetupDialogData * data = NULL );
|
||||
|
||||
#if wxUSE_NEW_DC
|
||||
virtual wxImplDC* CreatePrinterImplDC( 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 wxGnomePrinterImplDC : public wxImplDC
|
||||
#else
|
||||
#define wxGnomePrinterImplDC wxGnomePrinterDC
|
||||
class wxGnomePrinterDC : public wxDC
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
#if wxUSE_NEW_DC
|
||||
wxGnomePrinterImplDC( wxPrinterDC *owner, const wxPrintData& data );
|
||||
#else
|
||||
wxGnomePrinterDC( const wxPrintData& data );
|
||||
virtual ~wxGnomePrinterDC();
|
||||
#endif
|
||||
virtual ~wxGnomePrinterImplDC();
|
||||
|
||||
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 );
|
||||
@@ -274,6 +285,10 @@ protected:
|
||||
void SetPrintData(const wxPrintData& data);
|
||||
wxPrintData& GetPrintData() { return m_printData; }
|
||||
|
||||
// overriden for wxPrinterDC Impl
|
||||
virtual wxRect GetPaperRect();
|
||||
virtual int GetResolution();
|
||||
|
||||
private:
|
||||
wxPrintData m_printData;
|
||||
PangoContext *m_context;
|
||||
@@ -292,8 +307,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(wxGnomePrinterImplDC)
|
||||
DECLARE_NO_COPY_CLASS(wxGnomePrinterImplDC)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -53,7 +53,11 @@ public:
|
||||
virtual wxPageSetupDialogBase *CreatePageSetupDialog( wxWindow *parent,
|
||||
wxPageSetupDialogData * data = NULL );
|
||||
|
||||
#if wxUSE_NEW_DC
|
||||
virtual wxImplDC* CreatePrinterImplDC( wxPrinterDC *owner, const wxPrintData& data );
|
||||
#else
|
||||
virtual wxDC* CreatePrinterDC( const wxPrintData& data );
|
||||
#endif
|
||||
|
||||
virtual bool HasPrintSetupDialog();
|
||||
virtual wxDialog *CreatePrintSetupDialog( wxWindow *parent, wxPrintData *data );
|
||||
@@ -218,11 +222,20 @@ private:
|
||||
// wxGtkPrinterDC
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxGtkPrinterDC: public wxDC
|
||||
#if wxUSE_NEW_DC
|
||||
class WXDLLIMPEXP_CORE wxGtkPrinterImplDC : public wxImplDC
|
||||
#else
|
||||
#define wxGtkPrinterImplDC wxGtkPrinterDC
|
||||
class WXDLLIMPEXP_CORE wxGtkPrinterDC : public wxDC
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
#if wxUSE_NEW_DC
|
||||
wxGtkPrinterImplDC( wxPrinterDC *owner, const wxPrintData& data );
|
||||
#else
|
||||
wxGtkPrinterDC( const wxPrintData& data );
|
||||
virtual ~wxGtkPrinterDC();
|
||||
#endif
|
||||
virtual ~wxGtkPrinterImplDC();
|
||||
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const;
|
||||
@@ -247,7 +260,10 @@ public:
|
||||
void SetBackgroundMode(int mode);
|
||||
void SetPalette(const wxPalette& WXUNUSED(palette)) { }
|
||||
void SetResolution(int ppi);
|
||||
int GetResolution();
|
||||
|
||||
// overriden for wxPrinterDC Impl
|
||||
virtual int GetResolution();
|
||||
virtual wxRect GetPaperRect();
|
||||
|
||||
protected:
|
||||
bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, int style=wxFLOOD_SURFACE );
|
||||
@@ -304,8 +320,8 @@ private:
|
||||
double m_PS2DEV;
|
||||
double m_DEV2PS;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxGtkPrinterDC)
|
||||
DECLARE_NO_COPY_CLASS(wxGtkPrinterDC)
|
||||
DECLARE_DYNAMIC_CLASS(wxGtkPrinterImplDC)
|
||||
DECLARE_NO_COPY_CLASS(wxGtkPrinterImplDC)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user