]> git.saurik.com Git - wxWidgets.git/blob - src/common/uiactioncmn.cpp
Fix recently broken forwarding of events between event handlers.
[wxWidgets.git] / src / common / uiactioncmn.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/uiactioncmn.cpp
3 // Purpose: wxUIActionSimulator common implementation
4 // Author: Kevin Ollivier
5 // Modified by:
6 // Created: 2010-03-06
7 // RCS-ID: $Id: menu.cpp 54129 2008-06-11 19:30:52Z SC $
8 // Copyright: (c) Kevin Ollivier
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #include "wx/wxprec.h"
13
14 #if wxUSE_UIACTIONSIMULATOR
15
16 #include "wx/uiaction.h"
17
18 wxUIActionSimulator::wxUIActionSimulator()
19 {
20 }
21
22 wxUIActionSimulator::~wxUIActionSimulator()
23 {
24 }
25
26
27 bool wxUIActionSimulator::MouseClick(int button)
28 {
29 MouseDown(button);
30 MouseUp(button);
31
32 return true;
33 }
34
35 bool wxUIActionSimulator::MouseDblClick(int button)
36 {
37 MouseDown(button);
38 MouseUp(button);
39 MouseDown(button);
40 MouseUp(button);
41
42 return true;
43 }
44
45 bool wxUIActionSimulator::MouseDragDrop(long x1, long y1, long x2, long y2, int button)
46 {
47 MouseMove(x1, y1);
48 MouseDown(button);
49 MouseMove(x2, y2);
50 MouseUp(button);
51
52 return true;
53 }
54
55 bool wxUIActionSimulator::Char(int keycode, bool shiftDown, bool cmdDown, bool altDown)
56 {
57 Key(keycode, false, shiftDown, cmdDown, altDown);
58 Key(keycode, true, shiftDown, cmdDown, altDown);
59
60 return true;
61 }
62
63 #endif // wxUSE_UIACTIONSIMULATOR