Backward comp. fix.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17166 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 2002-09-13 22:02:14 +00:00
parent 47dc9f7871
commit e32f3f4740

View File

@ -2340,6 +2340,51 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string,
// GTK 2.0
}
#if WXWIN_COMPATIBILITY_2_2
void wxInitializePrintSetupData(bool init)
{
if (init)
{
// gets initialized in the constructor
wxThePrintSetupData = new wxPrintSetupData;
}
else
{
if (wxThePrintSetupData)
delete wxThePrintSetupData;
wxThePrintSetupData = (wxPrintSetupData *) NULL;
}
}
// A module to allow initialization/cleanup of PostScript-related
// things without calling these functions from app.cpp.
class WXDLLEXPORT wxPostScriptModule: public wxModule
{
DECLARE_DYNAMIC_CLASS(wxPostScriptModule)
public:
wxPostScriptModule() {}
bool OnInit();
void OnExit();
};
IMPLEMENT_DYNAMIC_CLASS(wxPostScriptModule, wxModule)
bool wxPostScriptModule::OnInit()
{
wxInitializePrintSetupData();
return TRUE;
}
void wxPostScriptModule::OnExit()
{
wxInitializePrintSetupData(FALSE);
}
#endif
// WXWIN_COMPATIBILITY_2_2
#endif
// wxUSE_POSTSCRIPT