]> git.saurik.com Git - wxWidgets.git/blob - include/wx/richmsgdlg.h
Somehow, setting a tint color makes gauge work :/.
[wxWidgets.git] / include / wx / richmsgdlg.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/richmsgdlg.h
3 // Purpose: wxRichMessageDialogBase
4 // Author: Rickard Westerlund
5 // Created: 2010-07-03
6 // Copyright: (c) 2010 wxWidgets team
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef _WX_RICHMSGDLG_H_BASE_
11 #define _WX_RICHMSGDLG_H_BASE_
12
13 #include "wx/defs.h"
14
15 #if wxUSE_RICHMSGDLG
16
17 #include "wx/msgdlg.h"
18
19 // Extends a message dialog with an optional checkbox and user-expandable
20 // detailed text.
21 class WXDLLIMPEXP_CORE wxRichMessageDialogBase : public wxGenericMessageDialog
22 {
23 public:
24 wxRichMessageDialogBase( wxWindow *parent,
25 const wxString& message,
26 const wxString& caption,
27 long style )
28 : wxGenericMessageDialog( parent, message, caption, style ),
29 m_detailsExpanderCollapsedLabel( wxGetTranslation("&See details") ),
30 m_detailsExpanderExpandedLabel( wxGetTranslation("&Hide details") ),
31 m_checkBoxValue( false )
32 { }
33
34 void ShowCheckBox(const wxString& checkBoxText, bool checked = false)
35 {
36 m_checkBoxText = checkBoxText;
37 m_checkBoxValue = checked;
38 }
39
40 wxString GetCheckBoxText() const { return m_checkBoxText; }
41
42 void ShowDetailedText(const wxString& detailedText)
43 { m_detailedText = detailedText; }
44
45 wxString GetDetailedText() const { return m_detailedText; }
46
47 virtual bool IsCheckBoxChecked() const { return m_checkBoxValue; }
48
49 protected:
50 const wxString m_detailsExpanderCollapsedLabel;
51 const wxString m_detailsExpanderExpandedLabel;
52
53 wxString m_checkBoxText;
54 bool m_checkBoxValue;
55 wxString m_detailedText;
56
57 private:
58 void ShowDetails(bool shown);
59
60 wxDECLARE_NO_COPY_CLASS(wxRichMessageDialogBase);
61 };
62
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"
66
67 #if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
68 #include "wx/msw/richmsgdlg.h"
69 #else
70 class WXDLLIMPEXP_CORE wxRichMessageDialog
71 : public wxGenericRichMessageDialog
72 {
73 public:
74 wxRichMessageDialog( wxWindow *parent,
75 const wxString& message,
76 const wxString& caption,
77 long style )
78 : wxGenericRichMessageDialog( parent, message, caption, style )
79 { }
80
81 private:
82 wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxRichMessageDialog);
83 };
84 #endif
85
86 #endif // wxUSE_RICHMSGDLG
87
88 #endif // _WX_RICHMSGDLG_H_BASE_