Main Page | Modules | Class Hierarchy | Data Structures | File List | Data Fields | Globals | Related Pages

omExecutor Class Reference
[GENERIC LIBRARY classes]

#include <omExecutor.h>

Inheritance diagram for omExecutor:

omObject

Public Member Functions

 omExecutor ()
void Stop ()
void Start ()
void RenderString (wxString)
void PressKey (long)
void ReleaseKey (long)
bool MoveMouse (wxString, wxString)
bool MoveMouse (int, int)
void ClickMouse (int)
void DragOrDropMouse (int)

Protected Member Functions

void OnMouseTimer (wxTimerEvent)
 Mouse Timer event handler.

void SDConstructor ()
 System dependen constructor.

void SDRenderChar (char)
 System dependent RenderChar function.

void SDPressKey (long)
 System dependent (keyboard) PressKey function.

void SDReleaseKey (long)
 System dependent (keyboard) ReleaseKey function.

void SDMoveMouse ()
 System dependent MoveMouse function.

void SDPressMouseButton (int but)
 
Parameters:
but Button number.


void SDReleaseMouseButton (int but)
 
Parameters:
but Button number.



Protected Attributes

void * sdData
 System dependent data.

long maiaKeyCode [MAXMAIACODES]
 Array of keyCodes used for keyboard emulation.

int dxMouseMovement
 Mouse movement X increment.

int dyMouseMovement
 Mouse movement Y increment.

bool isMouseInMovement
 True if the mouse timer is active.

wxTimer mouseTimer
 Mouse move timer.

bool isMouseButtonPressed [MAXMOUSEBUTTONS]
 Mouse button flags. start index from 1 :).


Detailed Description

This class provides a set of methods used to emulate keyboard and mouse. The class MUST be instantied before the use because the constructor initializes some internal variables.


Constructor & Destructor Documentation

omExecutor::omExecutor  ) 
 

Construct the class by initializating character emulation table


Member Function Documentation

void omExecutor::ClickMouse int  but  ) 
 

Emulate a click on a mouse button.

Parameters:
but wich button emulate, may be LEFTBUTTON, CENTRALBUTTON or RIGHTBUTTON

void omExecutor::DragOrDropMouse int  but  ) 
 

Emulate mouse drag/drop. The first time the command is lounched it emulate mouse pression and the second time emulate button release. The function handles the status of automatic scan of the associated keyboard if it isn't NULL.

Parameters:
but wich button emulate, may be LEFTBUTTON, CENTRALBUTTON or RIGHTBUTTON

bool omExecutor::MoveMouse int  dx,
int  dy
 

Emulate the mouse movement. This function is two state function, the second time you call it with the same parameter the mouse stop its movement. You can either call the function with 0 or without step to stop the mouse movement.

Parameters:
dx x increment
dy y increment
Returns:
true if the action stops the mouse, false otherwhise

bool omExecutor::MoveMouse wxString  action,
wxString  step
 

Emulate the mouse movement. This functions parses the string and then call The MoveMouse(dx,dy) function

Parameters:
action to implement, may be "MoveMouseLeft", "MoveMouseRight", "MoveMouseUp" or "MoveMouseDown"
step movement step in pixel
Returns:
true if the action stops the mouse, false otherwhise

void omExecutor::OnMouseTimer wxTimerEvent   )  [protected]
 

Mouse Timer event handler.

void omExecutor::PressKey long  code  ) 
 

Emulate pressure of a special key. A key has a specific maia code that is translated into windows or x11 code in funcion of the system where the application is compiled

Parameters:
code maia code of the char, see this manual for a complete list

void omExecutor::ReleaseKey long  code  ) 
 

Emulate pressure of a special key. A key has a specific maia code that is translated into windows or x11 code in funcion of the system where the application is compiled

Parameters:
code maia code of the char, see this manual for a complete list

void omExecutor::RenderString wxString  s  ) 
 

Emulate the pressure of char keys to construct the passed string using system dependent API

Parameters:
s string to write

void omExecutor::SDConstructor  )  [protected]
 

System dependen constructor.

void omExecutor::SDMoveMouse  )  [protected]
 

System dependent MoveMouse function.

void omExecutor::SDPressKey long   )  [protected]
 

System dependent (keyboard) PressKey function.

void omExecutor::SDPressMouseButton int  but  )  [protected]
 

Parameters:
but Button number.

System dependent PressMouseButton function.

void omExecutor::SDReleaseKey long   )  [protected]
 

System dependent (keyboard) ReleaseKey function.

void omExecutor::SDReleaseMouseButton int  but  )  [protected]
 

Parameters:
but Button number.

System dependent ReleaseMouseButton function.

void omExecutor::SDRenderChar char   )  [protected]
 

System dependent RenderChar function.

void omExecutor::Start  )  [virtual]
 

Start all active timers

Reimplemented from omObject.

void omExecutor::Stop  )  [virtual]
 

Stop all timers

Reimplemented from omObject.


Field Documentation

int omExecutor::dxMouseMovement [protected]
 

Mouse movement X increment.

int omExecutor::dyMouseMovement [protected]
 

Mouse movement Y increment.

bool omExecutor::isMouseButtonPressed[MAXMOUSEBUTTONS] [protected]
 

Mouse button flags. start index from 1 :).

bool omExecutor::isMouseInMovement [protected]
 

True if the mouse timer is active.

long omExecutor::maiaKeyCode[MAXMAIACODES] [protected]
 

Array of keyCodes used for keyboard emulation.

wxTimer omExecutor::mouseTimer [protected]
 

Mouse move timer.

void* omExecutor::sdData [protected]
 

System dependent data.


The documentation for this class was generated from the following files: