TABLE OF CONTENTS


    HTMLtext.mcc/HTMLtext.mcc
    HTMLtext.mcc/MUIA_HTMLtext_Block
    HTMLtext.mcc/MUIA_HTMLtext_CloseURLHook
    HTMLtext.mcc/MUIA_HTMLtext_Contents
    HTMLtext.mcc/MUIA_HTMLtext_DoubleClick
    HTMLtext.mcc/MUIA_HTMLtext_ElementList
    HTMLtext.mcc/MUIA_HTMLtext_LoadImages
    HTMLtext.mcc/MUIA_HTMLtext_OpenURLHook
    HTMLtext.mcc/MUIA_HTMLtext_Path
    HTMLtext.mcc/MUIA_HTMLtext_Title
    HTMLtext.mcc/MUIA_HTMLtext_URL
    HTMLtext.mcc/MUIM_HTMLtext_Jump
    HTMLtext.mcc/MUIM_HTMLtext_Mark
    HTMLtext.mcc/MUIM_HTMLtext_Reload

HTMLtext.mcc/HTMLtext.mcc

COPYRIGHT
     HTMLtext.mcc
     (C)opyright by Dirk Holtwick, 1997

     This product is SHAREWARE and the source is available from
     the author only if you are a registred user.

     The HTMLtext class may be used in every SHAREWARE project
     without paying any fee. For comercial applications you need
     a written permission of the author.

DESCRIPTION
     The HTMLtext class for MUI dispalys a subset of HTML in a virtual
     group. You may put it into a ScrollgroupObject to move easier
     through the text.

AUTHOR
     Dirk Holtwick
     Grenzdicker Str. 13
     D-47665 Sonsbeck
     dirco@uni-duisburg.de
     http://fsrinfo.uni-duisburg.de/~dirk/


HTMLtext.mcc/MUIA_HTMLtext_Block

NAME
     MUIA_HTMLtext_Block -- [..G], char *

FUNCTION
     Get a pointer to the marked text. The text will be stripped of any
     HTML informations.

EXAMPLE
     moreHTML.c

SEE ALSO
     MUIA_HTMLtext_DoubleClick


HTMLtext.mcc/MUIA_HTMLtext_CloseURLHook

NAME
     MUIA_HTMLtext_CloseURLHook -- [IS.], struct Hook *

FUNCTION
     This hook will be called, always when the local copy of an URL
     is not longer needed. You may delete this file if you want,
     otherwise it will never be deleted.

EXAMPLE
     moreHTML.c

SEE ALSO
     MUIA_HTMLtext_URL, MUIA_HTMLtext_OpenURLHook


HTMLtext.mcc/MUIA_HTMLtext_Contents

NAME
     MUIA_HTMLtext_Contents -- (V1 ) [ISG], STRPTR

