EVENTINFO
8.1, PLBCMP GUI Only
The EVENTINFO instruction retrieves information regarding an event on the event queue. The instruction uses the following format:
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
position
Required. A previously defined Numeric Variable, Literal, decimal constant, or Expression that specifies the event queue position.
keyword
Optional. One of the EVENTINFO keywords from the table below.
dest
Required. A previously defined Character String Variable or Numeric Variable that is to receive the result of the operation.
Flags Affected: ZERO, EOS, OVER
Note the following:
A {position} value of zero retrieves information for the current event being processed. A value of one retrieves information for the first or top item of the event queue. A value of two retrieves information for the second item of the event queue and so forth.
The {keyword} operand defines the type of information that is retrieved. It must be from the following table:
|
Keyword |
Retrieves the ... |
|
ARGx=<var> |
specified argument for the event. ARGx may be a value of ARG1 to ARG10 indicating the respective argument. |
|
CHAR=<svar> |
character that caused the event. |
|
KEYSTATE=<nvar> |
Special keys state (see below). (Version 9.4C) |
|
MODIFIER=<nvar> |
Event Modifier (see below). |
|
OBJECT=<object> |
a pointer to a generic object (9.4C). |
|
OBJECTID=<nvar> |
object identification number |
|
RESULT=<nvar> |
expected RESULT value. |
|
TYPE=<nvar> |
Event type (see below). |
The KEYSTATE value contains the current states for special keyboard keys. When the EVENTINFO is executed with the KEYSTATE keyword specified, the saved special key state values are returned to the PLB application as a single bit mask value. The intent for this instruction is to preserve the state of the special keys at the time when the event was generated. This helps to reduce the possibility of mistaking the true state of the keys. The {nvar} key state mask value is defined as follows:
|
Value |
State |
Virtual Key |
|
0x1 |
ALT key depressed |
VK_MENU |
|
0x2 |
CTRL key depressed |
VK_CONTROL |
|
0x4 |
SHIFT key depressed |
VK_SHIFT |
|
0x8 |
Caps key is locked |
VK_CAPITAL |
|
0x10 |
Num lock key is locked |
VK_NUMLOCK |
|
0x20 |
Scroll lock key is locked |
VK_SCROLL |
The Event Modifier contains additional information about specific operations that occurred when the event was generated. It can be an value accumulated from any combination of the following values:
|
Value |
Modifier |
|
0 |
No modifier provided |
|
1 |
Alt Key |
|
2 |
Ctl Key |
|
4 |
Shift Key |
|
8 |
Left mouse button down |
|
16 |
Right mouse button down |
|
32 |
Double click |
The Event Type is one of the following values:
|
Value |
Event |
Value |
Event |
|
0 |
Load |
10 |
KeyPress |
|
1 |
Activate |
11 |
LostFocus |
|
2 |
Deactivate |
12 |
Move |
|
3 |
Change |
13 |
MouseDown |
|
4 |
Click |
14 |
MouseUp |
|
5 |
Close |
15 |
MouseMove |
|
6 |
DblClick |
16 |
Paint |
|
7 |
DragDrop |
17 |
Resize |
|
8 |
DragOver |
18 |
Timer |
|
9 |
GotFocus |
19 |
OldEvent |
One or more {keywords=dest} specifications may appear within a single statement.
The {object} parameter must be an OBJECT variable which is a generic object pointer. The intended use of this keyword is to retrieve a pointer to the GUI object that generated an event.
The ZERO flag is set if no event is pending for the position specified.
The OVER flag is set if the destination numeric variable too small to receive the information.
The EOS flag is set if the destination character variable is too small to receive the information.
The EVENTINFO instruction retrievea event information for any PLB Event that currently exists on the PLB event queue. Typically, this instruction is used in the PLB program event routines.
See Also: System Interface Instructions
![]() |