+ m_devMode = (void*) NULL;
+ m_devNames = (void*) NULL;
+#elif defined( __WXMAC__ )
+#if TARGET_CARBON
+ m_macPageFormat = kPMNoPageFormat;
+ m_macPrintSettings = kPMNoPrintSettings;
+
+ #if PM_USE_SESSION_APIS
+ PMPrintSession macPrintSession = kPMNoReference;
+ OSStatus err;
+
+ err = ::UMAPrOpen(&macPrintSession) ;
+ if ( err == noErr )
+ {
+ err = PMCreatePageFormat(&m_macPageFormat);
+
+ // Note that PMPageFormat is not session-specific, but calling
+ // PMSessionDefaultPageFormat assigns values specific to the printer
+ // associated with the current printing session.
+ if ((err == noErr) && (m_macPageFormat != kPMNoPageFormat))
+ {
+ err = PMSessionDefaultPageFormat(macPrintSession, m_macPageFormat);
+ }
+
+ err = PMCreatePrintSettings(&m_macPrintSettings);
+
+ // Note that PMPrintSettings is not session-specific, but calling
+ // PMSessionDefaultPrintSettings assigns values specific to the printer
+ // associated with the current printing session.
+ if ((err == noErr) && (m_macPrintSettings != kPMNoPrintSettings))
+ {
+ err = PMSessionDefaultPrintSettings(macPrintSession, m_macPrintSettings);
+ }
+ }
+ ::UMAPrClose(&macPrintSession) ;
+ #endif
+#else
+ m_macPrintInfo = (THPrint) NewHandleClear( sizeof( TPrint ) );
+ (**(THPrint)m_macPrintInfo).iPrVersion = 0; // something invalid
+
+ (**(THPrint)m_macPrintInfo).prInfo.iHRes = 72;
+ (**(THPrint)m_macPrintInfo).prInfo.iVRes = 72;
+ Rect r1 = { 0, 0, 8*72 - 2 * 18, 11*72 - 2 * 36 };
+ (**(THPrint)m_macPrintInfo).prInfo.rPage = r1;// must have its top left & (0,0)
+
+ Rect r2 = { -18, -36, 8*72 - 18, 11*72 - 36 };
+ (**(THPrint)m_macPrintInfo).rPaper = r2;
+ (**(THPrint)m_macPrintInfo).prStl.iPageV = 11 * 120 ; // 11 inches in 120th of an inch
+ (**(THPrint)m_macPrintInfo).prStl.iPageH = 8 * 120 ; // 8 inches in 120th of an inch
+#endif