FUNCTION
     HTML text to be displayed in the HTMLtext object.

     This string may content HTML tags and the equivalent
     closing tags (e.g. <b>..</b>. Not supported tags will not have any
     effect to the output. The structure defined by the HTML specifications
     have to be respected. See example for a simple HTML demo text.
     To know about the supported tags and attributes please refer to
     the documentation of the HTMLtext class.

     See also further documentations of the HTML language.

EXAMPLE
     MUIA_HTMLtext_Contents,
        "<html>"
        "  <head>"
        "     <title>Example</title>"
        "  </head>"
        "  <body>"
        "     <p>A simple example for the HTML class</p>"
        "  </body>"
        "</html>"

   BUG
      If you set a text with background pattern in a not opened
      window the background may appear crippled. (Don't ask me why!)

SEE ALSO
      MUIA_HTMLtext_URL, MUIA_HTMLtext_Path, MUIA_HTMLtext_Title


HTMLtext.mcc/MUIA_HTMLtext_DoubleClick

NAME
     MUIA_HTMLtext_DoubleClick -- [..G], BOOL

FUNCTION
     This attribute is set to TRUE whenever the user
     double clicks on an object in the text.

SEE ALSO
     MUIA_HTMLtext_Block


HTMLtext.mcc/MUIA_HTMLtext_ElementList

NAME
     MUIA_HTMLtext_ElementList -- [..G], struct MUIS_HTMLtext_Element *

FUNCTION
     Gets a pointer to the first element of the list created by HTMLtext.mcc
     to handle the text objects.

     The structure MUIS_HTMLtext_Element looks like this:

        struct MUIS_HTMLtext_Element
        {
           struct   MUIS_HTMLtext_Element *next;
           UWORD    type;
           UWORD    x,y,dx,dy;
           Object   *obj;
           char     *text;
        };

     You can walk through the list by following 'next' until it is NULL.
     'x','y' contain the eventually coords of the related MUI object
     relatively to the upper left corner of the HTML object. 'dx' and 'dy'
     contain the width and height of the object.
     'type' can contain the various values of them only the followings
     are public:

        MUIV_HTMLtext_Element_Text:
           You may find a pointer to the text in 'text' and in 'obj'
           a pointer to a MUI object of an internal custom class of
           HTMLtext.mcc.

        MUIV_HTMLtext_Element_Image:
           'obj' contains a pointer to the MUI object of an internal
           custom class of HTMLtext.mcc.

        MUIV_HTMLtext_Element_HorizRule:
           'obj' contains a pointer to the MUI object of 'Rectangle Class'.

     You may also use some macros defined in the include files. (See example)

EXAMPLE
     // Print active text of 'obj' (an HTMLtext object)

     struct MUIS_HTMLtext_Element *el;

     set(app, MUIA_Application_Sleep, TRUE);      // Better, to avoid confusion
     get(obj, MUIA_HTMLtext_ElementList, &el);
     while(el)
     {
        printf("%s", MACRO_HTMLtext_GetText(el));
        el = el->next;
     }
     set(app, MUIA_Application_Sleep, FALSE);


HTMLtext.mcc/MUIA_HTMLtext_LoadImages

NAME
     MUIA_HTMLtext_LoadImages -- [IS.], BOOL

FUNCTION
     Override the users configuration reguarding the loading of images in
     the HTML document. This may be usefull, if you use the HTMLtext.mcc
     to display informations in which the image is a very important part.
     In all other cases it might be better to let the user choose.

EXAMPLE
     moreHTML.c


HTMLtext.mcc/MUIA_HTMLtext_OpenURLHook

NAME
     MUIA_HTMLtext_OpenURLHook -- [IS.], struct Hook *

FUNCTION
     This hook will be called, always when an URL has to be loaded
     whose protocol is not supported. These URL's may come from
     hyperlinks, images or else.
     The hook function will receive a pointer to a structure described bellow
     in the register a1. In a0 is a pointer to the calling hook and in a2
     a pointer to the calling object.

        struct
        {
           char *URL;
           char *TmpFilename;
        };

     The member 'URL' contains the full name of the URL. 'TmpFilename' is an
     array of char where to the calling hook copies the name of a local file
     that contains the data coming from the URL. The default name already
     standing in 'TmpFilename' will be a file in "T:". (Created by SAS/C
     tmpnam() function).
     However, you may change the name as you like as long as it is not long
     than 256 bytes.

     The class will test if the temporary file exists or not. If not will
     follow an ordinary error message, that the file has not been found.

     FUTURE:

     For the future I plan to do file notification, that means that you may
     launch a process to load data from the URL in a file. Then you leave the
     function called by the Hook but returning TRUE and the name of the file.
     Once the file is loaded comletely, HTMLtext.mcc will refresh the display.
     Due to some technical problems it will take some time, before everything
     works fine :(

EXAMPLE
     moreHTML.c

SEE ALSO
     MUIA_HTMLtext_URL, MUIA_HTMLtext_CloseURLHook


HTMLtext.mcc/MUIA_HTMLtext_Path

NAME
     MUIA_HTMLtext_Path -- (V1 ) [ISG], STRPTR

FUNCTION
     Sets the path to the used document. This value will be used, if
     there are images to load or links to follow and they not have
     a full path. If you use MUIA_HTMLtext_LoadContents, the path will
     be automatically set.

SEE ALSO
     MUIA_HTMLtext_URL


HTMLtext.mcc/MUIA_HTMLtext_Title

NAME
     MUIA_HTMLtext_Title -- (V1 ) [..G], STRPTR

FUNCTION
     Gets the title of the document currently active. The title has
     to be specified in the text between <title> and </title> tags.

SEE ALSO
     MUIA_HTMLtext_Contents


HTMLtext.mcc/MUIA_HTMLtext_URL

NAME
     MUIA_HTMLtext_URL -- [ISG], STRPTR

FUNCTION
     Name of an URL to be loaded. If the URL is of an not supported
     protocol, the MUIA_HTMLtext_OpenURLHook will be called.

     The only supported protocol, yet, is "file://". Names without
     any protocol specification will be handled as normal local filenames.

SEE ALSO
      MUIA_HTMLtext_OpenURLHook, MUIA_HTMLtext_Path, MUIA_HTMLtext_Title


HTMLtext.mcc/MUIM_HTMLtext_Jump

NAME
     MUIM_HTMLtext_Jump

SYNOPSIS
     DoMethod(obj,MUIM_HTMLtext_Jump, struct MUIS_HTMLtext_Element *el);

FUNCTION
     Jump to position of an element to make it visible to the user.

INPUTS
     el   - The element to be jumped to

RESULT
     If for some resons it was impossible to jump, FALSE is returned.

BUGS
     Function may crash if element passed are not in element list.

SEE ALSO
     MUIA_HTMLtext_ElementList, MUIA_Virtgroup_Top


HTMLtext.mcc/MUIM_HTMLtext_Mark

NAME
     MUIM_HTMLtext_Mark

SYNOPSIS
     DoMethod(obj,MUIM_HTMLtext_Mark,
        struct MUIS_HTMLtext_Element *first,
        struct MUIS_HTMLtext_Element *last);

FUNCTION
     Mark a part of the HTML text. Use list from MUIA_HTMLtext_ElementList

INPUTS
     first  - The first element to be marked
     last   - The last  element to be marked

RESULT
     The result value is currently undefined.

BUGS
     Function may crash if element passed are not in element list.

SEE ALSO
     MUIA_HTMLtext_ElementList


HTMLtext.mcc/MUIM_HTMLtext_Reload

NAME
     MUIM_HTMLtext_Reload

SYNOPSIS
     DoMethod(obj,MUIM_HTMLtext_Reload);

FUNCTION
     Reloads the current page. Use this, if you know that the documents
     contents have changed, because MUIA_HTMLtext_URL will not reload
     the document, if the URL given is the same as the one currently
     displayed.

SEE ALSO
     MUIA_HTMLtext_URL