Add wxUSE_UIACTIONSIMULATOR and turn it off by default.

Disable the recently added wxUIActionSimulator class until the issues with it
mentioned at http://article.gmane.org/gmane.comp.lib.wxwidgets.devel/119792/
are fixed.

Also use "" around wx headers instead of <> in wx code itself.

See #11801.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63736 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-03-22 11:40:35 +00:00
parent 75738bb65b
commit 9b7e022676
19 changed files with 222 additions and 89 deletions

53
configure vendored
View File

@@ -1883,6 +1883,7 @@ Optional Features:
--enable-metafiles use wxMetaFile (Win32 only) --enable-metafiles use wxMetaFile (Win32 only)
--enable-dragimage use wxDragImage --enable-dragimage use wxDragImage
--enable-accessibility enable accessibility support --enable-accessibility enable accessibility support
--enable-uiactionsim use wxUIActionSimulator (experimental)
--enable-palette use wxPalette class --enable-palette use wxPalette class
--enable-image use wxImage class --enable-image use wxImage class
--enable-gif use gif images (GIF file format) --enable-gif use gif images (GIF file format)
@@ -2969,6 +2970,7 @@ DEFAULT_wxUSE_LIBSDL=no
DEFAULT_wxUSE_ACCESSIBILITY=no DEFAULT_wxUSE_ACCESSIBILITY=no
DEFAULT_wxUSE_IPV6=no DEFAULT_wxUSE_IPV6=no
DEFAULT_wxUSE_GSTREAMER8=no DEFAULT_wxUSE_GSTREAMER8=no
DEFAULT_wxUSE_UIACTIONSIMULATOR=no
DEFAULT_wxUSE_UNICODE_UTF8=auto DEFAULT_wxUSE_UNICODE_UTF8=auto
DEFAULT_wxUSE_OPENGL=auto DEFAULT_wxUSE_OPENGL=auto
@@ -13557,6 +13559,50 @@ fi
echo "${ECHO_T}$result" >&6; } echo "${ECHO_T}$result" >&6; }
enablestring=
defaultval=$wxUSE_ALL_FEATURES
if test -z "$defaultval"; then
if test x"$enablestring" = xdisable; then
defaultval=yes
else
defaultval=no
fi
fi
{ echo "$as_me:$LINENO: checking for --${enablestring:-enable}-uiactionsim" >&5
echo $ECHO_N "checking for --${enablestring:-enable}-uiactionsim... $ECHO_C" >&6; }
# Check whether --enable-uiactionsim was given.
if test "${enable_uiactionsim+set}" = set; then
enableval=$enable_uiactionsim;
if test "$enableval" = yes; then
wx_cv_use_uiactionsim='wxUSE_UIACTIONSIMULATOR=yes'
else
wx_cv_use_uiactionsim='wxUSE_UIACTIONSIMULATOR=no'
fi
else
wx_cv_use_uiactionsim='wxUSE_UIACTIONSIMULATOR=${'DEFAULT_wxUSE_UIACTIONSIMULATOR":-$defaultval}"
fi
eval "$wx_cv_use_uiactionsim"
if test x"$enablestring" = xdisable; then
if test $wxUSE_UIACTIONSIMULATOR = no; then
result=yes
else
result=no
fi
else
result=$wxUSE_UIACTIONSIMULATOR
fi
{ echo "$as_me:$LINENO: result: $result" >&5
echo "${ECHO_T}$result" >&6; }
enablestring= enablestring=
@@ -46306,6 +46352,13 @@ _ACEOF
fi fi
if test "$wxUSE_UIACTIONSIMULATOR" = "yes" ; then
cat >>confdefs.h <<\_ACEOF
#define wxUSE_UIACTIONSIMULATOR 1
_ACEOF
fi
USES_CONTROLS=0 USES_CONTROLS=0
if test "$wxUSE_CONTROLS" = "yes"; then if test "$wxUSE_CONTROLS" = "yes"; then

