]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/dcprint.cpp
use one shot timers in wxAnimationCtrl (patch 1774535)
[wxWidgets.git] / src / os2 / dcprint.cpp
index 87c745f2e8a7f1c69baa708abb0f1b469f7a68ea..1c4a11c248532c2686c41a3b6f1a14321291d8e7 100644 (file)
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
+#if wxUSE_PRINTING_ARCHITECTURE
+
+#include "wx/dcprint.h"
+
 #define INCL_DEV
 #define INCL_GPI
 #define INCL_PM
 #include<os2.h>
 
 #ifndef WX_PRECOMP
-#include "wx/app.h"
-#include "wx/math.h"
+    #include "wx/app.h"
+    #include "wx/math.h"
+    #include "wx/string.h"
+    #include "wx/log.h"
+    #include "wx/window.h"
 #endif
 
-#include "wx/string.h"
-#include "wx/log.h"
-#include "wx/window.h"
 #include "wx/os2/private.h"
-#include "wx/dcprint.h"
-
-#if wxUSE_PRINTING_ARCHITECTURE
 
 IMPLEMENT_CLASS(wxPrinterDC, wxDC)
 
@@ -40,8 +41,8 @@ wxPrinterDC::wxPrinterDC( const wxString& rsDriverName,
                           bool bInteractive,
                           int nOrientation )
 {
-    DEVOPENSTRUC    vDevOpen = { (char*)rsDeviceName.c_str()
-                                ,(char*)rsDriverName.c_str()
+    DEVOPENSTRUC    vDevOpen = { (char*)rsDeviceName.wx_str()
+                                ,(char*)rsDriverName.wx_str()
                                 ,NULL
                                 ,NULL
                                 ,NULL
@@ -222,6 +223,15 @@ void wxPrinterDC::EndPage()
 //    if (m_hDC)
 //        ::EndPage((HDC) m_hDC);
 } // end of wxPrinterDC::EndPage
+
+wxRect wxPrinterDC::GetPaperRect()
+{
+    // Use page rect if we can't get paper rect.
+    wxCoord w, h;
+    GetSize(&w, &h);
+    return wxRect(0, 0, w, h);
+}
+
 #if 0
 // Returns default device and port names
 static bool wxGetDefaultDeviceName( wxString& rsDeviceName, wxString& rsPortName )
@@ -277,7 +287,7 @@ static bool wxGetDefaultDeviceName( wxString& rsDeviceName, wxString& rsPortName
         GlobalFree(pd.hDevMode);
         pd.hDevMode=NULL;
     }
-    return ( deviceName != wxT("") );
+    return !deviceName.empty();
 */
     return true;
 } // end of wxGetDefaultDeviceName