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/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

BUGS
     This attribute doesn't work very well. It is better to avoid it,
     until it works stabile in a later version.

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[1024];
        };

     The member 'URL' contains the full name of the URL. 'TmpFilename' is an
     array of char whereto the calleing 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.

     Returning TRUE from the Hook will mean, that the loading was successfull
     and that a local copy will be found in 'Filename'. FALSE means that
     something worked wrong and HTMLtext.mcc will output the ordinary error
     message.

     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 :(

     A MUIA_HTMLtext_CloseURLHook is also planed, so that you may stop the
     launched process or delete the temporary file. This Hook will always be
     called, when the URL to be displayed will change.

EXAMPLE
     moreHTML.c

BUGS
     This attribute doesn't work very well. It is better to avoid it,
     until it works stabile in a later version.

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