::canvas::highlightoncanvastagOrIdcmd
This command sets up a general highlight, with the items of canvas canvas to highlight in this
manner identified by tagOrId and the cmd prefix providing the implementation, i.e. the how to
perform the highlight.
The signature of the command prefix is described later, in section Highlightcallback.
The result of the command is the empty string.
Limitations:
[1] When a highlight is active no other highlight can be activated. This means that nested
highlights are not possible.
[2] The system may break if a highlight is removed from within its highlight callback.
::canvas::highlightoffcanvastagOrId
This command removes any highlight set on the items of canvas canvas identified by tagOrId.
The result of the command is the empty string.
HIGHLIGHTCALLBACK
The highlight callback is a command prefix invoked in the following two ways:
{*}cmdoncanvasitem
This form is invoked when the mouse has entered (one of) the item(s) the highlight was set up for.
The callback now has to perform any reconfiguration necessary to highlight the item (group).
The result of the command can be anything. It is stored by the system as client information and
passed unchanged to the un-highlight callback for its use. In this manner the highlight callback
is able to maintain custom state from highlighting to un-highlighting.
Note that the callback does not have to maintain state, nor does it have to actually reconfigure
the item (group). In the latter case the callback simply serves as easy enter/leave notification.
{*}cmdoffcanvasclientdata
This form is invoked when the mouse has left (one of) the item(s) of the currently active the
highlight. The callback now has to perform any reconfiguration necessary to un-highlight the item
(group).
The result of the command must be a boolean value with the usual value to be true. By returning
false instead the callback can veto the removal of the highlight.