InputEvent Class Added
The new InputEvent class defines a recent "inputevent," providing methods to populate the object with the event information and to define any behaviors associated with such events.
The InputEvent class does not handle 4GL events, it deals with a new set of OpenROAD triggers, which could be considered sub-events that can happen at any moment, regardless of what 4GL is running. It enables "defined behaviors" (trigger-response combinations) to be built into OpenROAD and to execute automatically, leaving developers free to concentrate on business-specific features using the standard 4GL event coding. For more information, see the InputEvent EventKey and TriggerEventBehavior methods in the Language Reference Guide.
The ability to define a 4GL response to an inputevent enables you to code conditional and sophisticated responses.
The InputEvent class has the following attributes:
Action
Data Type: integer
4GL Access: RW
Identifies the input action that this input event defines.
FieldID
Data Type: integer
4GL Access: RW
Specifies the instance identifier of the field to which the input action applies.
FieldX
Data Type: integer
4GL Access: RW
Specifies the X-location of the mouse relative to the target field, in pixels.
FieldY
Data Type: integer
4GL Access: RW
Specifies the Y-location of the mouse relative to the target field, in pixels.
FrameID
Data Type: integer
4GL Access: RW
Specifies the instance identifier of the frame to which the input action applies.
ModifierKeys
Data Type: integer
4GL Access: RW
Identifies the key or combination of keys pressed when the input action took place.
MouseButton
Data Type: integer
4GL Access: RW
Identifies the mouse button whose action triggered this event.
ScreenX
Data Type: integer
4GL Access: RW
Specifies the X-location of the mouse action relative to the top left corner of the screen, in pixels.
ScreenY
Data Type: integer
4GL Access: RW
Specifies the Y-location of the mouse action relative to the top left corner of the screen, in pixels.
Sprite
Data Type: SpriteDescriptor
4GL Access: RW
Specifies the descriptor defining the sprite (if any) touched by the mouse action.
Tick
Data Type: integer8
4GL Access: RW
Indicates the system tick count at the time the mouse action took place, in milliseconds.
VirtualKey
Data Type: integer
4GL Access: RW
Identifies the keyboard virtual key (or keys) whose action triggered this event, recorded as a two-character hexadecimal value.
The InputEvent class has the following methods:
ActivateFields
Makes the specified fields responsive to input events.
EventKey
Creates a lookup key used to store (or access) a response to an event.
LastInputAction
Populates the InputEvent attributes with the values corresponding to the most recent input action of the specified type.
LoadEventBehavior
Loads the response agent or agents you require to produce the behavior appropriate to the specified input event key.
QueueResponse
Enables inputevent-invoked procedures to make frame and waitfor calls
RemoveEventBehavior
Removes the event-behavior entry corresponding to this event key and response type.
Response
Returns a response agent of the specified type and specifications, to be used as the response parameter in a LoadEventBehavior method call.
TriggerEventBehavior
Triggers one or all of the event behaviors defined at this location.
There is a new input event setting: IE_MMOUSEDOWN specifies that the input event is a mouse middle-button press.
Last modified date: 06/25/2024