(GnomePrintConfig *config, const guchar *key, gboolean value), (config, key, value), false )
wxDL_METHOD_DEFINE( gboolean, gnome_print_config_set_length,
(GnomePrintConfig *config, const guchar *key, gdouble value, const GnomePrintUnit *unit), (config, key, value, unit), false )
(GnomePrintConfig *config, const guchar *key, gboolean value), (config, key, value), false )
wxDL_METHOD_DEFINE( gboolean, gnome_print_config_set_length,
(GnomePrintConfig *config, const guchar *key, gdouble value, const GnomePrintUnit *unit), (config, key, value, unit), false )
wxDL_METHOD_DEFINE( guchar*, gnome_print_config_get,
(GnomePrintConfig *config, const guchar *key), (config, key), NULL )
wxDL_METHOD_DEFINE( gboolean, gnome_print_config_get_length,
wxDL_METHOD_DEFINE( guchar*, gnome_print_config_get,
(GnomePrintConfig *config, const guchar *key), (config, key), NULL )
wxDL_METHOD_DEFINE( gboolean, gnome_print_config_get_length,
wxDL_METHOD_LOAD( m_libGnomePrint, gnome_print_config_set_double );
wxDL_METHOD_LOAD( m_libGnomePrint, gnome_print_config_set_int );
wxDL_METHOD_LOAD( m_libGnomePrint, gnome_print_config_set_length );
wxDL_METHOD_LOAD( m_libGnomePrint, gnome_print_config_set_double );
wxDL_METHOD_LOAD( m_libGnomePrint, gnome_print_config_set_int );
wxDL_METHOD_LOAD( m_libGnomePrint, gnome_print_config_set_length );
wxDL_METHOD_LOAD( m_libGnomePrint, gnome_print_config_get );
wxDL_METHOD_LOAD( m_libGnomePrint, gnome_print_config_get_length );
wxDL_METHOD_LOAD( m_libGnomePrint, gnome_print_config_get_boolean );
wxDL_METHOD_LOAD( m_libGnomePrint, gnome_print_config_get );
wxDL_METHOD_LOAD( m_libGnomePrint, gnome_print_config_get_length );
wxDL_METHOD_LOAD( m_libGnomePrint, gnome_print_config_get_boolean );
default:
case wxPAPER_A4: gs_libGnomePrint->gnome_print_config_set( m_config,
(guchar*)(char*)GNOME_PRINT_KEY_PAPER_SIZE,
default:
case wxPAPER_A4: gs_libGnomePrint->gnome_print_config_set( m_config,
(guchar*)(char*)GNOME_PRINT_KEY_PAPER_SIZE,
-wxGnomePageSetupDialog::wxGnomePageSetupDialog( wxWindow *parent,
- wxPageSetupDialogData* data )
+wxGnomePageSetupDialog::wxGnomePageSetupDialog(wxWindow * WXUNUSED(parent),
+ wxPageSetupDialogData *data)
double mt = (double) m_pageDialogData.GetMarginTopLeft().y;
double mr = (double) m_pageDialogData.GetMarginBottomRight().x;
double mb = (double) m_pageDialogData.GetMarginBottomRight().y;
double mt = (double) m_pageDialogData.GetMarginTopLeft().y;
double mr = (double) m_pageDialogData.GetMarginBottomRight().x;
double mb = (double) m_pageDialogData.GetMarginBottomRight().y;
gs_libGnomePrint->gnome_print_config_set_length (config,
(const guchar*) GNOME_PRINT_KEY_PAGE_MARGIN_LEFT, ml, mm_unit );
gs_libGnomePrint->gnome_print_config_set_length (config,
gs_libGnomePrint->gnome_print_config_set_length (config,
(const guchar*) GNOME_PRINT_KEY_PAGE_MARGIN_LEFT, ml, mm_unit );
gs_libGnomePrint->gnome_print_config_set_length (config,
{
wxGnomePrintNativeData *native =
(wxGnomePrintNativeData*) m_pageDialogData.GetPrintData().GetNativeData();
{
wxGnomePrintNativeData *native =
(wxGnomePrintNativeData*) m_pageDialogData.GetPrintData().GetNativeData();
printout->SetPPIScreen( (int) ((ScreenPixels.GetWidth() * 25.4) / ScreenMM.GetWidth()),
(int) ((ScreenPixels.GetHeight() * 25.4) / ScreenMM.GetHeight()) );
printout->SetPPIScreen( (int) ((ScreenPixels.GetWidth() * 25.4) / ScreenMM.GetWidth()),
(int) ((ScreenPixels.GetHeight() * 25.4) / ScreenMM.GetHeight()) );
#define YLOG2DEV(x) ((m_pageHeight - (double)LogicalToDeviceY(x)) * DEV2PS)
#define YLOG2DEVREL(x) ((double)(LogicalToDeviceYRel(x)) * DEV2PS)
#define YLOG2DEV(x) ((m_pageHeight - (double)LogicalToDeviceY(x)) * DEV2PS)
#define YLOG2DEVREL(x) ((double)(LogicalToDeviceYRel(x)) * DEV2PS)
-IMPLEMENT_CLASS(wxGnomePrintDC, wxDC)
+#if wxUSE_NEW_DC
+IMPLEMENT_ABSTRACT_CLASS(wxGnomePrinterDCImpl, wxDCImpl)
+#else
+IMPLEMENT_ABSTRACT_CLASS(wxGnomePrinterDC, wxDC)
+#endif
-bool wxGnomePrintDC::DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, int style )
+bool
+wxGnomePrinterDCImpl::DoFloodFill(wxCoord WXUNUSED(x1),
+ wxCoord WXUNUSED(y1),
+ const wxColour& WXUNUSED(col),
+ int WXUNUSED(style))
-bool wxGnomePrintDC::DoGetPixel(wxCoord x1, wxCoord y1, wxColour *col) const
+bool
+wxGnomePrinterDCImpl::DoGetPixel(wxCoord WXUNUSED(x1),
+ wxCoord WXUNUSED(y1),
+ wxColour * WXUNUSED(col)) const
-void wxGnomePrintDC::DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
+void wxGnomePrinterDCImpl::DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
-void wxGnomePrintDC::DoDrawArc(wxCoord x1,wxCoord y1,wxCoord x2,wxCoord y2,wxCoord xc,wxCoord yc)
+void wxGnomePrinterDCImpl::DoDrawArc(wxCoord x1,wxCoord y1,wxCoord x2,wxCoord y2,wxCoord xc,wxCoord yc)
-void wxGnomePrintDC::DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea)
+void wxGnomePrinterDCImpl::DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea)
-void wxGnomePrintDC::DoDrawLines(int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset)
+void wxGnomePrinterDCImpl::DoDrawLines(int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset)
-void wxGnomePrintDC::DoDrawPolygon(int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset, int fillStyle)
+void wxGnomePrinterDCImpl::DoDrawPolygon(int n, wxPoint points[],
+ wxCoord xoffset, wxCoord yoffset,
+ int WXUNUSED(fillStyle))
-void wxGnomePrintDC::DoDrawPolyPolygon(int n, int count[], wxPoint points[], wxCoord xoffset, wxCoord yoffset, int fillStyle)
+void wxGnomePrinterDCImpl::DoDrawPolyPolygon(int n, int count[], wxPoint points[], wxCoord xoffset, wxCoord yoffset, int fillStyle)
wxDC::DoDrawPolyPolygon( n, count, points, xoffset, yoffset, fillStyle );
wxDC::DoDrawPolyPolygon( n, count, points, xoffset, yoffset, fillStyle );
-void wxGnomePrintDC::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
+void wxGnomePrinterDCImpl::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
-void wxGnomePrintDC::DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius)
+void wxGnomePrinterDCImpl::DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius)
wxCoord width, wxCoord height)
{
double r = 4 * (sqrt(2.) - 1) / 3;
wxCoord width, wxCoord height)
{
double r = 4 * (sqrt(2.) - 1) / 3;
-void wxGnomePrintDC::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
+void wxGnomePrinterDCImpl::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
-bool wxGnomePrintDC::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
- wxDC *source, wxCoord xsrc, wxCoord ysrc, int rop, bool useMask,
- wxCoord xsrcMask, wxCoord ysrcMask)
+bool
+wxGnomePrinterDCImpl::DoBlit(wxCoord xdest, wxCoord ydest,
+ wxCoord width, wxCoord height,
+ wxDC *source,
+ wxCoord xsrc, wxCoord ysrc,
+ int rop,
+ bool WXUNUSED(useMask),
+ wxCoord WXUNUSED(xsrcMask), wxCoord WXUNUSED(ysrcMask))
{
DoDrawBitmap( icon, x, y, true );
}
{
DoDrawBitmap( icon, x, y, true );
}
-void wxGnomePrintDC::DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask )
+void
+wxGnomePrinterDCImpl::DoDrawBitmap(const wxBitmap& bitmap,
+ wxCoord x, wxCoord y,
+ bool WXUNUSED(useMask))
{
DoDrawRotatedText( text, x, y, 0.0 );
}
{
DoDrawRotatedText( text, x, y, 0.0 );
}
-void wxGnomePrintDC::DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle)
+void wxGnomePrinterDCImpl::DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle)
if (fabs(angle) > 0.00001)
gs_libGnomePrint->gnome_print_rotate( m_gpc, angle );
if (fabs(angle) > 0.00001)
gs_libGnomePrint->gnome_print_rotate( m_gpc, angle );
-void wxGnomePrintDC::DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
+void wxGnomePrinterDCImpl::DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
wxDC::DoSetClippingRegion( x, y, width, height );
wxDC::DoSetClippingRegion( x, y, width, height );
gs_libGnomePrint->gnome_print_newpath( m_gpc );
gs_libGnomePrint->gnome_print_moveto( m_gpc, XLOG2DEV(x), YLOG2DEV(y) );
gs_libGnomePrint->gnome_print_lineto( m_gpc, XLOG2DEV(x + width), YLOG2DEV(y) );
gs_libGnomePrint->gnome_print_newpath( m_gpc );
gs_libGnomePrint->gnome_print_moveto( m_gpc, XLOG2DEV(x), YLOG2DEV(y) );
gs_libGnomePrint->gnome_print_lineto( m_gpc, XLOG2DEV(x + width), YLOG2DEV(y) );
#if 0
// not needed, we set the values in each
// drawing method anyways
#if 0
// not needed, we set the values in each
// drawing method anyways
-void wxGnomePrintDC::DoGetTextExtent(const wxString& string, wxCoord *width, wxCoord *height,
+void wxGnomePrinterDCImpl::DoGetTextExtent(const wxString& string, wxCoord *width, wxCoord *height,
wxCoord *descent,
wxCoord *externalLeading,
const wxFont *theFont ) const
wxCoord *descent,
wxCoord *externalLeading,
const wxFont *theFont ) const
m_previewPrintout->SetPPIScreen( (int) ((ScreenPixels.GetWidth() * 25.4) / ScreenMM.GetWidth()),
(int) ((ScreenPixels.GetHeight() * 25.4) / ScreenMM.GetHeight()) );
m_previewPrintout->SetPPIScreen( (int) ((ScreenPixels.GetWidth() * 25.4) / ScreenMM.GetWidth()),
(int) ((ScreenPixels.GetHeight() * 25.4) / ScreenMM.GetHeight()) );
- sizeDevUnits.x = (wxCoord)((float)sizeDevUnits.x * wxGnomePrintDC::GetResolution() / 72.0);
- sizeDevUnits.y = (wxCoord)((float)sizeDevUnits.y * wxGnomePrintDC::GetResolution() / 72.0);
+ sizeDevUnits.x = (wxCoord)((float)sizeDevUnits.x * resolution / 72.0);
+ sizeDevUnits.y = (wxCoord)((float)sizeDevUnits.y * resolution / 72.0);
wxSize sizeTenthsMM(paper->GetSize());
wxSize sizeMM(sizeTenthsMM.x / 10, sizeTenthsMM.y / 10);
wxSize sizeTenthsMM(paper->GetSize());
wxSize sizeMM(sizeTenthsMM.x / 10, sizeTenthsMM.y / 10);
m_previewPrintout->SetPaperRectPixels(wxRect(0, 0, m_pageWidth, m_pageHeight));
// At 100%, the page should look about page-size on the screen.
m_previewPrintout->SetPaperRectPixels(wxRect(0, 0, m_pageWidth, m_pageHeight));
// At 100%, the page should look about page-size on the screen.