callback
The class callback method for compound objects, invoked when entity browsing is active in a graphic window.
Entity browsing is a facility which displays descriptive tooltips as the mouse passes over entities within a graphic window. Whenever the mouse passes over an entity, the .ebrowse callback is invoked, which sets the tooltip text and the tooltip is then displayed. Browsing is activated by setting the window.browsing attribute of the appropriate graphic window.
The .ebrowse callback(s) must be defined for tooltips to be displayed. These callbacks are defined at a class level, rather than on individual entities and may be defined for gstructure classes, compound classes or just the generic entity class, i.e. entity.ebrowse.
The compound object being passed over, and a glabel entity is passed to the callback, wherein the tooltip position, symbology, textstyle and text may be set. If no text is set, then no tooltip is displayed.
Once the callback has been executed, the tooltip glabel gets displayed (if it contains valid text). The window's overlay group (window.overlay) is used for the tooltip display. This is done behind the scenes.
During browsing, the system does the equivalent of an epick on the window and only invokes the .ebrowse callback if the compound object is not filtered out during the pick (see window.pick_group, window.pick_filter etc.)
For gstructure objects or standard entities to be active during browsing, they must have class .ebrowse callbacks of their own defined. If a compound class has no .ebrowse callback defined, then no tooltip is shown during browsing.
When browsing over compounds, the .ebrowse callback invoked depends on the transparency of the compound object. If a compound object is not transparent, then its compound class callback is invoked. If a compound object is transparent then entity.ebrowse is invoked on whichever child entity of the compound is under the mouse, unless this child is itself a compound or gstructure, in which case this rule applies recursively.
For details of parameters passed to a .ebrowse callback see entity.ebrowse.
For examples of .ebrowse callbacks see entity.ebrowse and gstructure.ebrowse
Note: This callback will not be invoked for simple entities or gstructures, for which different .ebrowse class callbacks must be defined.
Callbacks: |