View File

@@ -387,6 +387,7 @@ dnl features disabled by default
DEFAULT_wxUSE_ACCESSIBILITY=no DEFAULT_wxUSE_ACCESSIBILITY=no
DEFAULT_wxUSE_IPV6=no DEFAULT_wxUSE_IPV6=no
DEFAULT_wxUSE_GSTREAMER8=no DEFAULT_wxUSE_GSTREAMER8=no
DEFAULT_wxUSE_UIACTIONSIMULATOR=no
dnl automatic features dnl automatic features
DEFAULT_wxUSE_UNICODE_UTF8=auto DEFAULT_wxUSE_UNICODE_UTF8=auto
@@ -1013,6 +1014,7 @@ WX_ARG_FEATURE(joystick, [ --enable-joystick use wxJoystick], wxUSE_JO
WX_ARG_FEATURE(metafile, [ --enable-metafiles use wxMetaFile (Win32 only)], wxUSE_METAFILE) WX_ARG_FEATURE(metafile, [ --enable-metafiles use wxMetaFile (Win32 only)], wxUSE_METAFILE)
WX_ARG_FEATURE(dragimage, [ --enable-dragimage use wxDragImage], wxUSE_DRAGIMAGE) WX_ARG_FEATURE(dragimage, [ --enable-dragimage use wxDragImage], wxUSE_DRAGIMAGE)
WX_ARG_FEATURE(accessibility,[ --enable-accessibility enable accessibility support], wxUSE_ACCESSIBILITY) WX_ARG_FEATURE(accessibility,[ --enable-accessibility enable accessibility support], wxUSE_ACCESSIBILITY)
WX_ARG_FEATURE(uiactionsim, [ --enable-uiactionsim use wxUIActionSimulator (experimental)], wxUSE_UIACTIONSIMULATOR)
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl support for image formats that do not rely on external library dnl support for image formats that do not rely on external library
@@ -6719,6 +6721,10 @@ if test "$wxUSE_MOUSEWHEEL" = "yes" ; then
AC_DEFINE(wxUSE_MOUSEWHEEL) AC_DEFINE(wxUSE_MOUSEWHEEL)
fi fi
if test "$wxUSE_UIACTIONSIMULATOR" = "yes" ; then
AC_DEFINE(wxUSE_UIACTIONSIMULATOR)
fi
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl GUI controls dnl GUI controls
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------

View File

@@ -1065,6 +1065,14 @@
# endif # endif
#endif /* !defined(wxUSE_TREECTRL) */ #endif /* !defined(wxUSE_TREECTRL) */
#ifndef wxUSE_UIACTIONSIMULATOR
# ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_UIACTIONSIMULATOR must be defined, please read comment near the top of this file."
# else
# define wxUSE_UIACTIONSIMULATOR 0
# endif
#endif /* !defined(wxUSE_UIACTIONSIMULATOR) */
#ifndef wxUSE_VALIDATORS #ifndef wxUSE_VALIDATORS
# ifdef wxABORT_ON_CONFIG_ERROR # ifdef wxABORT_ON_CONFIG_ERROR
# error "wxUSE_VALIDATORS must be defined, please read comment near the top of this file." # error "wxUSE_VALIDATORS must be defined, please read comment near the top of this file."

View File

@@ -1214,6 +1214,11 @@
#define wxUSE_MOUSEWHEEL 1 #define wxUSE_MOUSEWHEEL 1
// Include mouse wheel support // Include mouse wheel support
// Compile wxUIActionSimulator class?
//
// This is experimental code subject to change. It's not fully implemented yet.
#define wxUSE_UIACTIONSIMULATOR 0
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxDC classes for various output formats // wxDC classes for various output formats
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -1214,6 +1214,11 @@
#define wxUSE_MOUSEWHEEL 1 #define wxUSE_MOUSEWHEEL 1
// Include mouse wheel support // Include mouse wheel support
// Compile wxUIActionSimulator class?
//
// This is experimental code subject to change. It's not fully implemented yet.
#define wxUSE_UIACTIONSIMULATOR 0
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxDC classes for various output formats // wxDC classes for various output formats
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -1214,6 +1214,11 @@
#define wxUSE_MOUSEWHEEL 1 #define wxUSE_MOUSEWHEEL 1
// Include mouse wheel support // Include mouse wheel support
// Compile wxUIActionSimulator class?
//
// This is experimental code subject to change. It's not fully implemented yet.
#define wxUSE_UIACTIONSIMULATOR 0
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxDC classes for various output formats // wxDC classes for various output formats
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -1214,6 +1214,11 @@
#define wxUSE_MOUSEWHEEL 1 #define wxUSE_MOUSEWHEEL 1
// Include mouse wheel support // Include mouse wheel support
// Compile wxUIActionSimulator class?
//
// This is experimental code subject to change. It's not fully implemented yet.
#define wxUSE_UIACTIONSIMULATOR 0
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxDC classes for various output formats // wxDC classes for various output formats
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -1215,6 +1215,11 @@
#define wxUSE_MOUSEWHEEL 1 #define wxUSE_MOUSEWHEEL 1
// Include mouse wheel support // Include mouse wheel support
// Compile wxUIActionSimulator class?
//
// This is experimental code subject to change. It's not fully implemented yet.
#define wxUSE_UIACTIONSIMULATOR 0
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxDC classes for various output formats // wxDC classes for various output formats
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -1214,6 +1214,11 @@
#define wxUSE_MOUSEWHEEL 1 #define wxUSE_MOUSEWHEEL 1
// Include mouse wheel support // Include mouse wheel support
// Compile wxUIActionSimulator class?
//
// This is experimental code subject to change. It's not fully implemented yet.
#define wxUSE_UIACTIONSIMULATOR 0
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxDC classes for various output formats // wxDC classes for various output formats
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -1210,6 +1210,11 @@
#define wxUSE_MOUSEWHEEL 1 #define wxUSE_MOUSEWHEEL 1
// Include mouse wheel support // Include mouse wheel support
// Compile wxUIActionSimulator class?
//
// This is experimental code subject to change. It's not fully implemented yet.
#define wxUSE_UIACTIONSIMULATOR 0
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxDC classes for various output formats // wxDC classes for various output formats
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -9,12 +9,15 @@
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef _UIACTIONSIMULATOR_H_ #ifndef _WX_UIACTIONSIMULATOR_H_
#define _UIACTIONSIMULATOR_H_ #define _WX_UIACTIONSIMULATOR_H_
#include <wx/defs.h> #include "wx/defs.h"
#include <wx/event.h>
#include <wx/dynarray.h> #if wxUSE_UIACTIONSIMULATOR
#include "wx/event.h"
#include "wx/dynarray.h"
class WXDLLIMPEXP_CORE wxUIActionSimulator class WXDLLIMPEXP_CORE wxUIActionSimulator
{ {
@@ -48,4 +51,6 @@ protected:
bool Key(int keycode, bool isDown=true, bool shiftDown=false, bool cmdDown=false, bool altDown=false); bool Key(int keycode, bool isDown=true, bool shiftDown=false, bool cmdDown=false, bool altDown=false);
}; };
#endif #endif // wxUSE_UIACTIONSIMULATOR
#endif // _WX_UIACTIONSIMULATOR_H_

View File

@@ -1213,6 +1213,11 @@
#define wxUSE_MOUSEWHEEL 1 #define wxUSE_MOUSEWHEEL 1
// Include mouse wheel support // Include mouse wheel support
// Compile wxUIActionSimulator class?
//
// This is experimental code subject to change. It's not fully implemented yet.
#define wxUSE_UIACTIONSIMULATOR 0
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxDC classes for various output formats // wxDC classes for various output formats
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -12,6 +12,10 @@
wxUIActionSimulator is a class used to simulate user interface actions wxUIActionSimulator is a class used to simulate user interface actions
such as a mouse click or a key press. such as a mouse click or a key press.
@note that this class is currently experimental and disabled by default,
you must set @c wxUSE_UIACTIONSIMULATOR to 1 in your setup.h file or use
configure @c --enable-uiactionsim option to enable it.
Common usages for this class would be to provide playback and record (aka macro recording) Common usages for this class would be to provide playback and record (aka macro recording)
functionality for users, or to drive unit tests by simulating user sessions. functionality for users, or to drive unit tests by simulating user sessions.

View File

@@ -24,6 +24,8 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#if wxUSE_UIACTIONSIMULATOR
// for all others, include the necessary headers (this file is usually all you // for all others, include the necessary headers (this file is usually all you
// need because it includes almost all "standard" wxWidgets headers) // need because it includes almost all "standard" wxWidgets headers)
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
@@ -164,3 +166,5 @@ void MyFrame::OnButtonPressed(wxCommandEvent&)
{ {
m_buttonPressed = true; m_buttonPressed = true;
} }
#endif // wxUSE_UIACTIONSIMULATOR

View File

@@ -520,6 +520,8 @@
#define wxUSE_MOUSEWHEEL 0 #define wxUSE_MOUSEWHEEL 0
#define wxUSE_UIACTIONSIMULATOR 0
#define wxUSE_POSTSCRIPT 0 #define wxUSE_POSTSCRIPT 0

View File

@@ -11,6 +11,8 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#if wxUSE_UIACTIONSIMULATOR
#include "wx/uiaction.h" #include "wx/uiaction.h"
wxUIActionSimulator::wxUIActionSimulator() wxUIActionSimulator::wxUIActionSimulator()
@@ -57,3 +59,5 @@ bool wxUIActionSimulator::Char(int keycode, bool shiftDown, bool cmdDown, bool
return true; return true;
} }
#endif // wxUSE_UIACTIONSIMULATOR

