Important: The information in this document is obsolete and should not be used for new development.
<Define Menu Coach>
You can use the <Define Menu Coach> command to define a menu coach for a specific menu and menu item.
<Define Menu Coach> coachMarkName [, targetApp] [, coachStyle] , targetMenu [, targetItem] [, itemCoachColor] [, itemCoachStyle]
- coachMarkName
- A text string specifying the name of this menu 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 not required. If you omit this parameter, Apple Guide usesFRONT
as the default.- coachStyle
- A value indicating the coach style to use for the menu. You specify how Apple Guide should draw the coachmark for the menu using the constant
REDCIRCLE
orREDUNDERLINE
. The coachStyle parameter is optional. If you omit this parameter, Apple Guide usesREDCIRCLE
as the default.- targetMenu
- The menu title or number of the menu associated with this coachmark. Apple Guide numbers the menus from left to right, beginning with the Apple menu which has a number of 1.
- targetItem
- The menu item name or number of the menu item associated with this coachmark. Menu items are numbered beginning with 1 for the first menu item. This parameter is optional. If you omit this parameter, Apple Guide draws a coachmark for the menu specified in the targetMenu parameter but does not use a coachmark for any menu item.
- itemCoachColor
- A constant that specifies a color for the menu item coach. You can use one of these constants to specify the corresponding color:
BLACK
BLUE
CYAN
GREEN
MAGENTA
RED
WHITE
YELLOW- The itemCoachColor parameter is optional. If you omit this parameter and specify a menu item coach in the targetItem parameter, Apple Guide uses a default of
RED
.- itemCoachStyle
- A constant that specifies a text style for the menu item coach. You can use one of these constants to specify the corresponding text style:
PLAIN
BOLD
CONDENSE
EXTEND
ITALIC
OUTLINE
SHADOW
UNDERLINE- The itemCoachStyle parameter is optional. If you omit this parameter and specify a menu item coach in the targetItem parameter, Apple Guide uses a default of
PLAIN
.DESCRIPTION
The <Define Menu Coach> command defines a menu coach. You associate a menu coach with a particular panel using the <Coach Mark> command. When Apple Guide opens a panel that includes a <Coach Mark> command that names a defined menu coach, Apple Guide uses the specified coach style and coach color to draw a coachmark for the specified menu. When the user pulls down the menu, Apple Guide uses the specified color and text style for the specified menu item.SPECIAL CONSIDERATIONS
The display of menu coaches can be unpredictable if additional, unexpected menus have been inserted into the menu bar by system extensions, especially if the menu is referenced by number rather than by name.Apple Guide may not be able to display menu coaches for applications that use custom menu definition procedures or a custom menu bar definition function.
Menu coaches do not appear if the target application is not active.
EXAMPLES
#define a menu coach for the Close command in the File menu <Define Menu Coach> "FileCloseCoach", 'WAVE', REDCIRCLE, \xAC "File", "Close", RED, UNDERLINE <Define Panel> "closing documents" <Coach Mark> "FileCloseCoach" To close a document, select Close from the File menu. <End Panel> #define a menu coach for the Open command in the File menu #to specify an item with ellipsis, use Option-semicolon <Define Menu Coach> "FileOpenCoach", 'WAVE', REDCIRCLE, \xAC "File", "Open...", RED, UNDERLINE <Define Panel> "opening documents" <Coach Mark> "FileOpenCoach" To open a document, select Open... from the File menu. <End Panel>SEE ALSO
For information on the <Coach Mark> command, see page 10-118.