Help Object Library: 2.1 Adding Help to Your Application: Help Contexts and Help Triggers

Up: GEOS SDK TechDocs | Up | Prev: 2 Adding Help to Your Application | Next: 2.2 Adding Default Normal Help
 ATTR_GEN_HELP_CONTEXT,  HINT_PRIMARY_NO_HELP_BUTTON

The help controller displays help pages based on an object's context. An object sets its context with ATTR_GEN_HELP_CONTEXT , which holds the name of the context. If an object does not have an assigned context, it will query up the tree until one of its ancestors assigns a context. The help control will display the help page with the same name as the assigned context.

This attribute has some side effects. If placed on a GenPrimary object, it will create the help trigger that appears in the application's title bar (unless other restrictions are applied--see below). If placed on a dialog box GenInteraction, it will create a help trigger in the dialog box (placement of the trigger is subject to the specific UI, but it will normally be on the far right of the reply bar). Both of these triggers invoke help with the context of their objects.

Almost always, the GenPrimary's help context should be "TOC" to bring up the TOC help page. This is the default context, so if you don't specify a context for any object, help will always try to bring up the TOC page.

As stated above, ATTR_GEN_HELP_CONTEXT will by default create help triggers in certain situations. There are two times when creation of these help triggers will be suppressed: First, on small-screen devices or other situations wherein help triggers are not desired. In this situation, the .INI file will have a certain help option turned off. The simplest way to do this is to set

 [uiFeatures]
 helpOptions = 1

in the .INI file. This corresponds to the single help option UIHO_HIDE_HELP_BUTTONS and will suppress the help triggers. Both the F1 key (or equivalent) and MSG_META_BRING_UP_HELP will still invoke help properly.

Second, you can suppress only the GenPrimary's help trigger by adding HINT_PRIMARY_NO_HELP_BUTTON to the GenPrimary. Other help triggers will appear as dictated by the other requirements.

You can create your own help triggers if you like, though there is rarely a need to. Help triggers can be normal GenTrigger objects, with special settings. If the trigger is in a dialog box, it should have IC_HELP as its interaction type ( ATTR_GEN_TRIGGER_INTERACTION_COMMAND ). Otherwise, it should send MSG_META_BRING_UP_HELP to the object that should provide the context for the help. Also, the trigger should have its moniker specified with ATTR_GEN_DEFAULT_MONIKER , with the value GDMT_HELP . This will ensure your help trigger looks like other help triggers.

Help triggers you create, however, will not be suppressed by the system. Thus, if you want your application to be adaptable to small-screen UIs, you should only use system-provided help triggers.


Up: GEOS SDK TechDocs | Up | Prev: 2 Adding Help to Your Application | Next: 2.2 Adding Default Normal Help