| Allegro CL version 10.0 Unrevised from 9.0 to 10.0. 9.0 version |
Arguments: tray-item window message
This generic function is called whenever a mouse event occurs over the icon for a tray-item in the system tray. It is not useful for an application to call this function, but an application may define tray-item-message methods to handle mouse events on its tray-items in some arbitrary way. The default method that specializes on tray-item and basic-pane does nothing.
tray-item will be the tray-item whose icon was
under the mouse cursor when the mouse event occurred. An application
would typically define and use a subclass of the built-in tray-item
class so
that it can specialize a tray-item-message method on that
subclass.
window will be the window that was specified in the most recent call to add-tray-item for this tray-item. This is the window that receives the messages for this tray-item, and therefore tray-item-message will be called in the creation-process of that window.
message will be the value of one of the message
constants mouse-moved
, mouse-left-down
,
mouse-left-up
, mouse-double-click
,
mouse-middle-down
, mouse-middle-up
,
mouse-right-down
, or mouse-right-up
.
Here is a problem on Windows that we apparently cannot avoid: If your tray-item-message method calls pop-up-menu when handling a down click such as mouse-right-down, and the tray item's associated window was the selected window before the click was done, then the call to pop-up-menu returns immediately without letting the user choose a menu-item. Therefore, if the associated window is a visible window (which therefore might be selected), you should pop up menus only on up clicks such as mouse-right-up.
See the description of
the tray-item
class for an example.
Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 9.0 page.
Created 2015.5.21.
| Allegro CL version 10.0 Unrevised from 9.0 to 10.0. 9.0 version |