Add wxPrintout::SetUp() to reuse the same code in all ports

MSW, GTK, OSX and Postscript implementations all did almost exactly the
same thing to initialize wxPrintout, so extract this common code into a
new wxPrintout method and just call it instead.

There should be no changes in behaviour.
This commit is contained in:
Vadim Zeitlin
2018-05-23 17:52:31 +02:00
parent b6f0693a41
commit 048b7f44ec
6 changed files with 37 additions and 65 deletions

View File

@@ -281,6 +281,10 @@ public:
virtual wxString GetTitle() const { return m_printoutTitle; }
// Port-specific code should call this function to initialize this object
// with everything it needs, instead of using individual accessors below.
bool SetUp(wxDC& dc);
wxDC *GetDC() const { return m_printoutDC; }
void SetDC(wxDC *dc) { m_printoutDC = dc; }