Important: The information in this document is obsolete and should not be used for new development.
<Define Window Coach>
You can use the <Define Window Coach> command to define a coachmark for a specific area of a window.
<Define Window Coach> coachMarkName [, targetApp] [, coachStyle] [, targetWindow] , windowRectangle [, rectOrigin]
- coachMarkName
- A text string specifying the name of this window coach.
- targetApp
- A four-character sequence specifying the signature of the target application or the constant
FRONT
to specify the frontmost application. This parameter is optional. If you omit this parameter, Apple Guide usesFRONT
as the default.- coachStyle
- A value indicating the coach style to use for the item. You specify how Apple Guide should draw the coachmark for the item using a constant or red arrow specifier:
- Constant
REDCIRCLE
,REDUNDERLINE
, orGREENX
- Red arrow specifier
RedArrow
(start, end)
Use theRedArrow
function to draw a red arrow beginning at a location specified by start and ending at a location specified by end. The values for start and end are integers 1 through 8, where each value indicates a general location in a rectangle:
Location Value Top left 1 Top center 2 Top right 3 Middle right 4 Bottom right 5 Bottom center 6 Bottom left 7 Middle left 8 - These values indicate the eight possible points for the start and end of the arrow.
- The coachStyle parameter is optional. If you omit this parameter, Apple Guide uses
REDCIRCLE
as the default.- targetWindow
- The window associated with this coachmark. You can specify the window's title, the constant
FRONTWINDOW
, or the constantDESKTOP
. This parameter is optional. If omitted, Apple Guide usesFRONTWINDOW
as the default.- windowRectangle
- A subrectangle that further specifies the area in which the coachmark should be drawn. You can specify a rectangle using
Rect(top,
left,
bottom,
right)
. You can also use these constants to specify a specific element of a window:GROWBOX
ZOOMBOX
CLOSEBOX
TITLEBAR- You can use the constant
BOOTDISK
to specify a coachmark for the startup disk (use this constant only if you also specify the Finder as the target application).- rectOrigin
- A constant that gives the origin for the subrectangle. You can use one of these constants to specify the origin for the subrectangle:
TOPLEFT
TOPRIGHT
BOTTOMLEFT
BOTTOMRIGHT- The rectOrigin parameter is optional. If you omit this parameter, Apple Guide uses a default of
TOPLEFT
.DESCRIPTION
The <Define Window Coach> command defines a window coach. You associate a window coach with a particular panel using the <Coach Mark> command. When Apple Guide opens a panel that includes a <Coach Mark> command naming a defined window coach, Apple Guide uses the specified coach style to draw a coachmark based on the location of the coachmark, as provided in the windowRectangle parameter.EXAMPLES
#define a window coach for an area in a window <Define Window Coach> "RulerTabCoach", 'WAVE', REDCIRCLE, \xAC FRONTWINDOW, Rect(30, 30, 50, 50) <Define Panel> "using the ruler" <Coach Mark> "RulerTabCoach" To set a tab in your document, click the tab tool in the ruler bar. <End Panel>SEE ALSO
For information on the <Coach Mark> command, see page 10-118.