Add wxTEST_DIALOG for testing of modal dialogs.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2012-11-01 16:45:11 +00:00
parent a4d982a7cf
commit 643e9cf9f6
58 changed files with 632 additions and 48 deletions

View File

@@ -26,6 +26,7 @@
#include "wx/os2/private.h"
#include "wx/evtloop.h"
#include "wx/scopedptr.h"
#include "wx/testing.h"
#define wxDIALOG_DEFAULT_X 300
#define wxDIALOG_DEFAULT_Y 300
@@ -219,6 +220,8 @@ bool wxDialog::Show( bool bShow )
//
int wxDialog::ShowModal()
{
WX_TESTING_SHOW_MODAL_HOOK();
wxASSERT_MSG( !IsModal(), wxT("wxDialog::ShowModal() reentered?") );
m_endModalCalled = false;

View File

@@ -13,6 +13,7 @@
#include "wx/wxprec.h"
#include "wx/dirdlg.h"
#include "wx/testing.h"
#ifndef WX_PRECOMP
#include <stdio.h>
@@ -42,6 +43,8 @@ wxDirDialog::wxDirDialog(wxWindow *parent, const wxString& message,
int wxDirDialog::ShowModal()
{
WX_TESTING_SHOW_MODAL_HOOK();
// TODO
return wxID_CANCEL;
}

View File

@@ -39,6 +39,7 @@
#include <string.h>
#include "wx/tokenzr.h"
#include "wx/testing.h"
#define wxMAXPATH 1024
#define wxMAXFILE 1024
@@ -104,6 +105,8 @@ void wxFileDialog::GetPaths (
int wxFileDialog::ShowModal()
{
WX_TESTING_SHOW_MODAL_HOOK();
wxString sTheFilter;
wxString sFilterBuffer;
wxChar* pzFilterBuffer;

View File

@@ -23,6 +23,7 @@
#endif
#include "wx/fontutil.h"
#include "wx/testing.h"
#define INCL_PM
#include <os2.h>
@@ -36,6 +37,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxFontDialog, wxDialog)
int wxFontDialog::ShowModal()
{
WX_TESTING_SHOW_MODAL_HOOK();
FONTDLG vFontDlg;
char zCurrentFont[FACESIZE];
HWND hWndFontDlg;

View File

@@ -22,6 +22,7 @@
#include "wx/math.h"
#endif
#include "wx/testing.h"
#include "wx/os2/private.h"
#include <stdlib.h>
@@ -34,6 +35,8 @@ IMPLEMENT_CLASS(wxMessageDialog, wxDialog)
int wxMessageDialog::ShowModal()
{
WX_TESTING_SHOW_MODAL_HOOK();
HWND hWnd = 0;
ULONG ulStyle = MB_OK;
int nAns = wxOK;