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