Programming
97
Modero G4 Touch Panels - Configuration & Programming Manual
Dynamic Images
Popups
Custom Events for Dynamic Images
Resource Load
Notification
custom event
Received when a resource for which notification is enabled is loaded.
CUSTOM.TYPE = EVENTID = 1400
CUSTOM.ID = 0
CUSTOM.FLAG = 0
CUSTOM.VALUE1 = 0
CUSTOM.VALUE2 = 0
CUSTOM.VALUE3 = 0
CUSTOM.TEXT = String containing the resource name
Example:
BUTTON_EVENT[Panel,1]
{
PUSH:
{
SEND_COMMAND Panel, '^RFRP-Sports_Image,once'; // refresh the resource name
'Sports_Image'
}
}
CUSTOM_EVENT[Panel,0,1400]
{
SEND_STRING 0,"'*** Dynamic Image loaded. Resource=',CUSTOM.TEXT,' ***'"
// resulting string for Sports_Image would be '*** Dynamic Image loaded.
Resource=Sports_Image ***'
}
Custom Events for Popups
^PUN
Notifies when a popup custom event has been sent to the Master. When a popup is attached, detached, or moved on a page, a
custom event is sent to the master from port 1 of the device to indicate the popup's location. On a move, the custom event is sent
when the move is complete but not when the moves starts or is in progress.
Notifications happen via a custom event (1323) sent to the master. The same event type (132) is used for ?PUL responses.
Syntax:
'^PUN-<enable>'
Variable:
enable: 0 = disable, 1 = user pages only, and 2 = all pages (user + system)
Custom Event fields:
ID = 0
Type = 1323
Flag = operation (0=location query, 10=attach, 20=drag, 30=detach)
Value1 = x coordinate of popup
Value2 = y coordinate of popup
Value3 = 0
Text = popup name
Text = popup name
?PUL
Queries the location of a popup on the current page. Notifications happen via a custom event (1323) sent to the master from port
1 of the device. The same event type (1323) is used for ^PUN notifications. If the popup name is invalid, no custom event is sent
to the master.
Syntax:
'?PUL-<popup name>'
Variable:
Popup name: The name of the popup whose location is being queried.
Custom Event fields:
ID = 0
Type = 1323
Flag = operation (0=location query)
Value1 = x coordinate of popup (always 0 is not attached to current page)
Value2 = y coordinate of popup (always 0 is not attached to current page)
Value3 = 1 if popup is attached to current page, 0 of not attached to current page
Text = popup name