1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/richmsgdlg.h
3 // Purpose: wxRichMessageDialogBase
4 // Author: Rickard Westerlund
7 // Copyright: (c) 2010 wxWidgets team
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_RICHMSGDLG_H_BASE_
12 #define _WX_RICHMSGDLG_H_BASE_
18 #include "wx/msgdlg.h"
20 // Extends a message dialog with an optional checkbox and user-expandable
22 class WXDLLIMPEXP_CORE wxRichMessageDialogBase
: public wxGenericMessageDialog
25 wxRichMessageDialogBase( wxWindow
*parent
,
26 const wxString
& message
,
27 const wxString
& caption
,
29 : wxGenericMessageDialog( parent
, message
, caption
, style
),
30 m_detailsExpanderCollapsedLabel( _("&See details") ),
31 m_detailsExpanderExpandedLabel( _("&Hide details") ),
32 m_checkBoxValue( false )
35 void ShowCheckBox(const wxString
& checkBoxText
, bool checked
= false)
37 m_checkBoxText
= checkBoxText
;
38 m_checkBoxValue
= checked
;
41 wxString
GetCheckBoxText() const { return m_checkBoxText
; }
43 void ShowDetailedText(const wxString
& detailedText
)
44 { m_detailedText
= detailedText
; }
46 wxString
GetDetailedText() const { return m_detailedText
; }
48 virtual bool IsCheckBoxChecked() const { return m_checkBoxValue
; };
51 const wxString m_detailsExpanderCollapsedLabel
;
52 const wxString m_detailsExpanderExpandedLabel
;
54 wxString m_checkBoxText
;
56 wxString m_detailedText
;
59 void ShowDetails(bool shown
);
61 wxDECLARE_NO_COPY_CLASS(wxRichMessageDialogBase
);
64 // Always include the generic version as it's currently used as the base class
65 // by the MSW native implementation too.
66 #include "wx/generic/richmsgdlgg.h"
68 #if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
69 #include "wx/msw/richmsgdlg.h"
71 class WXDLLIMPEXP_CORE wxRichMessageDialog
72 : public wxGenericRichMessageDialog
75 wxRichMessageDialog( wxWindow
*parent
,
76 const wxString
& message
,
77 const wxString
& caption
,
79 : wxGenericRichMessageDialog( parent
, message
, caption
, style
)
83 wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxRichMessageDialog
);
87 #endif // wxUSE_RICHMSGDLG
89 #endif // _WX_RICHMSGDLG_H_BASE_