Module HelpSystemConstants.pkg

     1//  Define all constants required for windows and html help.
     2//  Create Global variables needed for help
     3//  Create 2 cDesktop procedures needed for help system
     4use VDFBase.pkg
     5
     6// different modes used by application object to determine how help works
     7Enum_list
     8   define htNoHelp     // no help system, do nothing
     9   define htHtmlHelp     // Html help
    10   define htWinHelp   // windows hlp file
    11End_Enum_list
    12
    13//
    14//  Used when help object makes a request to the object requesting help.
    15//
    16Define HELP_CONTEXT_NONE      FOR 0 // added for 11.1
    17Define HELP_CONTEXT_ID        FOR 1
    18Define HELP_CONTEXT_KEYWORD   FOR 2
    19Define HELP_CONTEXT_ID_OR_KEY FOR 3
    20Define HELP_CONTEXT_ANY       FOR 3 // added for 11.1 (yes it is a duplicate)
    21Define HELP_CONTEXT_DATAFILE  FOR 4
    22Define HELP_CONTEXT_ERROR     FOR 5
    23Define HELP_CONTEXT_HTMLPAGE  FOR 6 // added 11.1
    24//
    25// Various help string symbols
    26//
    27// These were changed to use new low level help call. The blank was not a good idea
    28//Define HELP_FOR_HELP_STRING     FOR ''   // blank string causes help_on_help
    29//Define HELP_ON_TOPIC_STRING     FOR ' '  // best we can do because of ''
    30Define HELP_FOR_HELP_STRING     FOR 'HELP$ON$HELP'   // blank string causes help_on_help
    31Define HELP_ON_TOPIC_STRING     FOR 'HELP$ON$TOPIC'  // best we can do because of ''
    32Define HELP_ERROR_PREFIX_STRING FOR "ERROR:"
    33Define HELP_DIR                 FOR 'WindowsHelpFileDirectory'
    34Define HELP_FILE                FOR 'WindowsHelpFileName'
    35Define DEFAULT_HELP_FILENAME    FOR 'DFHelp.hlp'
    36
    37// Global integer Help_Object_Id - This keeps track of the object id of the
    38// help object. This is set when the object is created.
    39global_variable Handle help_object_id
    40Move 0 to Help_object_id  // make it undefined
    41
    42Global_Variable Handle ghoHtmlHelp
    43Move 0 to ghoHtmlHelp
    44
    45// An object requesting help may receive the message help_context from the help system. It is
    46// expected that the object or one of its parents will provide context. If context is never provided
    47// the context request may get all the way to the desktop.
    48
    49{ Visibility=Private }
    50Function Help_Context for cDesktop Integer Context_Type Returns String
    51End_Function
    52
    53procedure Help for cDesktop
    54End_procedure
    55
    56// if this delegates here, it handles it with no context ((added to 11.1. See help_mx.pkg)
    57{ Visibility=Private }
    58Function HtmlHelpContext DESKTOP Integer eContext String BYREF sContext Returns Integer
    59    Integer eContextFound
    60    Move '' to sContext
    61    Move HELP_CONTEXT_NONE to eContextFound
    62    Function_return eContextFound
    63end_function
    64
    65
    66