Generic Function | Package: cg | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version

## hotspot-region

Arguments: hotspot

Returns a value that specifies the region in which a hotspot is active, meaning where the hotspot will respond to mouse clicks and mouse movement. The value contains coordinates in the parent window's stream coordinate system.

The value may be specified by passing a :region initarg to make-instance when creating the hotspot, and/or by calling (setf hotspot-region) any time later.

The value may specify an orthogonal box, a polygon, a circle, or a line, and the format of the value depends on which type of geometrical object is being specified. Here is the format for each type:

- To specify an orthogonal rectangle, the hotspot-region should be a `box` instance, as created with make-box, and as you might pass to draw-box or fill-box to draw a box in that location. The function inside-box-p will be called internally to determine when the mouse is in the hotspot-region.
- To specify a polygon, the hotspot-region should be either a vector or a list of three or more position instances (created with make-position), as you might pass to draw-polygon or fill-polygon. The function inside-polygon-p will be called internally to determine when the mouse is inside the hotspot-region.
- To specify a line, the hotspot-region should be a list of two positions for the endpoints of the line, as you might pass to draw-line. The function on-line-segment-p will be called internally to determine when the mouse is inside the hotspot-region. The mouse is considered to be in the region if the mouse is within 4 pixels of the theoretical line, since 4 is the default value of the margin argument to on-line-segment-p.
- To specify a circle, the hotspot-region should be a list of a position (as made by make-position) followed by a positive integer, where the position denotes the center of the circle and the positive integer its radius. The function inside-circle-p will be called internally to determine when the mouse is inside the hotspot-region.

In releases prior to 7.0, this function was a method on box. That method still exists (along with the :box initarg) for compatibility.

Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version