Check out the new USENIX Web site. next up previous
Next: Megaitems Up: Canvas Improvements Previous: Relief Effects

Selection Based on Multiple Tags

Figure 9: Procedure to select canvas items matching a set of tags.
\begin{figure*}
\footnotesize {\bf\char93 procedure to find items with multiple ...
...\} \\
\> \> \} \\
\> \> {\it return} \$resultList \\
\} \\
\par\end{figure*}

Another weakness in the canvas widget involves the handling of multiple tags. The ability to associate multiple tags with canvas items has proven invaluable in implementing the display application. As described in the previous section, tags are used to implement the path display. However, the canvas find method is only capable of dealing with one tag at a time. There are often times when items need to be selected on the basis of multiple tags. We have implemented this functionality with the canvasMultiMatch procedure shown in Figure 9, but it would be far more efficient if this functionality were added to the canvas find function or if a list command were added that returned the intersection of two or more lists.



Michael Santos
1998-07-27