+// Compatibility with old name
+#define wxPageSetupData wxPageSetupDialogData
+
+class WXDLLEXPORT wxPageSetupDialogData: public wxObject
+{
+public:
+ wxPageSetupDialogData();
+ wxPageSetupDialogData(const wxPageSetupDialogData& dialogData);
+ wxPageSetupDialogData(const wxPrintData& printData);
+ virtual ~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 IsOk(); }
+ bool IsOk() 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; }
+
+ // Use paper size defined in this object to set the wxPrintData
+ // paper id
+ void CalculateIdFromPaperSize();
+
+ // Use paper id in wxPrintData to set this object's paper size
+ void CalculatePaperSizeFromId();
+
+ wxPageSetupDialogData& operator=(const wxPageSetupData& data);
+ wxPageSetupDialogData& operator=(const wxPrintData& data);
+
+ wxPrintData& GetPrintData() { return m_printData; }
+ const wxPrintData& GetPrintData() const { return m_printData; }
+ void SetPrintData(const wxPrintData& printData);
+
+private:
+ wxSize m_paperSize; // The dimensions selected by the user (on return, same as in wxPrintData?)
+ wxPoint m_minMarginTopLeft;
+ wxPoint m_minMarginBottomRight;
+ wxPoint m_marginTopLeft;
+ wxPoint m_marginBottomRight;
+ 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;
+ wxPrintData m_printData;
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxPageSetupDialogData)