Using the Help Manager
Using the Help Manager
You can use the Help Manager to provide information to the user
that describes the action, behavior, or properties of elements of your
application. For example, you can create a help balloon for each menu
command to describe what it does.
The Help Manager is available only in system 7.0 or later. Use the
Gestalt function with the Gestalt selector gestaltHelpMgrAttr. Test
the bit field indicated by the gestaltHelpMgrPresent constant in the
response parameter. If the bit is set, then the Help Manager is
present.
The Help Manager is initialized at startup time. The user controls
whether help is enabled by choosing the Show Balloons or Hide
Balloons command from the Help menu.
The Help menu is specific to each application, just as the File and
Edit menus are specific to each application. The Help menu items that
are defined by the Help Manager are common to all applications, but
you can add your own menu items for help-related information.
When your application calls the InsertMenu procedure, the
Menu Manager automatically appends the Help menu to your menus.
The Help menu is automatically appended to the right of all your menus
and to the left of the Application menu (and to the left of the Keyboard
menu if a non-Roman script system is installed).
You can create help balloons for the menus, dialog boxes, alert boxes,
or content area of windows belonging to your application. You can also
override some of the default help balloons-such as the default help
balloon for the title bar of a window.
You can specify the content of a help balloon using text strings, styled
text, or pictures. Although you should always strive for brevity in
your help messages, text strings can contain up to 255 characters. You
can use up to 32 KB with styled text. The Help Manager determines
the actual size of the help balloon and, for text strings, uses TextEdit
to determine the word and line breaks of text.
The Help Manager automatically tracks the cursor and generates
help balloons defined in standard help resources. Your application can
also track the cursor and use Help Manager routines to display and
remove help balloons.