class WXDLLIMPEXP_FWD_CORE wxMemoryDC;
#if wxUSE_PRINTING_ARCHITECTURE
class WXDLLIMPEXP_FWD_CORE wxPrinterDC;
+#endif
+#if wxUSE_ENH_METAFILE
class WXDLLIMPEXP_FWD_CORE wxEnhMetaFileDC;
#endif
class WXDLLIMPEXP_FWD_CORE wxGraphicsContext;
static wxGraphicsContext * Create( const wxMemoryDC& dc);
#if wxUSE_PRINTING_ARCHITECTURE
static wxGraphicsContext * Create( const wxPrinterDC& dc);
-#ifdef __WXMSW__
+#endif
+#if wxUSE_ENH_METAFILE
static wxGraphicsContext * Create( const wxEnhMetaFileDC& dc);
#endif
-#endif // wxUSE_PRINTING_ARCHITECTURE
static wxGraphicsContext* CreateFromNative( void * context );
virtual wxGraphicsContext * CreateContext( const wxMemoryDC& dc) = 0;
#if wxUSE_PRINTING_ARCHITECTURE
virtual wxGraphicsContext * CreateContext( const wxPrinterDC& dc) = 0;
-#ifdef __WXMSW__
+#endif
+#if wxUSE_ENH_METAFILE
virtual wxGraphicsContext * CreateContext( const wxEnhMetaFileDC& dc) = 0;
#endif
-#endif // wxUSE_PRINTING_ARCHITECTURE
virtual wxGraphicsContext * CreateContextFromNativeContext( void * context ) = 0;
virtual void DetermineScaling();
protected:
+#if wxUSE_ENH_METAFILE
virtual bool RenderPageIntoBitmap(wxBitmap& bmp, int pageNum);
+#endif
DECLARE_DYNAMIC_CLASS_NO_COPY(wxWindowsPrintPreview)
};
{
return wxGraphicsRenderer::GetDefaultRenderer()->CreateContext(dc);
}
+#endif
-#ifdef __WXMSW__
+#if wxUSE_ENH_METAFILE
/* static */ wxGraphicsContext* wxGraphicsContext::Create( const wxEnhMetaFileDC& dc)
{
return wxGraphicsRenderer::GetDefaultRenderer()->CreateContext(dc);
}
#endif
-#endif // wxUSE_PRINTING_ARCHITECTURE
-
wxGraphicsContext* wxGraphicsContext::CreateFromNative( void * context )
{
return wxGraphicsRenderer::GetDefaultRenderer()->CreateContextFromNativeContext(context);
#include "wx/private/graphics.h"
#include "wx/msw/wrapgdip.h"
#include "wx/msw/dc.h"
-#include "wx/msw/enhmeta.h"
+#if wxUSE_ENH_METAFILE
+ #include "wx/msw/enhmeta.h"
+#endif
#include "wx/dcgraph.h"
#include "wx/msw/private.h" // needs to be before #include <commdlg.h>
virtual wxGraphicsContext * CreateContext( const wxMemoryDC& dc);
+#if wxUSE_PRINTING_ARCHITECTURE
virtual wxGraphicsContext * CreateContext( const wxPrinterDC& dc);
+#endif
+#if wxUSE_ENH_METAFILE
virtual wxGraphicsContext * CreateContext( const wxEnhMetaFileDC& dc);
+#endif
virtual wxGraphicsContext * CreateContextFromNativeContext( void * context );
return new wxGDIPlusContext(this,(HDC) msw->GetHDC(), sz.x, sz.y);
}
+#if wxUSE_PRINTING_ARCHITECTURE
wxGraphicsContext * wxGDIPlusRenderer::CreateContext( const wxPrinterDC& dc)
{
ENSURE_LOADED_OR_RETURN(NULL);
wxSize sz = dc.GetSize();
return new wxGDIPlusContext(this,(HDC) msw->GetHDC(), sz.x, sz.y);
}
+#endif
+#if wxUSE_ENH_METAFILE
wxGraphicsContext * wxGDIPlusRenderer::CreateContext( const wxEnhMetaFileDC& dc)
{
ENSURE_LOADED_OR_RETURN(NULL);
wxSize sz = dc.GetSize();
return new wxGDIPlusContext(this,(HDC) msw->GetHDC(), sz.x, sz.y);
}
+#endif
wxGraphicsContext * wxGDIPlusRenderer::CreateContext( const wxMemoryDC& dc)
{
#include "wx/msw/printdlg.h"
#include "wx/msw/private.h"
#include "wx/msw/dcprint.h"
-#include "wx/msw/enhmeta.h"
-
+#if wxUSE_ENH_METAFILE
+ #include "wx/msw/enhmeta.h"
+#endif
#include <stdlib.h>
// ---------------------------------------------------------------------------
m_previewScaleY = float(logPPIScreenY) / logPPIPrinterY;
}
+#if wxUSE_ENH_METAFILE
bool wxWindowsPrintPreview::RenderPageIntoBitmap(wxBitmap& bmp, int pageNum)
{
// The preview, as implemented in wxPrintPreviewBase (and as used prior to
return true;
}
-
+#endif // wxUSE_ENH_METAFILE
BOOL CALLBACK wxAbortProc(HDC WXUNUSED(hdc), int WXUNUSED(error))
{