Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Apple Guide Complete / Part 4 - Scripting Guide Files
Chapter 10 - Guide Script Command Reference / Guide Script Command Descriptions
/ Creating Hot Items


<Hot Rectangle>

You can use the <Hot Rectangle> command to create a hot rectangle on a panel.

<Hot Rectangle> hotRect, eventFunction
hotRect
The coordinates of a rectangle, relative to the current pen location, that define the hot rectangle. The top of the coordinate system is defined by the bottom of the immediately preceding text, and the left edge of the coordinate system is defined by the left edge of the current format.
eventFunction
A name of an event function or event list. You must also include any parameters expected by the function in parentheses following the event function name. You define event functions using the <Define Event> or <Define Event List> command. Guide Maker also provides built-in functions that you can specify in this parameter.
DESCRIPTION
The <Hot Rectangle> command creates a hot rectangle using the rectangle specified in the hotRect parameter. The area encompassing this rectangle acts as a "hot" area; that is, when the user clicks in this rectangle, Apple Guide calls the function defined by the eventFunction parameter. Usually such a function is used to send a specific Apple event.

The <Hot Rectangle> command provides more precise control over placement of the rectangle than the <Hot Object> command, which assumes the rectangle of the following object.

EXAMPLES
<Define Panel> "spell-checking a document"
   Select a dictionary to open:

   #use rectangle coordinates relative to the current pen location
   <Hot Rectangle> Rect(0, 0, 12, 180), \xAC
                  openDictionary("Sharon's Super Dictionary")
   Sharon's Super Dictionary

   <Hot Rectangle> Rect(0, 0, 12, 180), \xAC
                  openDictionary("Daphne's Fantastic Dictionary")
   Daphne's Fantastic Dictionary

   <Hot Rectangle> Rect(0, 0, 52, 180), \xAC
                  openDictionary("Any")
   <PICT> "GenericDictionaryPict", LEFT
   Choose another dictionary
<End Panel>
SEE ALSO
For information on creating a hot object or hot text, see the descriptions of the <Hot Object> command on page 10-119 and the <Hot Text> command, described next.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
12 JUL 1996