From 2a225ba6418bfe7d5f6be6ce25aa9e9bd7b6d5c2 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 3 Aug 2007 08:50:18 +0000 Subject: [PATCH] Added Get/SetParentWindow to allow the same easy printing object to be used even if the original parent frame was deleted git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47861 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/latex/wx/hteasypr.tex | 34 +++++++++++++++++++++++----------- include/wx/html/htmprint.h | 5 +++++ 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/docs/latex/wx/hteasypr.tex b/docs/latex/wx/hteasypr.tex index 6099c5c924..887dc808d1 100644 --- a/docs/latex/wx/hteasypr.tex +++ b/docs/latex/wx/hteasypr.tex @@ -42,6 +42,26 @@ Constructor. \docparam{parentWindow}{pointer to the window that will own the preview frame and setup dialogs. May be NULL.} +\membersection{wxHtmlEasyPrinting::GetParentWindow}\label{wxhtmleasyprintinggetparentwindow} + +\constfunc{wxWindow*}{GetParentWindow}{\void} + +Gets the parent window for dialogs. + +\membersection{wxHtmlEasyPrinting::GetPrintData}\label{wxhtmleasyprintinggetprintdata} + +\func{wxPrintData*}{GetPrintData}{\void} + +Returns pointer to \helpref{wxPrintData}{wxprintdata} instance used by this class. You can +set its parameters (via SetXXXX methods). + +\membersection{wxHtmlEasyPrinting::GetPageSetupData}\label{wxhtmleasyprintinggetpagesetupdata} + +\func{wxPageSetupDialogData*}{GetPageSetupData}{\void} + +Returns a pointer to \helpref{wxPageSetupDialogData}{wxpagesetupdialogdata} instance used by +this class. You can set its parameters (via SetXXXX methods). + \membersection{wxHtmlEasyPrinting::PreviewFile}\label{wxhtmleasyprintingpreviewfile} \func{bool}{PreviewFile}{\param{const wxString\& }{htmlfile}} @@ -136,17 +156,9 @@ Set page footer. The following macros can be used inside it: \docparam{pg}{one of wxPAGE\_ODD, wxPAGE\_EVEN and wxPAGE\_ALL constants.} -\membersection{wxHtmlEasyPrinting::GetPrintData}\label{wxhtmleasyprintinggetprintdata} - -\func{wxPrintData*}{GetPrintData}{\void} - -Returns pointer to \helpref{wxPrintData}{wxprintdata} instance used by this class. You can -set its parameters (via SetXXXX methods). +\membersection{wxHtmlEasyPrinting::SetParentWindow}\label{wxhtmleasyprintingsetparentwindow} -\membersection{wxHtmlEasyPrinting::GetPageSetupData}\label{wxhtmleasyprintinggetpagesetupdata} +\func{void}{SetParentWindow}{\param{wxWindow*}{ window}} -\func{wxPageSetupDialogData*}{GetPageSetupData}{\void} - -Returns a pointer to \helpref{wxPageSetupDialogData}{wxpagesetupdialogdata} instance used by -this class. You can set its parameters (via SetXXXX methods). +Sets the parent window for dialogs. diff --git a/include/wx/html/htmprint.h b/include/wx/html/htmprint.h index da25bc2813..ef37bb4957 100644 --- a/include/wx/html/htmprint.h +++ b/include/wx/html/htmprint.h @@ -256,6 +256,11 @@ public: // return page setting data objects. // (You can set their parameters.) + wxWindow* GetParentWindow() const { return m_ParentWindow; } + // get the parent window + void SetParentWindow(wxWindow* window) { m_ParentWindow = window; } + // set the parent window + protected: virtual wxHtmlPrintout *CreatePrintout(); virtual bool DoPreview(wxHtmlPrintout *printout1, wxHtmlPrintout *printout2); -- 2.47.2