make GetPaperRect() and GetResolution() const functions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56783 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -497,10 +497,10 @@ public:
|
||||
// ---------------------------------------------------------
|
||||
// wxPrinterDC Impl API
|
||||
|
||||
virtual wxRect GetPaperRect()
|
||||
virtual wxRect GetPaperRect() const
|
||||
{ int w = 0; int h = 0; DoGetSize( &w, &h ); return wxRect(0,0,w,h); }
|
||||
|
||||
virtual int GetResolution()
|
||||
virtual int GetResolution() const
|
||||
{ return -1; }
|
||||
|
||||
private:
|
||||
@@ -667,7 +667,7 @@ public:
|
||||
wxSize GetPPI() const
|
||||
{ return m_pimpl->GetPPI(); }
|
||||
|
||||
virtual int GetResolution()
|
||||
virtual int GetResolution() const
|
||||
{ return m_pimpl->GetResolution(); }
|
||||
|
||||
// Right-To-Left (RTL) modes
|
||||
|
@@ -28,8 +28,8 @@ public:
|
||||
wxPrinterDC();
|
||||
wxPrinterDC(const wxPrintData& data);
|
||||
|
||||
wxRect GetPaperRect();
|
||||
int GetResolution();
|
||||
wxRect GetPaperRect() const;
|
||||
int GetResolution() const;
|
||||
|
||||
protected:
|
||||
wxPrinterDC(wxDCImpl *impl) : wxDC(impl) { }
|
||||
|
@@ -91,8 +91,8 @@ public:
|
||||
|
||||
// Overrridden for wxPrinterDC Impl
|
||||
|
||||
virtual int GetResolution();
|
||||
virtual wxRect GetPaperRect();
|
||||
virtual int GetResolution() const;
|
||||
virtual wxRect GetPaperRect() const;
|
||||
|
||||
protected:
|
||||
bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, int style = wxFLOOD_SURFACE);
|
||||
|
@@ -289,8 +289,8 @@ protected:
|
||||
wxPrintData& GetPrintData() { return m_printData; }
|
||||
|
||||
// overriden for wxPrinterDC Impl
|
||||
virtual wxRect GetPaperRect();
|
||||
virtual int GetResolution();
|
||||
virtual wxRect GetPaperRect() const;
|
||||
virtual int GetResolution() const;
|
||||
|
||||
private:
|
||||
wxPrintData m_printData;
|
||||
|
@@ -251,8 +251,8 @@ public:
|
||||
void SetResolution(int ppi);
|
||||
|
||||
// overriden for wxPrinterDC Impl
|
||||
virtual int GetResolution();
|
||||
virtual wxRect GetPaperRect();
|
||||
virtual int GetResolution() const;
|
||||
virtual wxRect GetPaperRect() const;
|
||||
|
||||
protected:
|
||||
bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, int style=wxFLOOD_SURFACE );
|
||||
|
@@ -24,7 +24,7 @@ public:
|
||||
int orientation = wxPORTRAIT);
|
||||
virtual ~wxPrinterDC();
|
||||
|
||||
wxRect GetPaperRect();
|
||||
wxRect GetPaperRect() const;
|
||||
|
||||
DECLARE_CLASS(wxPrinterDCImpl)
|
||||
};
|
||||
|
@@ -35,7 +35,7 @@ public:
|
||||
virtual void StartPage();
|
||||
virtual void EndPage();
|
||||
|
||||
virtual wxRect GetPaperRect();
|
||||
virtual wxRect GetPaperRect() const;
|
||||
|
||||
protected:
|
||||
virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
|
||||
|
@@ -33,7 +33,7 @@ class WXDLLIMPEXP_CORE wxPrinterDCImpl: public wxPMDCImpl
|
||||
virtual void StartPage(void);
|
||||
virtual void EndPage(void);
|
||||
|
||||
virtual wxRect GetPaperRect();
|
||||
virtual wxRect GetPaperRect() const;
|
||||
|
||||
protected:
|
||||
virtual void DoDrawBitmap( const wxBitmap& rBmp
|
||||
|
@@ -31,7 +31,7 @@ public:
|
||||
virtual void StartPage(void) ;
|
||||
virtual void EndPage(void) ;
|
||||
|
||||
wxRect GetPaperRect();
|
||||
wxRect GetPaperRect() const;
|
||||
|
||||
wxPrintData& GetPrintData() { return m_printData; }
|
||||
virtual wxSize GetPPI() const;
|
||||
|
@@ -34,7 +34,7 @@ public:
|
||||
virtual void StartPage();
|
||||
virtual void EndPage();
|
||||
|
||||
wxRect GetPaperRect();
|
||||
wxRect GetPaperRect() const;
|
||||
|
||||
protected:
|
||||
virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
|
||||
|
@@ -300,12 +300,12 @@ wxPrinterDC::wxPrinterDC(const wxPrintData& data)
|
||||
{
|
||||
}
|
||||
|
||||
wxRect wxPrinterDC::GetPaperRect()
|
||||
wxRect wxPrinterDC::GetPaperRect() const
|
||||
{
|
||||
return GetImpl()->GetPaperRect();
|
||||
}
|
||||
|
||||
int wxPrinterDC::GetResolution()
|
||||
int wxPrinterDC::GetResolution() const
|
||||
{
|
||||
return GetImpl()->GetResolution();
|
||||
}
|
||||
|
@@ -342,7 +342,7 @@ bool wxPostScriptDCImpl::IsOk() const
|
||||
return m_ok;
|
||||
}
|
||||
|
||||
wxRect wxPostScriptDCImpl::GetPaperRect()
|
||||
wxRect wxPostScriptDCImpl::GetPaperRect() const
|
||||
{
|
||||
int w = 0;
|
||||
int h = 0;
|
||||
@@ -350,7 +350,7 @@ wxRect wxPostScriptDCImpl::GetPaperRect()
|
||||
return wxRect(0,0,w,h);
|
||||
}
|
||||
|
||||
int wxPostScriptDCImpl::GetResolution()
|
||||
int wxPostScriptDCImpl::GetResolution() const
|
||||
{
|
||||
return DPI;
|
||||
}
|
||||
|
@@ -2015,12 +2015,12 @@ void wxGnomePrinterDCImpl::SetPrintData(const wxPrintData& data)
|
||||
|
||||
// overridden for wxPrinterDC Impl
|
||||
|
||||
int wxGnomePrinterDCImpl::GetResolution()
|
||||
int wxGnomePrinterDCImpl::GetResolution() const
|
||||
{
|
||||
return DPI;
|
||||
}
|
||||
|
||||
wxRect wxGnomePrinterDCImpl::GetPaperRect()
|
||||
wxRect wxGnomePrinterDCImpl::GetPaperRect() const
|
||||
{
|
||||
// GNOME print doesn't support printer margins
|
||||
int w = 0;
|
||||
|
@@ -2251,7 +2251,7 @@ void wxGtkPrinterDCImpl::SetPrintData(const wxPrintData& data)
|
||||
|
||||
// overriden for wxPrinterDC Impl
|
||||
|
||||
wxRect wxGtkPrinterDCImpl::GetPaperRect()
|
||||
wxRect wxGtkPrinterDCImpl::GetPaperRect() const
|
||||
{
|
||||
// Does GtkPrint support printer margins?
|
||||
int w = 0;
|
||||
@@ -2260,7 +2260,7 @@ wxRect wxGtkPrinterDCImpl::GetPaperRect()
|
||||
return wxRect( 0,0,w,h );
|
||||
}
|
||||
|
||||
int wxGtkPrinterDCImpl::GetResolution()
|
||||
int wxGtkPrinterDCImpl::GetResolution() const
|
||||
{
|
||||
return m_resolution;
|
||||
}
|
||||
|
@@ -228,7 +228,7 @@ void wxPrinterDCImpl::EndPage()
|
||||
}
|
||||
|
||||
|
||||
wxRect wxPrinterDCImpl::GetPaperRect()
|
||||
wxRect wxPrinterDCImpl::GetPaperRect() const
|
||||
|
||||
{
|
||||
if (!IsOk()) return wxRect(0, 0, 0, 0);
|
||||
|
@@ -138,7 +138,7 @@ void wxPrinterDCImpl::EndPage()
|
||||
// ::EndPage((HDC) m_hDC);
|
||||
} // end of wxPrinterDC::EndPage
|
||||
|
||||
wxRect wxPrinterDCImpl::GetPaperRect()
|
||||
wxRect wxPrinterDCImpl::GetPaperRect() const
|
||||
{
|
||||
// Use page rect if we can't get paper rect.
|
||||
wxCoord w, h;
|
||||
|
@@ -344,7 +344,7 @@ void wxPrinterDCImpl::EndDoc(void)
|
||||
}
|
||||
}
|
||||
|
||||
wxRect wxPrinterDCImpl::GetPaperRect()
|
||||
wxRect wxPrinterDCImpl::GetPaperRect() const
|
||||
{
|
||||
wxCoord w, h;
|
||||
GetOwner()->GetSize(&w, &h);
|
||||
|
@@ -100,7 +100,7 @@ void wxPrinterDC::EndPage()
|
||||
{
|
||||
}
|
||||
|
||||
wxRect wxPrinterDC::GetPaperRect()
|
||||
wxRect wxPrinterDC::GetPaperRect() const
|
||||
{
|
||||
// Use page rect if we can't get paper rect.
|
||||
wxCoord w, h;
|
||||
|
Reference in New Issue
Block a user