Next phase of Print Factory code.
Created a mini interface so that the generic wxPrintDialog can show a "printer" and a "status" line if the print factory wants this to be the case. Moved some code (print mode) back from the PostScript only print data to the general print data since it is sort of general. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30101 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -197,6 +197,7 @@ public:
|
||||
// in wxPageSetupDialogData
|
||||
wxPrintQuality GetQuality() const { return m_printQuality; }
|
||||
wxPrintBin GetBin() const { return m_bin; }
|
||||
wxPrintMode GetPrintMode() const { return m_printMode; }
|
||||
|
||||
void SetNoCopies(int v) { m_printNoCopies = v; };
|
||||
void SetCollate(bool flag) { m_printCollate = flag; };
|
||||
@@ -209,6 +210,7 @@ public:
|
||||
void SetPaperSize(const wxSize& sz) { m_paperSize = sz; }
|
||||
void SetQuality(wxPrintQuality quality) { m_printQuality = quality; }
|
||||
void SetBin(wxPrintBin bin) { m_bin = bin; }
|
||||
void SetPrintMode(wxPrintMode printMode) { m_printMode = printMode; }
|
||||
|
||||
wxString GetFilename() const { return m_filename; }
|
||||
void SetFilename( const wxString &filename ) { m_filename = filename; }
|
||||
@@ -229,6 +231,7 @@ public:
|
||||
|
||||
private:
|
||||
wxPrintBin m_bin;
|
||||
wxPrintMode m_printMode;
|
||||
|
||||
int m_printNoCopies;
|
||||
int m_printOrientation;
|
||||
|
@@ -98,7 +98,6 @@ public:
|
||||
double GetPrinterScaleY() const { return m_printerScaleY; }
|
||||
long GetPrinterTranslateX() const { return m_printerTranslateX; }
|
||||
long GetPrinterTranslateY() const { return m_printerTranslateY; }
|
||||
wxPrintMode GetPrintMode() const { return m_printMode; }
|
||||
|
||||
void SetPrinterCommand(const wxString& command) { m_printerCommand = command; }
|
||||
void SetPrinterOptions(const wxString& options) { m_printerOptions = options; }
|
||||
@@ -110,7 +109,6 @@ public:
|
||||
void SetPrinterTranslateX(long x) { m_printerTranslateX = x; }
|
||||
void SetPrinterTranslateY(long y) { m_printerTranslateY = y; }
|
||||
void SetPrinterTranslation(long x, long y) { m_printerTranslateX = x; m_printerTranslateY = y; }
|
||||
void SetPrintMode(wxPrintMode printMode) { m_printMode = printMode; }
|
||||
|
||||
#if wxUSE_STREAMS
|
||||
wxOutputStream *GetOutputStream() { return m_outputStream; }
|
||||
@@ -126,7 +124,6 @@ private:
|
||||
double m_printerScaleY;
|
||||
long m_printerTranslateX;
|
||||
long m_printerTranslateY;
|
||||
wxPrintMode m_printMode;
|
||||
#if wxUSE_STREAMS
|
||||
wxOutputStream *m_outputStream;
|
||||
#endif
|
||||
@@ -201,7 +198,7 @@ public:
|
||||
virtual bool TransferDataFromWindow();
|
||||
virtual bool TransferDataToWindow();
|
||||
|
||||
wxComboBox *CreatePaperTypeChoice(int* x, int* y);
|
||||
virtual wxComboBox *CreatePaperTypeChoice();
|
||||
|
||||
public:
|
||||
wxRadioBox* m_orientationRadioBox;
|
||||
|
@@ -62,9 +62,6 @@ public:
|
||||
wxPrintFactory() {}
|
||||
virtual ~wxPrintFactory() {}
|
||||
|
||||
virtual bool HasPageSetupDialog() = 0;
|
||||
virtual bool HasPrintSetupDialog() = 0;
|
||||
|
||||
virtual wxPrinterBase *CreatePrinter( wxPrintDialogData* data ) = 0;
|
||||
|
||||
virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview,
|
||||
@@ -79,6 +76,20 @@ public:
|
||||
virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent,
|
||||
wxPrintData *data ) = 0;
|
||||
|
||||
// What to do and what to show in the wxPrintDialog
|
||||
// a) Use the generic print setup dialog or a native one?
|
||||
virtual bool HasPrintSetupDialog() = 0;
|
||||
virtual wxDialog *CreatePrintSetupDialog( wxWindow *parent, wxPrintData *data ) = 0;
|
||||
// b) Provide the "print to file" option ourselves or via print setup?
|
||||
virtual bool HasOwnPrintToFile() = 0;
|
||||
// c) Show current printer
|
||||
virtual bool HasPrinterLine() = 0;
|
||||
virtual wxString CreatePrinterLine() = 0;
|
||||
// d) Show Status line for current printer?
|
||||
virtual bool HasStatusLine() = 0;
|
||||
virtual wxString CreateStatusLine() = 0;
|
||||
|
||||
|
||||
virtual wxPrintNativeDataBase *CreatePrintNativeData() = 0;
|
||||
|
||||
static void SetPrintFactory( wxPrintFactory *factory );
|
||||
@@ -89,11 +100,6 @@ public:
|
||||
class WXDLLEXPORT wxNativePrintFactory: public wxPrintFactory
|
||||
{
|
||||
public:
|
||||
virtual bool HasPageSetupDialog()
|
||||
{ return true; }
|
||||
virtual bool HasPrintSetupDialog()
|
||||
{ return true; }
|
||||
|
||||
virtual wxPrinterBase *CreatePrinter( wxPrintDialogData *data );
|
||||
|
||||
virtual wxPrintPreviewBase *CreatePrintPreview( wxPrintout *preview,
|
||||
@@ -108,6 +114,14 @@ public:
|
||||
virtual wxPrintDialogBase *CreatePrintDialog( wxWindow *parent,
|
||||
wxPrintData *data );
|
||||
|
||||
virtual bool HasPrintSetupDialog();
|
||||
virtual wxDialog *CreatePrintSetupDialog( wxWindow *parent, wxPrintData *data );
|
||||
virtual bool HasOwnPrintToFile();
|
||||
virtual bool HasPrinterLine();
|
||||
virtual wxString CreatePrinterLine();
|
||||
virtual bool HasStatusLine();
|
||||
virtual wxString CreateStatusLine();
|
||||
|
||||
virtual wxPrintNativeDataBase *CreatePrintNativeData();
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user