Make wxPORTRAIT and wxLANDSCAPE elements of wxPrintOrientation enum.
Change wxPrintData::SetOrientation() to take wxPrintOrientation instead of int. Closes #11393. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -192,7 +192,7 @@ public:
|
||||
|
||||
int GetNoCopies() const { return m_printNoCopies; }
|
||||
bool GetCollate() const { return m_printCollate; }
|
||||
int GetOrientation() const { return m_printOrientation; }
|
||||
wxPrintOrientation GetOrientation() const { return m_printOrientation; }
|
||||
bool IsOrientationReversed() const { return m_printOrientationReversed; }
|
||||
|
||||
// Is this data OK for showing the print dialog?
|
||||
@@ -212,7 +212,11 @@ public:
|
||||
|
||||
void SetNoCopies(int v) { m_printNoCopies = v; }
|
||||
void SetCollate(bool flag) { m_printCollate = flag; }
|
||||
void SetOrientation(int orient) { m_printOrientation = orient; }
|
||||
|
||||
// Please use the overloaded method below
|
||||
wxDEPRECATED_INLINE(void SetOrientation(int orient),
|
||||
m_printOrientation = (wxPrintOrientation)orient; )
|
||||
void SetOrientation(wxPrintOrientation orient) { m_printOrientation = orient; }
|
||||
void SetOrientationReversed(bool reversed) { m_printOrientationReversed = reversed; }
|
||||
|
||||
void SetPrinterName(const wxString& name) { m_printerName = name; }
|
||||
@@ -247,7 +251,7 @@ private:
|
||||
wxPrintMode m_printMode;
|
||||
|
||||
int m_printNoCopies;
|
||||
int m_printOrientation;
|
||||
wxPrintOrientation m_printOrientation;
|
||||
bool m_printOrientationReversed;
|
||||
bool m_printCollate;
|
||||
|
||||
|
@@ -2543,10 +2543,11 @@ typedef enum
|
||||
} wxPaperSize;
|
||||
|
||||
/* Printing orientation */
|
||||
#ifndef wxPORTRAIT
|
||||
#define wxPORTRAIT 1
|
||||
#define wxLANDSCAPE 2
|
||||
#endif
|
||||
enum wxPrintOrientation
|
||||
{
|
||||
wxPORTRAIT = 1,
|
||||
wxLANDSCAPE
|
||||
};
|
||||
|
||||
/* Duplex printing modes
|
||||
*/
|
||||
|
@@ -21,7 +21,7 @@ public:
|
||||
wxPrinterDCImpl(const wxString& driver, const wxString& device,
|
||||
const wxString& output,
|
||||
bool interactive = true,
|
||||
int orientation = wxPORTRAIT);
|
||||
wxPrintOrientation orientation = wxPORTRAIT);
|
||||
virtual ~wxPrinterDC();
|
||||
|
||||
wxRect GetPaperRect() const;
|
||||
|
@@ -21,7 +21,7 @@ class WXDLLIMPEXP_CORE wxPrinterDC : public wxDC
|
||||
{
|
||||
public:
|
||||
// Create a printer DC (obsolete function: use wxPrintData version now)
|
||||
wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output, bool interactive = TRUE, int orientation = wxPORTRAIT);
|
||||
wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output, bool interactive = TRUE, wxPrintOrientation orientation = wxPORTRAIT);
|
||||
|
||||
// Create from print data
|
||||
wxPrinterDC(const wxPrintData& data);
|
||||
|
@@ -20,7 +20,7 @@ public:
|
||||
DECLARE_CLASS(wxPrinterDC)
|
||||
|
||||
// Create a printer DC
|
||||
wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output, bool interactive = TRUE, int orientation = wxPORTRAIT);
|
||||
wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output, bool interactive = TRUE, wxPrintOrientation orientation = wxPORTRAIT);
|
||||
|
||||
virtual ~wxPrinterDC();
|
||||
};
|
||||
|
Reference in New Issue
Block a user