Allow configuring showing printing dialog in wxHtmlEasyPrinting

Add wxHtmlEasyPrinting::SetPromptMode() to allow suppressing the
"prompt" shown by wxPrinter::Print() when it's called from this class
code.

Closes https://github.com/wxWidgets/wxWidgets/pull/838
This commit is contained in:
pavel-t
2018-06-21 09:11:28 +03:00
committed by Vadim Zeitlin
parent 01cd3cc019
commit 710474c634
4 changed files with 48 additions and 1 deletions

View File

@@ -273,6 +273,16 @@ public:
void SetName(const wxString& name) { m_Name = name; }
// set the printout name
// Controls showing the dialog when printing: by default, always shown.
enum PromptMode
{
Prompt_Never,
Prompt_Once,
Prompt_Always
};
void SetPromptMode(PromptMode promptMode) { m_promptMode = promptMode; }
protected:
virtual wxHtmlPrintout *CreatePrintout();
virtual bool DoPreview(wxHtmlPrintout *printout1, wxHtmlPrintout *printout2);
@@ -296,6 +306,8 @@ private:
wxString m_Headers[2], m_Footers[2];
wxWindow *m_ParentWindow;
PromptMode m_promptMode;
wxDECLARE_NO_COPY_CLASS(wxHtmlEasyPrinting);
};