View File

@@ -11,13 +11,11 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifndef WX_PRECOMP #if wxUSE_UIACTIONSIMULATOR
#include "wx/defs.h"
#endif
#include "wx/uiaction.h" #include "wx/uiaction.h"
#include <windows.h> #include "wx/msw/wrapwin.h"
DWORD EventTypeForMouseButton(int button, bool isDown) DWORD EventTypeForMouseButton(int button, bool isDown)
{ {
@@ -76,3 +74,4 @@ bool wxUIActionSimulator::Key(int keycode, bool isDown, bool shiftDown, bool cmd
return true; return true;
} }
#endif // wxUSE_UIACTIONSIMULATOR

View File

@@ -9,8 +9,11 @@
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include <wx/defs.h> #include "wx/defs.h"
#include <wx/uiaction.h>
#if wxUSE_UIACTIONSIMULATOR
#include "wx/uiaction.h"
#include <ApplicationServices/ApplicationServices.h> #include <ApplicationServices/ApplicationServices.h>
@@ -129,4 +132,5 @@ bool wxUIActionSimulator::Key(int keycode, bool isDown, bool shiftDown, bool cmd
return true; return true;
} }
#endif // wxUSE_UIACTIONSIMULATOR

View File

@@ -9,8 +9,11 @@
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include <wx/defs.h> #include "wx/defs.h"
#include <wx/uiaction.h>
#if wxUSE_UIACTIONSIMULATOR
#include "wx/uiaction.h"
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/Xutil.h> #include <X11/Xutil.h>
@@ -121,3 +124,4 @@ bool wxUIActionSimulator::Key(int keycode, bool isDown, bool WXUNUSED(shiftDown)
return true; return true;
} }
#endif // wxUSE_UIACTIONSIMULATOR