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:
@@ -34,7 +34,7 @@
|
||||
#include "wx/dynlib.h"
|
||||
#include "wx/paper.h"
|
||||
#include "wx/scopeguard.h"
|
||||
#include "wx/testing.h"
|
||||
#include "wx/modalhook.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
@@ -624,7 +624,7 @@ wxGtkPrintDialog::~wxGtkPrintDialog()
|
||||
// This is called even if we actually don't want the dialog to appear.
|
||||
int wxGtkPrintDialog::ShowModal()
|
||||
{
|
||||
WX_TESTING_SHOW_MODAL_HOOK();
|
||||
WX_HOOK_MODAL_DIALOG();
|
||||
|
||||
// We need to restore the settings given in the constructor.
|
||||
wxPrintData data = m_printDialogData.GetPrintData();
|
||||
@@ -750,7 +750,7 @@ wxGtkPageSetupDialog::~wxGtkPageSetupDialog()
|
||||
|
||||
int wxGtkPageSetupDialog::ShowModal()
|
||||
{
|
||||
WX_TESTING_SHOW_MODAL_HOOK();
|
||||
WX_HOOK_MODAL_DIALOG();
|
||||
|
||||
// Get the config.
|
||||
m_pageDialogData.GetPrintData().ConvertToNative();
|
||||
|
Reference in New Issue
Block a user