It just occurred to me that I could handle my tooltips just by modifying the current āscope_nameā and adding to the colour dictionary. That is, when I reach the pt (or region) for the tooltip I can add ā tooltipā at the end of the scope-name and create a corresponding colour-dictionary entry. Then, when I build the , I can look for ātooltipā in the scope-name (or just use a flag) and amend it to . (The title will just pop up when I point at the element.)
I suppose a similar approach could have been taken with your highlighted text. However, itās probably not as simple as it sounds.
Andy.