+#if wxUSE_RICHMSGDLG
+// ----------------------------------------------------------------------------
+// TestRichMessageDialog
+// ----------------------------------------------------------------------------
+
+BEGIN_EVENT_TABLE(TestRichMessageDialog, TestMessageBoxDialog)
+ EVT_BUTTON(wxID_APPLY, TestRichMessageDialog::OnApply)
+END_EVENT_TABLE()
+
+TestRichMessageDialog::TestRichMessageDialog(wxWindow *parent)
+ : TestMessageBoxDialog(parent)
+{
+ SetTitle("Rich Message Dialog Test Dialog");
+}
+
+void TestRichMessageDialog::AddAdditionalTextOptions(wxSizer *sizer)
+{
+ wxSizer * const sizerMsgs = new wxStaticBoxSizer(wxVERTICAL, this,
+ "&Additional Elements");
+
+ // add a option to show a check box.
+ wxFlexGridSizer * const sizerCheckBox = new wxFlexGridSizer(2, 5, 5);
+ sizerCheckBox->AddGrowableCol(1);
+ sizerCheckBox->Add(new wxStaticText(this, wxID_ANY, "&Check box:"));
+ m_textCheckBox = new wxTextCtrl(this, wxID_ANY);
+ sizerCheckBox->Add(m_textCheckBox, wxSizerFlags(1).Expand().Border(wxBOTTOM));
+ sizerMsgs->Add(sizerCheckBox, wxSizerFlags(1).Expand());
+
+ // add option to show a detailed text.
+ sizerMsgs->Add(new wxStaticText(this, wxID_ANY, "&Detailed message:"));
+ m_textDetailed = new wxTextCtrl(this, wxID_ANY, "",
+ wxDefaultPosition, wxDefaultSize,
+ wxTE_MULTILINE);
+ sizerMsgs->Add(m_textDetailed, wxSizerFlags(1).Expand());
+
+ sizer->Add(sizerMsgs, wxSizerFlags(1).Expand().Border());
+}
+
+void TestRichMessageDialog::AddAdditionalFlags(wxSizer *sizer)
+{
+ // add checkbox to set the initial state for the checkbox shown
+ // in the dialog.
+ m_initialValueCheckBox =
+ new wxCheckBox(this, wxID_ANY, "Checkbox initially checked");
+ sizer->Add(m_initialValueCheckBox, wxSizerFlags(1).Border());
+}
+
+void TestRichMessageDialog::OnApply(wxCommandEvent& WXUNUSED(event))
+{
+ wxRichMessageDialog dlg(this, GetMessage(), "Test Rich Message Dialog",
+ GetStyle());
+ PrepareMessageDialog(dlg);
+
+ dlg.ShowCheckBox(m_textCheckBox->GetValue(),
+ m_initialValueCheckBox->GetValue());
+ dlg.ShowDetailedText(m_textDetailed->GetValue());
+
+ dlg.ShowModal();
+}
+
+#endif // wxUSE_RICHMSGDLG