Added Ok() member for print data, print dialog, page dialog, page dialog data

so we can test in advance whether the print/page setup dialogs will fail.
Removed assertions that would fire if the default printer was not found, for example.
Added call to Ok() from HTML print code with suitable error message.
Commented out my erroneous fix to wxStaticText.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15438 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2002-05-08 19:00:43 +00:00
parent c0187f69d6
commit 58cf0491e3
6 changed files with 79 additions and 8 deletions

View File

@@ -140,6 +140,9 @@ class WXDLLEXPORT wxPrintData: public wxObject
bool GetCollate() const { return m_printCollate; };
int GetOrientation() const { return m_printOrientation; };
// Is this data OK for showing the print dialog?
bool Ok() const ;
const wxString& GetPrinterName() const { return m_printerName; }
bool GetColour() const { return m_colour; }
wxDuplexMode GetDuplex() const { return m_duplexMode; }
@@ -288,6 +291,9 @@ class WXDLLEXPORT wxPrintDialogData: public wxObject
bool GetEnablePageNumbers() const { return m_printEnablePageNumbers; };
bool GetEnableHelp() const { return m_printEnableHelp; };
// Is this data OK for showing the print dialog?
bool Ok() const { return m_printData.Ok() ; }
wxPrintData& GetPrintData() { return m_printData; }
void SetPrintData(const wxPrintData& printData) { m_printData = printData; }
@@ -361,6 +367,9 @@ public:
bool GetDefaultInfo() const { return m_getDefaultInfo; };
bool GetEnableHelp() const { return m_enableHelp; };
// Is this data OK for showing the page setup dialog?
bool Ok() const { return m_printData.Ok() ; }
// If a corresponding paper type is found in the paper database, will set the m_printData
// paper size id member as well.
void SetPaperSize(const wxSize& sz);