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:
@@ -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; }
|
||||
|
||||
|
Reference in New Issue
Block a user