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:
@@ -2340,6 +2340,51 @@ void wxPostScriptDC::DoGetTextExtent(const wxString& string,
|
|||||||
// GTK 2.0
|
// 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
|
#endif
|
||||||
// wxUSE_POSTSCRIPT
|
// wxUSE_POSTSCRIPT
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user