Add footer text and icon to wxRichMessageDialog

The underlying Windows TaskDialog supports adding an additional footer
to the message dialog. This makes the native functionality available
and implements it in the generic version.

See https://github.com/wxWidgets/wxWidgets/pull/573
This commit is contained in:
Tobias Taschner
2018-01-20 16:53:13 +01:00
committed by VZ
parent bc13119494
commit d6b88ca399
7 changed files with 156 additions and 1 deletions

View File

@@ -28,7 +28,8 @@ public:
: wxGenericMessageDialog( parent, message, caption, style ),
m_detailsExpanderCollapsedLabel( wxGetTranslation("&See details") ),
m_detailsExpanderExpandedLabel( wxGetTranslation("&Hide details") ),
m_checkBoxValue( false )
m_checkBoxValue( false ),
m_footerIcon( 0 )
{ }
void ShowCheckBox(const wxString& checkBoxText, bool checked = false)
@@ -46,6 +47,16 @@ public:
virtual bool IsCheckBoxChecked() const { return m_checkBoxValue; }
void SetFooterText(const wxString& footerText)
{ m_footerText = footerText; }
wxString GetFooterText() const { return m_footerText; }
void SetFooterIcon(int icon)
{ m_footerIcon = icon; }
int GetFooterIcon() const { return m_footerIcon; }
protected:
const wxString m_detailsExpanderCollapsedLabel;
const wxString m_detailsExpanderExpandedLabel;
@@ -53,6 +64,8 @@ protected:
wxString m_checkBoxText;
bool m_checkBoxValue;
wxString m_detailedText;
wxString m_footerText;
int m_footerIcon;
private:
void ShowDetails(bool shown);