X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..dc484d491b15355285a89da275c58c2ef247d1f4:/include/wx/mac/classic/printdlg.h?ds=sidebyside diff --git a/include/wx/mac/classic/printdlg.h b/include/wx/mac/classic/printdlg.h index 3fc28c3d03..2bb57e93bc 100644 --- a/include/wx/mac/classic/printdlg.h +++ b/include/wx/mac/classic/printdlg.h @@ -31,7 +31,7 @@ class WXDLLEXPORT wxPrintDialog: public wxDialog wxPrintDialog(); wxPrintDialog(wxWindow *parent, wxPrintDialogData* data = NULL); wxPrintDialog(wxWindow *parent, wxPrintData* data ); - ~wxPrintDialog(); + virtual ~wxPrintDialog(); bool Create(wxWindow *parent, wxPrintDialogData* data = NULL); virtual int ShowModal(); @@ -54,16 +54,48 @@ class WXDLLEXPORT wxPageSetupDialog: public wxDialog public: wxPageSetupDialog(); wxPageSetupDialog(wxWindow *parent, wxPageSetupData *data = NULL); - ~wxPageSetupDialog(); + virtual ~wxPageSetupDialog(); bool Create(wxWindow *parent, wxPageSetupData *data = NULL); virtual int ShowModal(); - inline wxPageSetupData& GetPageSetupData() { return m_pageSetupData; } + virtual wxPageSetupData& GetPageSetupDialogData() { return m_pageSetupData; } private: wxPageSetupData m_pageSetupData; wxWindow* m_dialogParent; }; -#endif - // _WX_PRINTDLG_H_ + +/* +* wxMacPageMarginsDialog +* A Mac dialog for setting the page margins separately from page setup since +* (native) wxMacPageSetupDialog doesn't let you set margins. +*/ + +class WXDLLEXPORT wxMacPageMarginsDialog : public wxDialog +{ +public: + wxMacPageMarginsDialog(wxFrame* parent, wxPageSetupData* data); + bool TransferToWindow(); + bool TransferDataFromWindow(); + virtual wxPageSetupData& GetPageSetupDialogData() { return *m_pageSetupDialogData; } + +private: + wxPageSetupData* m_pageSetupDialogData; + + wxPoint m_MinMarginTopLeft; + wxPoint m_MinMarginBottomRight; + wxTextCtrl *m_LeftMargin; + wxTextCtrl *m_TopMargin; + wxTextCtrl *m_RightMargin; + wxTextCtrl *m_BottomMargin; + + void GetMinMargins(); + bool CheckValue(wxTextCtrl* textCtrl, int *value, int minValue, const wxString& name); + +private: + DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacPageMarginsDialog) +}; + + +#endif // _WX_PRINTDLG_H_