+ DECLARE_DYNAMIC_CLASS(wxPrintDialogData)
+
+ wxPrintDialogData();
+ wxPrintDialogData(const wxPrintDialogData& dialogData);
+ wxPrintDialogData(const wxPrintData& printData);
+ ~wxPrintDialogData();
+
+ int GetFromPage() const { return m_printFromPage; };
+ int GetToPage() const { return m_printToPage; };
+ int GetMinPage() const { return m_printMinPage; };
+ int GetMaxPage() const { return m_printMaxPage; };
+ int GetNoCopies() const { return m_printNoCopies; };
+ bool GetAllPages() const { return m_printAllPages; };
+ bool GetSelection() const { return m_printSelection; };
+ bool GetCollate() const { return m_printCollate; };
+ bool GetPrintToFile() const { return m_printToFile; };
+ bool GetSetupDialog() const { return m_printSetupDialog; };
+
+ void SetFromPage(int v) { m_printFromPage = v; };
+ void SetToPage(int v) { m_printToPage = v; };
+ void SetMinPage(int v) { m_printMinPage = v; };
+ void SetMaxPage(int v) { m_printMaxPage = v; };
+ void SetNoCopies(int v) { m_printNoCopies = v; };
+ void SetAllPages(bool flag) { m_printAllPages = flag; };
+ void SetSelection(bool flag) { m_printSelection = flag; };
+ void SetCollate(bool flag) { m_printCollate = flag; };
+ void SetPrintToFile(bool flag) { m_printToFile = flag; };
+ void SetSetupDialog(bool flag) { m_printSetupDialog = flag; };
+
+ void EnablePrintToFile(bool flag) { m_printEnablePrintToFile = flag; };
+ void EnableSelection(bool flag) { m_printEnableSelection = flag; };
+ void EnablePageNumbers(bool flag) { m_printEnablePageNumbers = flag; };
+ void EnableHelp(bool flag) { m_printEnableHelp = flag; };
+
+ bool GetEnablePrintToFile() const { return m_printEnablePrintToFile; };
+ bool GetEnableSelection() const { return m_printEnableSelection; };
+ bool GetEnablePageNumbers() const { return m_printEnablePageNumbers; };
+ bool GetEnableHelp() const { return m_printEnableHelp; };
+
+ wxPrintData& GetPrintData() { return m_printData; }
+ void SetPrintData(const wxPrintData& printData) { m_printData = printData; }
+
+ void operator=(const wxPrintDialogData& data);
+ void operator=(const wxPrintData& data); // Sets internal m_printData member
+
+#ifdef __WXMSW__
+ // Convert to/from the PRINTDLG structure
+ void ConvertToNative();
+ void ConvertFromNative();
+ void SetOwnerWindow(wxWindow* win);
+ void* GetNativeData() const { return m_printDlgData; }
+#elif defined(__WXMAC__)
+ void ConvertToNative();
+ void ConvertFromNative();
+#endif
+
+#ifdef __WXMSW__
+ void* m_printDlgData;
+#endif
+
+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;
+ bool m_printSetupDialog;
+
+ wxPrintData m_printData;
+};
+
+/*
+* This is the data used (and returned) by the wxPageSetupDialog.
+*/
+
+// Compatibility with old name
+#define wxPageSetupData wxPageSetupDialogData
+
+class WXDLLEXPORT wxPageSetupDialogData: public wxObject
+{
+ DECLARE_DYNAMIC_CLASS(wxPageSetupDialogData)
+
+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; };
+
+ // 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; };