]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/prntbase.cpp
1. fixed (?) blitting bitmaps with mask
[wxWidgets.git] / src / common / prntbase.cpp
index a71fcb47a70d0e6b3e6f601bcd7553968b086f66..8ca74fb4d8881fc7c1008268b612ee82e3a6e0e3 100644 (file)
@@ -55,7 +55,6 @@
     #endif
 #endif // __WXMSW__
 
     #endif
 #endif // __WXMSW__
 
-#if !USE_SHARED_LIBRARY
 IMPLEMENT_CLASS(wxPrinterBase, wxObject)
 IMPLEMENT_ABSTRACT_CLASS(wxPrintout, wxObject)
 IMPLEMENT_CLASS(wxPreviewCanvas, wxWindow)
 IMPLEMENT_CLASS(wxPrinterBase, wxObject)
 IMPLEMENT_ABSTRACT_CLASS(wxPrintout, wxObject)
 IMPLEMENT_CLASS(wxPreviewCanvas, wxWindow)
@@ -71,7 +70,6 @@ BEGIN_EVENT_TABLE(wxPreviewCanvas, wxScrolledWindow)
     EVT_PAINT(wxPreviewCanvas::OnPaint)
     EVT_SYS_COLOUR_CHANGED(wxPreviewCanvas::OnSysColourChanged)
 END_EVENT_TABLE()
     EVT_PAINT(wxPreviewCanvas::OnPaint)
     EVT_SYS_COLOUR_CHANGED(wxPreviewCanvas::OnSysColourChanged)
 END_EVENT_TABLE()
-#endif
 
 /*
 * Printer
 
 /*
 * Printer
@@ -363,14 +361,14 @@ void wxPreviewControlBar::CreateButtons()
 
     if (m_buttonFlags & wxPREVIEW_PREVIOUS)
     {
 
     if (m_buttonFlags & wxPREVIEW_PREVIOUS)
     {
-        m_previousPageButton = new wxButton(this, wxID_PREVIEW_PREVIOUS, "<<", wxPoint(x, y),
+        m_previousPageButton = new wxButton(this, wxID_PREVIEW_PREVIOUS, wxT("<<"), wxPoint(x, y),
             wxSize(buttonWidth, buttonHeight));
         x += gap + buttonWidth;
     }
 
     if (m_buttonFlags & wxPREVIEW_NEXT)
     {
             wxSize(buttonWidth, buttonHeight));
         x += gap + buttonWidth;
     }
 
     if (m_buttonFlags & wxPREVIEW_NEXT)
     {
-        m_nextPageButton = new wxButton(this, wxID_PREVIEW_NEXT, ">>",
+        m_nextPageButton = new wxButton(this, wxID_PREVIEW_NEXT, wxT(">>"),
             wxPoint(x, y), wxSize(buttonWidth, buttonHeight));
         x += gap + buttonWidth;
     }
             wxPoint(x, y), wxSize(buttonWidth, buttonHeight));
         x += gap + buttonWidth;
     }
@@ -384,14 +382,21 @@ void wxPreviewControlBar::CreateButtons()
             "120%", "150%", "200%"
         };
 
             "120%", "150%", "200%"
         };
 
-        m_zoomControl = new wxChoice(this, wxID_PREVIEW_ZOOM,
-                                     wxPoint(x, y), wxSize(100, -1));
-                               
-        // Yes, this look stupid, but this is because gcc gives up otherwise.
         int n = WXSIZEOF(choices);
         int n = WXSIZEOF(choices);
-// Someone is calling methods that do no exist in wxChoice!! So I'll just comment out for VA for now
-        for ( int i = 0; i < n; i++ )
-           m_zoomControl->Append(choices[i]);
+
+        wxString* strings = new wxString[n];
+        int i;
+        for (i = 0; i < n; i++ )
+           strings[i] = choices[i];
+
+        m_zoomControl = new wxChoice(this, wxID_PREVIEW_ZOOM,
+                                     wxPoint(x, y),
+                                     wxSize(100, -1),
+                                     n,
+                                     strings
+                                    );
+        delete[] strings;
+
         SetZoomControl(m_printPreview->GetZoom());
     }
 
         SetZoomControl(m_printPreview->GetZoom());
     }
 
@@ -773,10 +778,10 @@ void wxPrintPreviewBase::SetZoom(int percent)
         m_previewBitmap = NULL;
     }
 
         m_previewBitmap = NULL;
     }
 
-
     if (m_previewCanvas)
     {
         RenderPage(m_currentPage);
     if (m_previewCanvas)
     {
         RenderPage(m_currentPage);
+        ((wxScrolledWindow *) m_previewCanvas)->Scroll(0, 0);
         m_previewCanvas->Clear();
         m_previewCanvas->Refresh();
     }
         m_previewCanvas->Clear();
         m_previewCanvas->Refresh();
     }