virtual wxPageSetupDialogBase *CreatePageSetupDialog( wxWindow *parent,
wxPageSetupDialogData * data = NULL );
+ virtual wxDC* CreatePrinterDC( const wxPrintData& data );
+
virtual bool HasPrintSetupDialog();
virtual wxDialog *CreatePrintSetupDialog( wxWindow *parent, wxPrintData *data );
virtual bool HasOwnPrintToFile();
{
public:
wxGnomePrintDC( wxGnomePrinter *printer );
+ wxGnomePrintDC( const wxPrintData& data );
virtual ~wxGnomePrintDC();
bool Ok() const { return IsOk(); }
static float ms_PSScaleFactor;
private:
+ wxPrintData m_printData;
PangoContext *m_context;
PangoLayout *m_layout;
PangoFontDescription *m_fontdesc;
unsigned char m_currentRed;
unsigned char m_currentGreen;
unsigned char m_currentBlue;
- wxPrintData m_printData;
wxGnomePrinter *m_printer;
GnomePrintContext *m_gpc;
+ GnomePrintJob* m_job; // only used and destroyed when created with wxPrintData
void makeEllipticalPath(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
DECLARE_NO_COPY_CLASS(wxGnomePrintDC)
};
+// ----------------------------------------------------------------------------
+// wxGnomePrintPreview: programmer creates an object of this class to preview a
+// wxPrintout.
+// ----------------------------------------------------------------------------
+
+class wxGnomePrintPreview : public wxPrintPreviewBase
+{
+public:
+ wxGnomePrintPreview(wxPrintout *printout,
+ wxPrintout *printoutForPrinting = (wxPrintout *) NULL,
+ wxPrintDialogData *data = (wxPrintDialogData *) NULL);
+ wxGnomePrintPreview(wxPrintout *printout,
+ wxPrintout *printoutForPrinting,
+ wxPrintData *data);
+
+ virtual ~wxGnomePrintPreview();
+
+ virtual bool Print(bool interactive);
+ virtual void DetermineScaling();
+
+private:
+ void Init(wxPrintout *printout, wxPrintout *printoutForPrinting);
+
+private:
+ DECLARE_CLASS(wxGnomePrintPreview)
+};
+
+
#endif
// wxUSE_LIBGNOMEPRINT