Progress
Programming
Handbook


Specifying Mouse Events

When choosing the events to associate with a trigger, use portable mouse events whenever possible. If you use these events, Progress automatically maps the event to the mouse key the native window system uses to perform the same event. For example, if Progress supports a future window system that uses the right button as the selection button, the MOUSESELECTCLICK event will automatically map to the right button for that system, while still mapping to the left button for Windows.

Portable and Three-Button Event Priority

If you use three-button mouse events, they take priority over any corresponding portable event. For example, if you define a MOUSESELECTCLICK and a LEFTMOUSECLICK trigger for the same widget, Progress only fires the three-button trigger. (In this case, it only fires the LEFTMOUSECLICK trigger.)

Low-level and High-level Events

The low-level category consists of those events triggered by mouse button motion in a single direction, such as down or up. The high-level category consists of those events triggered by more complex mouse button motion, such as click or double-click. For Progress, corresponding low-level and high-level mouse events are analogous to equivalent key label and key function events. Like key label and key function events, or three-button and portable mouse events, low-level mouse events take priority over corresponding high-level mouse events. For example, if you define a MOUSESELECTUP and MOUSESELECTCLICK trigger on the same widget, only the MOUSESELECTUP trigger executes.

Like portable events, use high-level mouse events exclusively whenever possible. If you must use low-level events, do not mix low-level and high-level event triggers on the same widget. The processing of both classes of events on the same widget can lead to unintended results.

While Progress always recognizes corresponding low-level and high-level events, it executes only one trigger for both. (The same is true for corresponding key label and key function events, as well as portable and three-button mouse events). Progress looks first for a trigger on a low-level event. If there is no trigger on a low-level event, Progress looks for a trigger on a high-level event. Once it finds and fires a trigger, it waits for the next event. However, each graphic interface may recognize and pass high-level events to Progress after recognizing a different combination of low-level events. For example, one system might recognize a double-click on a down and another system might recognize the double-click on an up mouse event. This causes mixed event sequences to differ significantly from interface to interface.

Thus, much like using pixels for frame and window layout, the mixing of low- and high-level mouse events creates portability problems between graphic interfaces. Furthermore, there is no guarantee that the expected event sequences in the same graphic interface might not change in future versions of that interface.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095