]>
git.saurik.com Git - wxWidgets.git/blob - src/common/uiactioncmn.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/uiactioncmn.cpp
3 // Purpose: wxUIActionSimulator common implementation
4 // Author: Kevin Ollivier, Steven Lamerton, Vadim Zeitlin
7 // RCS-ID: $Id: menu.cpp 54129 2008-06-11 19:30:52Z SC $
8 // Copyright: (c) Kevin Ollivier
9 // (c) 2010 Steven Lamerton
10 // (c) 2010 Vadim Zeitlin
11 // Licence: wxWindows licence
12 /////////////////////////////////////////////////////////////////////////////
14 #include "wx/wxprec.h"
16 #if wxUSE_UIACTIONSIMULATOR
18 #include "wx/uiaction.h"
20 bool wxUIActionSimulator::MouseClick(int button
)
28 bool wxUIActionSimulator::MouseDblClick(int button
)
39 wxUIActionSimulator::MouseDragDrop(long x1
, long y1
, long x2
, long y2
,
51 wxUIActionSimulator::Key(int keycode
, int modifiers
, bool isDown
)
53 wxASSERT_MSG( !(modifiers
& wxMOD_CONTROL
),
54 "wxMOD_CONTROL is not implemented, use wxMOD_CMD instead" );
55 wxASSERT_MSG( (modifiers
& wxMOD_ALTGR
) != wxMOD_ALTGR
,
56 "wxMOD_ALTGR is not implemented" );
57 wxASSERT_MSG( !(modifiers
& wxMOD_META
),
58 "wxMOD_META is not implemented" );
59 wxASSERT_MSG( !(modifiers
& wxMOD_WIN
),
60 "wxMOD_WIN is not implemented" );
62 return DoKey(keycode
, modifiers
, isDown
);
65 bool wxUIActionSimulator::Char(int keycode
, int modifiers
)
67 Key(keycode
, modifiers
, true);
68 Key(keycode
, modifiers
, false);
73 bool wxUIActionSimulator::Text(const char *s
)
79 wxASSERT_MSG( ch
, "Only letters are allowed" );
81 if ( !Char(ch
, isupper(ch
) ? wxMOD_SHIFT
: 0) )
88 #endif // wxUSE_UIACTIONSIMULATOR