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/branches/WX_2_8_BRANCH@47862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2007-08-03 08:50:49 +00:00
parent a635e97d0e
commit d916510cb3
3 changed files with 32 additions and 11 deletions

View File

@@ -38,6 +38,26 @@ Constructor.
\docparam{parentWindow}{pointer to the window that will own the preview frame and setup dialogs. May be NULL.} \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} \membersection{wxHtmlEasyPrinting::PreviewFile}\label{wxhtmleasyprintingpreviewfile}
\func{bool}{PreviewFile}{\param{const wxString\& }{htmlfile}} \func{bool}{PreviewFile}{\param{const wxString\& }{htmlfile}}
@@ -132,17 +152,9 @@ Set page footer. The following macros can be used inside it:
\docparam{pg}{one of wxPAGE\_ODD, wxPAGE\_EVEN and wxPAGE\_ALL constants.} \docparam{pg}{one of wxPAGE\_ODD, wxPAGE\_EVEN and wxPAGE\_ALL constants.}
\membersection{wxHtmlEasyPrinting::GetPrintData}\label{wxhtmleasyprintinggetprintdata} \membersection{wxHtmlEasyPrinting::SetParentWindow}\label{wxhtmleasyprintingsetparentwindow}
\func{wxPrintData*}{GetPrintData}{\void} \func{void}{SetParentWindow}{\param{wxWindow*}{ window}}
Returns pointer to \helpref{wxPrintData}{wxprintdata} instance used by this class. You can Sets the parent window for dialogs.
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).

View File

@@ -256,6 +256,13 @@ public:
// return page setting data objects. // return page setting data objects.
// (You can set their parameters.) // (You can set their parameters.)
#if wxABI_VERSION >= 20805
wxWindow* GetParentWindow() const { return m_ParentWindow; }
// get the parent window
void SetParentWindow(wxWindow* window) { m_ParentWindow = window; }
// set the parent window
#endif
protected: protected:
virtual wxHtmlPrintout *CreatePrintout(); virtual wxHtmlPrintout *CreatePrintout();
virtual bool DoPreview(wxHtmlPrintout *printout1, wxHtmlPrintout *printout2); virtual bool DoPreview(wxHtmlPrintout *printout1, wxHtmlPrintout *printout2);

View File

@@ -34,6 +34,8 @@
*wxAuiNotebook*SetNormalFont*; *wxAuiNotebook*SetNormalFont*;
*wxAuiNotebook*SetSelectedFont*; *wxAuiNotebook*SetSelectedFont*;
*wxDocument*GetUserReadableName*; *wxDocument*GetUserReadableName*;
*wxHtmlEasyPrinting*GetParentWindow*;
*wxHtmlEasyPrinting*SetParentWindow*;
*wxLog*DoCreateOnDemand*; *wxLog*DoCreateOnDemand*;
*wxLogChain*DetachOldLog*; *wxLogChain*DetachOldLog*;
*wxMemoryFSHandler*AddFileWithMimeType*; *wxMemoryFSHandler*AddFileWithMimeType*;