Added module so that linking to GNOME printing
code will install its wxPrintFactory.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30232
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#ifndef __gprint_H__
#define __gprint_H__
-#if defined(__GNUG__) && !defined(__APPLE__)
- #pragma interface "gprint.h"
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
+#pragma interface
#endif
// Include wxWindows' headers
#ifndef __gprint_H__
#define __gprint_H__
-#if defined(__GNUG__) && !defined(__APPLE__)
- #pragma interface "gprint.h"
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
+#pragma interface
#endif
// Include wxWindows' headers
// Licence: wxWindows Licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
- #pragma implementation "gprint.cpp"
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
+#pragma implementation "gprint.h"
#endif
// For compilers that support precompilation, includes "wx/wx.h".
bool wxGnomePrinter::Setup( wxWindow *parent )
{
+ return false;
}
//-----------------------------------------------------------------------------
return 72;
}
+
+class wxGnomePrintModule: public wxModule
+{
+public:
+ wxGnomePrintModule() {}
+ bool OnInit() { wxPrintFactory::SetPrintFactory( new wxGnomePrintFactory ); return true; }
+ void OnExit() { }
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxGnomePrintModule)
+};
+
+IMPLEMENT_DYNAMIC_CLASS(wxGnomePrintModule, wxModule)
+
#endif
// wxUSE_LIBGNOMEPRINT
// Licence: wxWindows Licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
- #pragma implementation "gprint.cpp"
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
+#pragma implementation "gprint.h"
#endif
// For compilers that support precompilation, includes "wx/wx.h".
bool wxGnomePrinter::Setup( wxWindow *parent )
{
+ return false;
}
//-----------------------------------------------------------------------------
return 72;
}
+
+class wxGnomePrintModule: public wxModule
+{
+public:
+ wxGnomePrintModule() {}
+ bool OnInit() { wxPrintFactory::SetPrintFactory( new wxGnomePrintFactory ); return true; }
+ void OnExit() { }
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxGnomePrintModule)
+};
+
+IMPLEMENT_DYNAMIC_CLASS(wxGnomePrintModule, wxModule)
+
#endif
// wxUSE_LIBGNOMEPRINT