- wxPoint m_paperSize;
- wxPoint m_minMarginTopLeft;
- wxPoint m_minMarginBottomRight;
- wxPoint m_marginTopLeft;
- wxPoint m_marginBottomRight;
- int m_orientation;
-
- // Flags
- bool m_defaultMinMargins;
- bool m_enableMargins;
- bool m_enableOrientation;
- bool m_enablePaper;
- bool m_enablePrinter;
- bool m_getDefaultInfo; // Equiv. to PSD_RETURNDEFAULT
- bool m_enableHelp;
-
- wxPageSetupData(void);
- ~wxPageSetupData(void);
-
- inline wxPoint GetPaperSize(void) { return m_paperSize; };
- inline wxPoint GetMinMarginTopLeft(void) { return m_minMarginTopLeft; };
- inline wxPoint GetMinMarginBottomRight(void) { return m_minMarginBottomRight; };
- inline wxPoint GetMarginTopLeft(void) { return m_marginTopLeft; };
- inline wxPoint GetMarginBottomRight(void) { return m_marginBottomRight; };
- inline int GetOrientation(void) { return m_orientation; };
-
- inline bool GetDefaultMinMargins(void) { return m_defaultMinMargins; };
- inline bool GetEnableMargins(void) { return m_enableMargins; };
- inline bool GetEnableOrientation(void) { return m_enableOrientation; };
- inline bool GetEnablePaper(void) { return m_enablePaper; };
- inline bool GetEnablePrinter(void) { return m_enablePrinter; };
- inline bool GetDefaultInfo(void) { return m_getDefaultInfo; };
- inline bool GetEnableHelp(void) { return m_enableHelp; };
-
- inline void SetPaperSize(const wxPoint& pt) { m_paperSize = pt; };
- inline void SetMinMarginTopLeft(const wxPoint& pt) { m_minMarginTopLeft = pt; };
- inline void SetMinMarginBottomRight(const wxPoint& pt) { m_minMarginBottomRight = pt; };
- inline void SetMarginTopLeft(const wxPoint& pt) { m_marginTopLeft = pt; };
- inline void SetMarginBottomRight(const wxPoint& pt) { m_marginBottomRight = pt; };
- inline void SetOrientation(int orient) { m_orientation = orient; };
- inline void SetDefaultMinMargins(bool flag) { m_defaultMinMargins = flag; };
- inline void SetDefaultInfo(bool flag) { m_getDefaultInfo = flag; };
-
- inline void EnableMargins(bool flag) { m_enableMargins = flag; };
- inline void EnableOrientation(bool flag) { m_enableOrientation = flag; };
- inline void EnablePaper(bool flag) { m_enablePaper = flag; };
- inline void EnablePrinter(bool flag) { m_enablePrinter = flag; };
- inline void EnableHelp(bool flag) { m_enableHelp = flag; };
-
-#if defined(__WIN95__)
- // Convert to/from the PAGESETUPDLG structure
- void ConvertToNative(void);
- void ConvertFromNative(void);
- void SetOwnerWindow(wxWindow* win);
- inline void* GetNativeData(void) { return m_pageSetupData; }
+
+private:
+ int m_printFromPage;
+ int m_printToPage;
+ int m_printMinPage;
+ int m_printMaxPage;
+ int m_printNoCopies;
+ bool m_printAllPages;
+ bool m_printCollate;
+ bool m_printToFile;
+ bool m_printSelection;
+ bool m_printEnableSelection;
+ bool m_printEnablePageNumbers;
+ bool m_printEnableHelp;
+ bool m_printEnablePrintToFile;
+#if WXWIN_COMPATIBILITY_2_4
+ bool m_printSetupDialog;
+#endif
+ wxPrintData m_printData;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxPrintDialogData)
+};
+
+/*
+* This is the data used (and returned) by the wxPageSetupDialog.
+*/
+
+// Compatibility with old name
+#define wxPageSetupData wxPageSetupDialogData
+
+class WXDLLEXPORT wxPageSetupDialogData: public wxObject
+{
+public:
+ wxPageSetupDialogData();
+ wxPageSetupDialogData(const wxPageSetupDialogData& dialogData);
+ wxPageSetupDialogData(const wxPrintData& printData);
+ ~wxPageSetupDialogData();
+
+ wxSize GetPaperSize() const { return m_paperSize; };
+ wxPaperSize GetPaperId() const { return m_printData.GetPaperId(); };
+ wxPoint GetMinMarginTopLeft() const { return m_minMarginTopLeft; };
+ wxPoint GetMinMarginBottomRight() const { return m_minMarginBottomRight; };
+ wxPoint GetMarginTopLeft() const { return m_marginTopLeft; };
+ wxPoint GetMarginBottomRight() const { return m_marginBottomRight; };
+
+ bool GetDefaultMinMargins() const { return m_defaultMinMargins; };
+ bool GetEnableMargins() const { return m_enableMargins; };
+ bool GetEnableOrientation() const { return m_enableOrientation; };
+ bool GetEnablePaper() const { return m_enablePaper; };
+ bool GetEnablePrinter() const { return m_enablePrinter; };
+ bool GetDefaultInfo() const { return m_getDefaultInfo; };
+ bool GetEnableHelp() const { return m_enableHelp; };
+
+ // Is this data OK for showing the page setup dialog?
+ bool Ok() const { return m_printData.Ok() ; }
+
+ // If a corresponding paper type is found in the paper database, will set the m_printData
+ // paper size id member as well.
+ void SetPaperSize(const wxSize& sz);
+
+ void SetPaperId(wxPaperSize id) { m_printData.SetPaperId(id); };
+
+ // Sets the wxPrintData id, plus the paper width/height if found in the paper database.
+ void SetPaperSize(wxPaperSize id);
+
+ void SetMinMarginTopLeft(const wxPoint& pt) { m_minMarginTopLeft = pt; };
+ void SetMinMarginBottomRight(const wxPoint& pt) { m_minMarginBottomRight = pt; };
+ void SetMarginTopLeft(const wxPoint& pt) { m_marginTopLeft = pt; };
+ void SetMarginBottomRight(const wxPoint& pt) { m_marginBottomRight = pt; };
+ void SetDefaultMinMargins(bool flag) { m_defaultMinMargins = flag; };
+ void SetDefaultInfo(bool flag) { m_getDefaultInfo = flag; };
+
+ void EnableMargins(bool flag) { m_enableMargins = flag; };
+ void EnableOrientation(bool flag) { m_enableOrientation = flag; };
+ void EnablePaper(bool flag) { m_enablePaper = flag; };
+ void EnablePrinter(bool flag) { m_enablePrinter = flag; };
+ void EnableHelp(bool flag) { m_enableHelp = flag; };
+
+#if defined(__WXMAC__)
+ void ConvertToNative();
+ void ConvertFromNative();