+ virtual bool OnInit();
+
+protected:
+#if wxUSE_LOG
+ virtual wxAppTraits *CreateTraits() { return new MyAppTraits; }
+#endif // wxUSE_LOG
+};
+
+#if USE_MODAL_PRESENTATION
+
+// A custom modeless dialog
+class MyModelessDialog : public wxDialog
+{
+public:
+ MyModelessDialog(wxWindow *parent);
+
+ void OnButton(wxCommandEvent& event);
+ void OnClose(wxCloseEvent& event);
+
+private:
+ DECLARE_EVENT_TABLE()
+};
+
+// A custom modal dialog
+class MyModalDialog : public wxDialog
+{
+public:
+ MyModalDialog(wxWindow *parent);
+
+ void OnButton(wxCommandEvent& event);
+
+private:
+ wxButton *m_btnModal,
+ *m_btnModeless,
+ *m_btnDelete;
+
+ DECLARE_EVENT_TABLE()
+};
+
+#endif // USE_MODAL_PRESENTATION
+
+// A class demonstrating CreateStdDialogButtonSizer()
+class StdButtonSizerDialog : public wxDialog
+{
+public:
+ StdButtonSizerDialog(wxWindow *parent);
+
+ void OnEvent(wxCommandEvent& event);
+
+private:
+ void EnableDisableControls();
+
+ wxCheckBox *m_chkboxAffirmativeButton;
+ wxRadioButton *m_radiobtnOk,
+ *m_radiobtnYes;
+
+ wxCheckBox *m_chkboxDismissButton;
+ wxRadioButton *m_radiobtnClose,
+ *m_radiobtnCancel;
+
+ wxCheckBox *m_chkboxApply,
+ *m_chkboxNo,
+ *m_chkboxHelp,
+ *m_chkboxNoDefault;
+
+ wxSizer *m_buttonsSizer;
+
+ DECLARE_EVENT_TABLE()
+};
+
+// Test harness for wxMessageDialog.
+class TestMessageBoxDialog : public wxDialog
+{
+public:
+ TestMessageBoxDialog(wxWindow *parent);
+
+private:
+ void OnApply(wxCommandEvent& event);
+ void OnClose(wxCommandEvent& event);
+ void OnUpdateLabelUI(wxUpdateUIEvent& event);
+ void OnUpdateNoDefaultUI(wxUpdateUIEvent& event);
+
+ enum
+ {
+ Btn_Yes,
+ Btn_No,
+ Btn_Ok,
+ Btn_Cancel,
+ Btn_Max
+ };
+
+ struct BtnInfo
+ {
+ int flag;
+ const char *name;
+ };
+
+ static const BtnInfo ms_btnInfo[Btn_Max];
+
+ enum
+ {
+ MsgDlgIcon_No,
+ MsgDlgIcon_None,
+ MsgDlgIcon_Info,
+ MsgDlgIcon_Question,
+ MsgDlgIcon_Warning,
+ MsgDlgIcon_Error,
+ MsgDlgIcon_Max
+ };
+
+ wxTextCtrl *m_textMsg,
+ *m_textExtMsg;
+
+ wxCheckBox *m_buttons[Btn_Max];
+ wxTextCtrl *m_labels[Btn_Max];
+
+ wxRadioBox *m_icons;
+
+ wxCheckBox *m_chkNoDefault,
+ *m_chkCentre;
+
+ DECLARE_EVENT_TABLE()
+ wxDECLARE_NO_COPY_CLASS(TestMessageBoxDialog);
+};
+
+class TestDefaultActionDialog: public wxDialog
+{
+public:
+ TestDefaultActionDialog( wxWindow *parent );