1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/richmsgdlg.h
3 // Purpose: wxRichMessageDialogBase
4 // Author: Rickard Westerlund
6 // Copyright: (c) 2010 wxWidgets team
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_RICHMSGDLG_H_BASE_
11 #define _WX_RICHMSGDLG_H_BASE_
17 #include "wx/msgdlg.h"
19 // Extends a message dialog with an optional checkbox and user-expandable
21 class WXDLLIMPEXP_CORE wxRichMessageDialogBase
: public wxGenericMessageDialog
24 wxRichMessageDialogBase( wxWindow
*parent
,
25 const wxString
& message
,
26 const wxString
& caption
,
28 : wxGenericMessageDialog( parent
, message
, caption
, style
),
29 m_detailsExpanderCollapsedLabel( _("&See details") ),
30 m_detailsExpanderExpandedLabel( _("&Hide details") ),
31 m_checkBoxValue( false )
34 void ShowCheckBox(const wxString
& checkBoxText
, bool checked
= false)
36 m_checkBoxText
= checkBoxText
;
37 m_checkBoxValue
= checked
;
40 wxString
GetCheckBoxText() const { return m_checkBoxText
; }
42 void ShowDetailedText(const wxString
& detailedText
)
43 { m_detailedText
= detailedText
; }
45 wxString
GetDetailedText() const { return m_detailedText
; }
47 virtual bool IsCheckBoxChecked() const { return m_checkBoxValue
; }
50 const wxString m_detailsExpanderCollapsedLabel
;
51 const wxString m_detailsExpanderExpandedLabel
;
53 wxString m_checkBoxText
;
55 wxString m_detailedText
;
58 void ShowDetails(bool shown
);
60 wxDECLARE_NO_COPY_CLASS(wxRichMessageDialogBase
);
63 // Always include the generic version as it's currently used as the base class
64 // by the MSW native implementation too.
65 #include "wx/generic/richmsgdlgg.h"
67 #if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
68 #include "wx/msw/richmsgdlg.h"
70 class WXDLLIMPEXP_CORE wxRichMessageDialog
71 : public wxGenericRichMessageDialog
74 wxRichMessageDialog( wxWindow
*parent
,
75 const wxString
& message
,
76 const wxString
& caption
,
78 : wxGenericRichMessageDialog( parent
, message
, caption
, style
)
82 wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxRichMessageDialog
);
86 #endif // wxUSE_RICHMSGDLG
88 #endif // _WX_RICHMSGDLG_H_BASE_