Add a public wxModalDialogHook class for intercepting modal dialogs.

Extract wxModalDialogHook from wx/testing.h into its own wx/modalhook.h,
extend it to allow to be notified not only about showing modal dialogs but
also about dismissing them and document it and show its use in the dialogs
sample.

Also replace all the WX_TESTING_SHOW_MODAL_HOOK macros occurrences with
WX_HOOK_MODAL_DIALOG.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74037 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-05-20 13:15:41 +00:00
parent 9bc3af3e64
commit 691745ab41
64 changed files with 712 additions and 194 deletions

View File

@@ -24,7 +24,7 @@
#include "wx/intl.h"
#endif
#include "wx/testing.h"
#include "wx/modalhook.h"
#include <gtk/gtk.h>
#include "wx/gtk/private.h"
@@ -276,7 +276,7 @@ void wxMessageDialog::GTKCreateMsgDialog()
int wxMessageDialog::ShowModal()
{
WX_TESTING_SHOW_MODAL_HOOK();
WX_HOOK_MODAL_DIALOG();
// break the mouse capture as it would interfere with modal dialog (see
// wxDialog::ShowModal)