#include </home/work/projects/wx/2.9/wx/interface/wx/uiaction.h>
wxUSE_UIACTIONSIMULATOR to 1 in your setup.h file or use configure --enable-uiactionsim option to enable it.See the uiaction sample for example usage of this class.
NOTE: For keyboard operations, currently you must pass the keycode of the actual key on the keyboard. To simulate, e.g. IME actions, you'd need to simulate the actual keypresses needed to active the IME, then the keypresses needed to type and select the desired character.
Public Member Functions | |
| wxUIActionSimulator () | |
| Constructor. | |
| ~wxUIActionSimulator () | |
| bool | MouseMove (long x, long y) |
| Move the mouse to the specified coordinates. | |
| bool | MouseDown (int button=wxMOUSE_BTN_LEFT) |
| Press a mouse button. | |
| bool | MouseUp (int button=wxMOUSE_BTN_LEFT) |
| Release a mouse button. | |
| bool | MouseClick (int button=wxMOUSE_BTN_LEFT) |
| Click a mouse button. | |
| bool | MouseDblClick (int button=wxMOUSE_BTN_LEFT) |
| Double-click a mouse button. | |
| bool | MouseDragDrop (long x1, long y1, long x2, long y2, int button=wxMOUSE_BTN_LEFT) |
| Perform a drag and drop operation. | |
| bool | KeyDown (int keycode, bool shiftDown=false, bool cmdDown=false, bool altDown=false) |
| Press a key. | |
| bool | KeyUp (int keycode, bool shiftDown=false, bool cmdDown=false, bool altDown=false) |
| Release a key. | |
| bool | Char (int keycode, bool shiftDown=false, bool cmdDown=false, bool altDown=false) |
| Press and release a key. | |
| wxUIActionSimulator::wxUIActionSimulator | ( | ) |
Constructor.
| wxUIActionSimulator::~wxUIActionSimulator | ( | ) |
| bool wxUIActionSimulator::Char | ( | int | keycode, | |
| bool | shiftDown = false, |
|||
| bool | cmdDown = false, |
|||
| bool | altDown = false | |||
| ) |
Press and release a key.
| keycode | key to operate on, as an integer. | |
| shiftDown | true if the shift key should be pressed, false otherwise. | |
| cmdDown | true if the cmd key should be pressed, false otherwise. | |
| altDown | true if the alt key should be pressed, false otherwise. |
| bool wxUIActionSimulator::KeyDown | ( | int | keycode, | |
| bool | shiftDown = false, |
|||
| bool | cmdDown = false, |
|||
| bool | altDown = false | |||
| ) |
Press a key.
| keycode | key to operate on, as an integer. | |
| shiftDown | true if the shift key should be pressed, false otherwise. | |
| cmdDown | true if the cmd key should be pressed, false otherwise. | |
| altDown | true if the alt key should be pressed, false otherwise. |
| bool wxUIActionSimulator::KeyUp | ( | int | keycode, | |
| bool | shiftDown = false, |
|||
| bool | cmdDown = false, |
|||
| bool | altDown = false | |||
| ) |
Release a key.
| keycode | key to operate on, as an integer. | |
| shiftDown | true if the shift key should be pressed, false otherwise. | |
| cmdDown | true if the cmd key should be pressed, false otherwise. | |
| altDown | true if the alt key should be pressed, false otherwise. |
| bool wxUIActionSimulator::MouseClick | ( | int | button = wxMOUSE_BTN_LEFT |
) |
Click a mouse button.
| button | Button to press. See wxUIActionSimulator::MouseDown for a list of valid constants. |
| bool wxUIActionSimulator::MouseDblClick | ( | int | button = wxMOUSE_BTN_LEFT |
) |
Double-click a mouse button.
| button | Button to press. See wxUIActionSimulator::MouseDown for a list of valid constants. |
| bool wxUIActionSimulator::MouseDown | ( | int | button = wxMOUSE_BTN_LEFT |
) |
Press a mouse button.
| button | Button to press. Valid constants are wxMOUSE_BTN_LEFT, wxMOUSE_BTN_MIDDLE, and wxMOUSE_BTN_RIGHT. |
| bool wxUIActionSimulator::MouseDragDrop | ( | long | x1, | |
| long | y1, | |||
| long | x2, | |||
| long | y2, | |||
| int | button = wxMOUSE_BTN_LEFT | |||
| ) |
Perform a drag and drop operation.
| x1 | x start coordinate, in screen coordinates. | |
| y1 | y start coordinate, in screen coordinates. | |
| x2 | x desintation coordinate, in screen coordinates. | |
| y2 | y destination coordinate, in screen coordinates. | |
| button | Button to press. See wxUIActionSimulator::MouseDown for a list of valid constants. |
| bool wxUIActionSimulator::MouseMove | ( | long | x, | |
| long | y | |||
| ) |
Move the mouse to the specified coordinates.
| x | x coordinate to move to, in screen coordinates. | |
| y | y coordinate to move to, in screen coordinates. |
| bool wxUIActionSimulator::MouseUp | ( | int | button = wxMOUSE_BTN_LEFT |
) |
Release a mouse button.
| button | Button to press. See wxUIActionSimulator::MouseDown for a list of valid constants. |
|
[ top ] |