%UWNDEVENTS_METHOD
Perform window event processing
WSupported on Windows
|
|
|
|
function UWNDEVENTS_METHOD,^val {reserved1} ,a {reserved2} ,a ^val(window_id) ,i ^val(event) ,i [arguments] ,type
Return value
False when a mouse click is not passed to the target window on a mouse click event; otherwise returns true. (n)
Arguments
{reserved1}
{reserved2}
Reserved for internal use. (a)
window_id
The ID of the window receiving the event. This must be declared as ^VAL(window_id). (i)
event
The ID of the event that occurred. This must be declared as ^VAL(event). (i)
D_EVENT_LEFT_CLICK = Left mouse button event.
D_EVENT_MIDDLE_CLICK = Middle mouse button event.
D_EVENT_RIGHT_CLICK = Right mouse button event.
D_EVENT_LEFT_DBLCLK = Double-click left mouse button event.
D_EVENT_MIDDLE_DBLCLK = Double-click middle mouse button event.
D_EVENT_RIGHT_DBLCLK = Double-click right mouse button event.
D_EVENT_MOVE = Move window event.
D_EVENT_SIZE = Size window event.
D_EVENT_MINIMIZE = Minimize window event.
D_EVENT_MAXIMIZE = Maximize window event.
D_EVENT_RESTORE = Restore window event.
D_EVENT_SCROLL = Scroll window event.
D_EVENT_CLOSE = Close window event.
arguments
One or more arguments specific to event. The MINIMIZE, MAXIMIZE, RESTORE, and CLOSE events have no additional arguments.
- All of the CLICK and DBLCLK events have the following arguments (but see the Discussion for variations when using a list):
Position in x-direction (column in cells).
Position in y-direction (row in cells).
Position in x-direction (column in pixels).
Position in y-direction (row in pixels).
Additional mouse click information. See the Additional mouse click information for arg_9 table for options.
- D_EVENT_MOVE has the following arguments:
Position in x-direction (column in cells).
Position in y-direction (row in cells).
Position in x-direction (column in pixels).
Position in y-direction (row in pixels).
- D_EVENT_SIZE has the following arguments:
Width of logical window (number of columns).
Height of logical window (number of rows) or the number of visible list items when using a list.
Width of client area (number of pixels).
Height of client area (number of pixels).
- D_EVENT_SCROLL has the following arguments:
Display area position in x-direction (column in cells).
Display area position in y-direction (row in cells) or item number of the display area position when using a list.
Offset between window position and display area position in x-direction (number of pixels).
Offset between window position and display area position in y-direction (number of pixels). Always 0 when using a list.
%UWNDEVENTS_METHOD is a function that you write and name. You do not call it. Instead UI Toolkit will call it when a mouse event that you have assigned to the method occurs.
To suppress a mouse click from being passed through to the target window, return a value of false for the %UWNDEVENTS_METHOD; otherwise always return true.
It is vital that the argument types be declared exactly as documented. Incorrect definition of arguments to your event method routine will cause undefined results. |
When using a list with any of the CLICK and DBLCLK events, arg_5 returns the column number clicked, and arg_6 returns the row number clicked. For ActiveX Toolkit lists, the row number specifies the item’s position in the currently loaded rows, both visible rows and those that don’t fit in the window. For standard Toolkit lists, the row number specifies the item’s position in the currently visible set of rows. However, note the following:
- When clicking on the header or footer in an ActiveX Toolkit list, arg_5 returns the column number clicked, unless the header or footer is static, in which case it returns 1. Arg_6 returns zero.
- When clicking on the header or footer for a standard Toolkit list, arg_5 and arg_6 return zero.
- When clicking on a line in an ActiveX Toolkit list, arg_5 returns the column number to the left of the line that was clicked.
Option
Meaning
D_AREA_CLIENT
Click was in client area.
D_AREA_NONCLIENT
Click was in non-client area.
D_BUTTON_LEFT
Left mouse button was down during click.
D_BUTTON_MIDDLE
Middle mouse button was down during click.
D_BUTTON_RIGHT
Right mouse button was down during click.
D_KEY_CONTROL
Control key was down during click.
D_KEY_SHIFT
Shift key was down during click.
D_LSTCLK_FOOTER
Click was in footer section.
D_LSTCLK_HEADER
Click was in header section.
D_LSTCLK_ONLINE
Click was on a line.
See also
- Overloading UI Toolkit routines for more information on creating this function
- Appendix D: Methods