C
WORD TeTranslateMsg( void * pObj, GOL_MSG * pMsg );
Overview
This function evaluates the message from a user if the message will affect the object or not. If the message is valid, the keys in the Text Entry object will be scanned to detect which key was pressed. If True, the corresponding text will be displayed, the ‘text’ will also be stored in the TeOutput parameter of the object.
Translated Message |
Input Source |
Events |
Description |
TE_MSG_PRESS |
Touch Screen |
EVENT_PRESS, EVENT_MOVE |
If the event occurs and the x,y position falls in the face of one of the keys of the object while the key is unpressed. |
TE_MSG_RELEASED |
Touch Screen |
EVENT_MOVE |
If the event occurs and the x,y position falls outside the face of one of the keys of the object while the key is pressed. |
TE_MSG_RELEASED |
Touch Screen |
EVENT_RELEASE |
If the event occurs and the x,y position falls does not falls inside any of the faces of the keys of the object. |
TE_MSG_ADD_CHAR |
Touch Screen |
EVENT_RELEASE, EVENT_MOVE |
If the event occurs and the x,y position falls in the face of one of the keys of the object while the key is unpressed and the key is associated with no commands. |
TE_MSG_DELETE |
Touch Screen |
EVENT_RELEASE, EVENT_MOVE |
If the event occurs and the x,y position falls in the face of one of the keys of the object while the key is unpressed and the key is associated with delete command. |
TE_MSG_SPACE |
Touch Screen |
EVENT_RELEASE, EVENT_MOVE |
If the event occurs and the x,y position falls in the face of one of the keys of the object while the key is unpressed and the key is associated with space command. |
TE_MSG_ENTER |
Touch Screen |
EVENT_RELEASE, EVENT_MOVE |
If the event occurs and the x,y position falls in the face of one of the keys of the object while the key is unpressed and the key is associated with enter command. |
OBJ_MSG_INVALID |
Any |
Any |
If the message did not affect the object. |
Input Parameters
Input Parameters |
Description |
GOL_MSG * pMsg |
Pointer to the message struct containing the message from the user interface. |
pTe |
The pointer to the object where the message will be evaluated to check if the message will affect the object. |
Returns
Returns the translated message depending on the received GOL message:
- TE_MSG_PRESS – A key is pressed
- TE_MSG_RELEASED - A key was released (generic for keys with no commands or characters assigned)
- TE_MSG_ADD_CHAR – A key was released with character assigned
- TE_MSG_DELETE – A key was released with delete command assigned
- TE_MSG_SPACE - A key was released with space command assigned
- TE_MSG_ENTER - A key was released with enter command assigned
- OBJ_MSG_INVALID – Text Entry is not affected
Preconditions
none
Side Effects
none.