Compilation fixes for building without one or both of these symbols.
See #12664.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66172
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
class WXDLLIMPEXP_FWD_CORE wxMemoryDC;
#if wxUSE_PRINTING_ARCHITECTURE
class WXDLLIMPEXP_FWD_CORE wxPrinterDC;
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;
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);
static wxGraphicsContext * Create( const wxMemoryDC& dc);
#if wxUSE_PRINTING_ARCHITECTURE
static wxGraphicsContext * Create( const wxPrinterDC& dc);
+#endif
+#if wxUSE_ENH_METAFILE
static wxGraphicsContext * Create( const wxEnhMetaFileDC& dc);
#endif
static wxGraphicsContext * Create( const wxEnhMetaFileDC& dc);
#endif
-#endif // wxUSE_PRINTING_ARCHITECTURE
static wxGraphicsContext* CreateFromNative( void * context );
static wxGraphicsContext* CreateFromNative( void * context );
virtual wxGraphicsContext * CreateContext( const wxMemoryDC& dc) = 0;
#if wxUSE_PRINTING_ARCHITECTURE
virtual wxGraphicsContext * CreateContext( const wxPrinterDC& dc) = 0;
virtual wxGraphicsContext * CreateContext( const wxMemoryDC& dc) = 0;
#if wxUSE_PRINTING_ARCHITECTURE
virtual wxGraphicsContext * CreateContext( const wxPrinterDC& dc) = 0;
+#endif
+#if wxUSE_ENH_METAFILE
virtual wxGraphicsContext * CreateContext( const wxEnhMetaFileDC& dc) = 0;
#endif
virtual wxGraphicsContext * CreateContext( const wxEnhMetaFileDC& dc) = 0;
#endif
-#endif // wxUSE_PRINTING_ARCHITECTURE
virtual wxGraphicsContext * CreateContextFromNativeContext( void * context ) = 0;
virtual wxGraphicsContext * CreateContextFromNativeContext( void * context ) = 0;
virtual void DetermineScaling();
protected:
virtual void DetermineScaling();
protected:
virtual bool RenderPageIntoBitmap(wxBitmap& bmp, int pageNum);
virtual bool RenderPageIntoBitmap(wxBitmap& bmp, int pageNum);
DECLARE_DYNAMIC_CLASS_NO_COPY(wxWindowsPrintPreview)
};
DECLARE_DYNAMIC_CLASS_NO_COPY(wxWindowsPrintPreview)
};
{
return wxGraphicsRenderer::GetDefaultRenderer()->CreateContext(dc);
}
{
return wxGraphicsRenderer::GetDefaultRenderer()->CreateContext(dc);
}
/* static */ wxGraphicsContext* wxGraphicsContext::Create( const wxEnhMetaFileDC& dc)
{
return wxGraphicsRenderer::GetDefaultRenderer()->CreateContext(dc);
}
#endif
/* 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);
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/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>
#include "wx/dcgraph.h"
#include "wx/msw/private.h" // needs to be before #include <commdlg.h>
virtual wxGraphicsContext * CreateContext( const wxMemoryDC& dc);
virtual wxGraphicsContext * CreateContext( const wxMemoryDC& dc);
+#if wxUSE_PRINTING_ARCHITECTURE
virtual wxGraphicsContext * CreateContext( const wxPrinterDC& dc);
virtual wxGraphicsContext * CreateContext( const wxPrinterDC& dc);
virtual wxGraphicsContext * CreateContext( const wxEnhMetaFileDC& dc);
virtual wxGraphicsContext * CreateContext( const wxEnhMetaFileDC& dc);
virtual wxGraphicsContext * CreateContextFromNativeContext( void * context );
virtual wxGraphicsContext * CreateContextFromNativeContext( void * context );
return new wxGDIPlusContext(this,(HDC) msw->GetHDC(), sz.x, sz.y);
}
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);
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);
}
wxSize sz = dc.GetSize();
return new wxGDIPlusContext(this,(HDC) msw->GetHDC(), sz.x, sz.y);
}
wxGraphicsContext * wxGDIPlusRenderer::CreateContext( const wxEnhMetaFileDC& dc)
{
ENSURE_LOADED_OR_RETURN(NULL);
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);
}
wxSize sz = dc.GetSize();
return new wxGDIPlusContext(this,(HDC) msw->GetHDC(), sz.x, sz.y);
}
wxGraphicsContext * wxGDIPlusRenderer::CreateContext( const wxMemoryDC& dc)
{
wxGraphicsContext * wxGDIPlusRenderer::CreateContext( const wxMemoryDC& dc)
{
#include "wx/msw/printdlg.h"
#include "wx/msw/private.h"
#include "wx/msw/dcprint.h"
#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>
// ---------------------------------------------------------------------------
#include <stdlib.h>
// ---------------------------------------------------------------------------
m_previewScaleY = float(logPPIScreenY) / logPPIPrinterY;
}
m_previewScaleY = float(logPPIScreenY) / logPPIPrinterY;
}
bool wxWindowsPrintPreview::RenderPageIntoBitmap(wxBitmap& bmp, int pageNum)
{
// The preview, as implemented in wxPrintPreviewBase (and as used prior to
bool wxWindowsPrintPreview::RenderPageIntoBitmap(wxBitmap& bmp, int pageNum)
{
// The preview, as implemented in wxPrintPreviewBase (and as used prior to
+#endif // wxUSE_ENH_METAFILE
BOOL CALLBACK wxAbortProc(HDC WXUNUSED(hdc), int WXUNUSED(error))
{
BOOL CALLBACK wxAbortProc(HDC WXUNUSED(hdc), int WXUNUSED(error))
{