]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/prntbase.cpp
Add wxUSE_TARSTREAM and wxUSE_FS_ARCHIVE.
[wxWidgets.git] / src / common / prntbase.cpp
index 9bb2f18a2fe38f64c415a8e5de2bbcc3981ea239..bb8d65092b2a954377be77627fa72b7fbff31669 100644 (file)
@@ -43,6 +43,7 @@
 #include "wx/prntbase.h"
 #include "wx/printdlg.h"
 #include "wx/print.h"
+#include "wx/dcprint.h"
 
 #include <stdlib.h>
 #include <string.h>
@@ -54,6 +55,7 @@
 #include "wx/mac/private/print.h"
 #else
 #include "wx/generic/prntdlgg.h"
+#include "wx/dcps.h"
 #endif
 
 #ifdef __WXMSW__
@@ -201,6 +203,17 @@ wxDialog *wxNativePrintFactory::CreatePrintSetupDialog( wxWindow *parent,
 #endif
 }
 
+wxDC* wxNativePrintFactory::CreatePrinterDC( const wxPrintData& data )
+{
+#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
+    return new wxPrinterDC(data);
+#elif defined(__WXMAC__)
+    return new wxPrinterDC(data);
+#else
+    return new wxPostScriptDC(data);
+#endif
+}
+
 bool wxNativePrintFactory::HasOwnPrintToFile()
 {
     // Only relevant for PostScript and here the
@@ -877,27 +890,38 @@ void wxPreviewControlBar::CreateButtons()
         item0->Add( m_printButton, 0, wxALIGN_CENTRE|wxALL, 5 );
     }
 
+    // Exact-fit buttons are too tiny on wxUniversal
+    int navButtonStyle;
+    wxSize navButtonSize;
+#ifdef __WXUNIVERSAL__
+    navButtonStyle = 0;
+    navButtonSize = wxSize(40, m_closeButton->GetSize().y);
+#else
+    navButtonStyle = wxBU_EXACTFIT;
+    navButtonSize = wxDefaultSize;
+#endif
+
     if (m_buttonFlags & wxPREVIEW_FIRST)
     {
-        m_firstPageButton = new wxButton( this, wxID_PREVIEW_FIRST, _("|<<"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
+        m_firstPageButton = new wxButton( this, wxID_PREVIEW_FIRST, _("|<<"), wxDefaultPosition, navButtonSize, navButtonStyle );
         item0->Add( m_firstPageButton, 0, wxALIGN_CENTRE|wxALL, 5 );
     }
 
     if (m_buttonFlags & wxPREVIEW_PREVIOUS)
     {
-        m_previousPageButton = new wxButton( this, wxID_PREVIEW_PREVIOUS, _("<<"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
+        m_previousPageButton = new wxButton( this, wxID_PREVIEW_PREVIOUS, _("<<"), wxDefaultPosition, navButtonSize, navButtonStyle );
         item0->Add( m_previousPageButton, 0, wxALIGN_CENTRE|wxRIGHT|wxTOP|wxBOTTOM, 5 );
     }
 
     if (m_buttonFlags & wxPREVIEW_NEXT)
     {
-        m_nextPageButton = new wxButton( this, wxID_PREVIEW_NEXT, _(">>"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
+        m_nextPageButton = new wxButton( this, wxID_PREVIEW_NEXT, _(">>"), wxDefaultPosition, navButtonSize, navButtonStyle );
         item0->Add( m_nextPageButton, 0, wxALIGN_CENTRE|wxRIGHT|wxTOP|wxBOTTOM, 5 );
     }
 
     if (m_buttonFlags & wxPREVIEW_LAST)
     {
-        m_lastPageButton = new wxButton( this, wxID_PREVIEW_LAST, _(">>|"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
+        m_lastPageButton = new wxButton( this, wxID_PREVIEW_LAST, _(">>|"), wxDefaultPosition, navButtonSize, navButtonStyle );
         item0->Add( m_lastPageButton, 0, wxALIGN_CENTRE|wxRIGHT|wxTOP|wxBOTTOM, 5 );
     }