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:
@@ -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);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user