[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]


   NAME
        SetAmigaGuideContextA - Set the context ID for an AmigaGuide system.
                                                               (V34)
   SYNOPSIS
        success = SetAmigaGuideContextA ( handle, context, attrs );
        d0                                 a0       d0      d1

        BOOL SetAmigaGuideContextA (AMIGAGUIDECONTEXT, ULONG,
                                    struct TagItem *);

        success = SetAmigaGuideContext (handle, context, tag1, ...);

        BOOL SetAmigaGuideContext (AMIGAGUIDECONTEXT, ULONG, Tag, ...);

   FUNCTION
        This function, and the SendAmigaGuideContext() function, are used to
        provide a simple way to display a node based on a numeric value,
        instead of having to build up a slightly more complex command
        string.

   INPUTS
        handle -- Handle to an AmigaGuide system.

        context -- Index value of the desired node to display.

        future -- Future expansion, must be set to NULL for now.

   EXAMPLE

        /* sample context table */
        STRPTR ContextArray[] =
        {
            "MAIN",
            "FILEREQ",
            "PRINT",
            "ABOUT",
            NULL
        };

        /* quickie defines */
        #define HELP_MAIN      0
        #define HELP_FILEREQ   1
        #define HELP_PRINT     2
        #define HELP_ABOUT     3

        ...

        struct NewAmigaGuide nag = {NULL};

        /* initialize the context table */
        nag.nag_Context = ContextArray;

        ...

        /* bring up help on a particular subject */
        SetAmigaGuideContext(handle, HELP_ABOUT, NULL);

   RETURNS
        success - Returns TRUE if a valid context ID was passed,
            otherwise returns FALSE.

   SEE ALSO
        SendAmigaGuideContextA(), SendAmigaGuideCmdA()


[Back to Amiga Developer Docs]