GEOS SDK TechDocs
|
|
3.4 Managing Help Types
|
3.6 Customizing the Pointer Image
ATTR_GEN_HELP_FILE, ATTR_GEN_HELP_FILE_FROM_INIT_FILE, MSG_META_GET_HELP_FILE, MSG_META_SET_HELP_FILE, ATTR_GEN_CONTROL_DO_NOT_USE_LIBRARY_NAME_FOR_HELP
The help controller gets the text it displays from help files. Help files are generated by the help editor (a modified GeoWrite) from GeoWrite documents and are located in USERDATA\HELP. An application may use a single help file or multiple help files, and hyperlinks may extend across files.
The help controller figures out the help file to use by looking for
ATTR_GEN_HELP_FILE
on the generic object that brings up the help. For example, if the user clicks a help trigger in a dialog box, the help controller first gets the context of the dialog box (contexts are described in Help Contexts and Help Triggers
) and will then get its help file. If the dialog box has an
ATTR_GEN_HELP_FILE
specifying a particular help file, the help controller will try to use that file.
If the dialog box does not have that attribute, the help controller queries up the generic tree until it either finds an ancestor with the attribute or gets to the GenApplication object. If no help file is specified, the help controller will by default use a file with the same name as the geode's permanent name with the extender characters removed. For example, in the sample application HelpSamp, which has the permanent name helpsamp.app (which is defined in the helpsamp.gp file), the default file name would be helpsamp .
An object can use
ATTR_GEN_HELP_FILE_FROM_INIT_FILE
to specify that its help file should be garnered from the GEOS.INI file. If this attribute is used, the help controller will look in the GEOS.INI file for a category of the same name as the application and a key named "helpfile." Thus, to set the help file to "My Own Help File" for the HelpSamp application, you could add the following to your GEOS.INI file:
[HelpSamp] helpfile = My Own Help File
If, however, no object has
ATTR_GEN_HELP_FILE_FROM_INIT_FILE
, this entry will not be noticed by the help controller.
Controller objects, which typically exist within their own libraries, may use the help files provided by the application that includes them rather than the help file normally used by the library. To have a controller do this, set
ATTR_GEN_CONTROL_DO_NOT_USE_LIBRARY_NAME_FOR_HELP
for the controller in your application. This will have the controller continue querying up the generic tree when searching for the proper help file to use.
The help file used by a given object may also be changed dynamically with
MSG_META_SET_HELP_FILE
. This message takes a pointer to the new file's name and sets the object's
ATTR_GEN_HELP_FILE
attribute to the new file. This message is used by the HelpSamp sample application.
The help file can be retrieved with
MSG_META_GET_HELP_FILE
. This message returns the name of the file being used by the recipient generic object.
GEOS SDK TechDocs
|
|
3.4 Managing Help Types
|
3.6 Customizing the Pointer Image