home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / MUI / MCCHTMLT.LHA / MCC_HTMLtext / Developer / AutoDocs / HTMLtext_mcc.doc next >
Encoding:
Text File  |  1997-04-02  |  10.1 KB  |  339 lines

  1. TABLE OF CONTENTS
  2.  
  3. HTMLtext.mcc/HTMLtext.mcc
  4. HTMLtext.mcc/MUIA_HTMLtext_Block
  5. HTMLtext.mcc/MUIA_HTMLtext_CloseURLHook
  6. HTMLtext.mcc/MUIA_HTMLtext_Contents
  7. HTMLtext.mcc/MUIA_HTMLtext_DoubleClick
  8. HTMLtext.mcc/MUIA_HTMLtext_ElementList
  9. HTMLtext.mcc/MUIA_HTMLtext_LoadImages
  10. HTMLtext.mcc/MUIA_HTMLtext_OpenURLHook
  11. HTMLtext.mcc/MUIA_HTMLtext_Path
  12. HTMLtext.mcc/MUIA_HTMLtext_Title
  13. HTMLtext.mcc/MUIA_HTMLtext_URL
  14. HTMLtext.mcc/MUIM_HTMLtext_Jump
  15. HTMLtext.mcc/MUIM_HTMLtext_Mark
  16. HTMLtext.mcc/HTMLtext.mcc                           HTMLtext.mcc/HTMLtext.mcc
  17.  
  18.    COPYRIGHT
  19.  
  20.      HTMLtext.mcc
  21.      (C)opyright by Dirk Holtwick, 1997
  22.  
  23.      This product is SHAREWARE and the source is available from
  24.      the author only if you are a registred user.
  25.  
  26.      The HTMLtext class may be used in every SHAREWARE project
  27.      without paying any fee. For comercial applications you need
  28.      a written permission of the author.
  29.  
  30.    DESCRIPTION
  31.      The HTMLtext class for MUI dispalys a subset of HTML in a virtual
  32.      group. You may put it into a ScrollgroupObject to move easier
  33.      through the text.
  34.  
  35.    AUTHOR
  36.      Dirk Holtwick
  37.      Grenzdicker Str. 13
  38.      D-47665 Sonsbeck
  39.      dirco@uni-duisburg.de
  40.      http://fsrinfo.uni-duisburg.de/~dirk/
  41.  
  42. HTMLtext.mcc/MUIA_HTMLtext_Block             HTMLtext.mcc/MUIA_HTMLtext_Block
  43.  
  44.    NAME
  45.      MUIA_HTMLtext_Block -- [..G], char *
  46.  
  47.    FUNCTION
  48.      Get a pointer to the marked text. The text will be stripped of any
  49.      HTML informations.
  50.  
  51.    EXAMPLE
  52.      moreHTML.c
  53.  
  54.    SEE ALSO
  55.      MUIA_HTMLtext_DoubleClick
  56.  
  57. HTMLtext.mcc/MUIA_HTMLtext_CloseURLHookTMLtext.mcc/MUIA_HTMLtext_CloseURLHook
  58.  
  59.    NAME
  60.      MUIA_HTMLtext_CloseURLHook -- [IS.], struct Hook *
  61.  
  62.    FUNCTION
  63.      This hook will be called, always when the local copy of an URL
  64.      is not longer needed. You may delete this file if you want,
  65.      otherwise it will never be deleted.
  66.  
  67.    EXAMPLE
  68.      moreHTML.c
  69.  
  70.    BUGS
  71.      This attribute doesn't work very well. It is better to avoid it,
  72.      until it works stabile in a later version.
  73.  
  74.    SEE ALSO
  75.      MUIA_HTMLtext_URL, MUIA_HTMLtext_OpenURLHook
  76.  
  77. HTMLtext.mcc/MUIA_HTMLtext_Contents       HTMLtext.mcc/MUIA_HTMLtext_Contents
  78.  
  79.    NAME
  80.      MUIA_HTMLtext_Contents -- (V1 ) [ISG], STRPTR
  81.  
  82.    FUNCTION
  83.      HTML text to be displayed in the HTMLtext object.
  84.  
  85.      This string may content HTML tags and the equivalent
  86.      closing tags (e.g. <b>..</b>. Not supported tags will not have any
  87.      effect to the output. The structure defined by the HTML specifications
  88.      have to be respected. See example for a simple HTML demo text.
  89.      To know about the supported tags and attributes please refer to
  90.      the documentation of the HTMLtext class.
  91.  
  92.      See also further documentations of the HTML language.
  93.  
  94.    EXAMPLE
  95.      MUIA_HTMLtext_Contents,
  96.         "<html>"
  97.         "  <head>"
  98.         "     <title>Example</title>"
  99.         "  </head>"
  100.         "  <body>"
  101.         "     <p>A simple example for the HTML class</p>"
  102.         "  </body>"
  103.         "</html>"
  104.  
  105.    BUG
  106.       If you set a text with background pattern in a not opened
  107.       window the background may appear crippled. (Don't ask me why!)
  108.  
  109.    SEE ALSO
  110.       MUIA_HTMLtext_URL, MUIA_HTMLtext_Path, MUIA_HTMLtext_Title
  111.  
  112. HTMLtext.mcc/MUIA_HTMLtext_DoubleClick HTMLtext.mcc/MUIA_HTMLtext_DoubleClick
  113.  
  114.    NAME
  115.      MUIA_HTMLtext_DoubleClick -- [..G], BOOL
  116.  
  117.    FUNCTION
  118.      This attribute is set to TRUE whenever the user
  119.      double clicks on an object in the text.
  120.  
  121.    SEE ALSO
  122.      MUIA_HTMLtext_Block
  123.  
  124. HTMLtext.mcc/MUIA_HTMLtext_ElementList HTMLtext.mcc/MUIA_HTMLtext_ElementList
  125.  
  126.    NAME
  127.      MUIA_HTMLtext_ElementList -- [..G], struct MUIS_HTMLtext_Element *
  128.  
  129.    FUNCTION
  130.      Gets a pointer to the first element of the list created by HTMLtext.mcc
  131.      to handle the text objects.
  132.  
  133.      The structure MUIS_HTMLtext_Element looks like this:
  134.  
  135.         struct MUIS_HTMLtext_Element
  136.         {
  137.            struct   MUIS_HTMLtext_Element *next;
  138.            UWORD    type;
  139.            UWORD    x,y,dx,dy;
  140.            Object   *obj;
  141.            char     *text;
  142.         };
  143.  
  144.      You can walk through the list by following 'next' until it is NULL.
  145.      'x','y' contain the eventually coords of the related MUI object
  146.      relatively to the upper left corner of the HTML object. 'dx' and 'dy'
  147.      contain the width and height of the object.
  148.      'type' can contain the various values of them only the followings
  149.      are public:
  150.  
  151.         MUIV_HTMLtext_Element_Text:
  152.            You may find a pointer to the text in 'text' and in 'obj'
  153.            a pointer to a MUI object of an internal custom class of
  154.            HTMLtext.mcc.
  155.  
  156.         MUIV_HTMLtext_Element_Image:
  157.            'obj' contains a pointer to the MUI object of an internal
  158.            custom class of HTMLtext.mcc.
  159.  
  160.         MUIV_HTMLtext_Element_HorizRule:
  161.            'obj' contains a pointer to the MUI object of 'Rectangle Class'.
  162.  
  163.      You may also use some macros defined in the include files. (See example)
  164.  
  165.    EXAMPLE
  166.      // Print active text of 'obj' (an HTMLtext object)
  167.  
  168.      struct MUIS_HTMLtext_Element *el;
  169.  
  170.      set(app, MUIA_Application_Sleep, TRUE);      // Better, to avoid confusi
  171. on
  172.      get(obj, MUIA_HTMLtext_ElementList, &el);
  173.      while(el)
  174.      {
  175.         printf("%s", MACRO_HTMLtext_GetText(el));
  176.         el = el->next;
  177.      }
  178.      set(app, MUIA_Application_Sleep, FALSE);
  179.  
  180. HTMLtext.mcc/MUIA_HTMLtext_LoadImages   HTMLtext.mcc/MUIA_HTMLtext_LoadImages
  181.  
  182.    NAME
  183.      MUIA_HTMLtext_LoadImages -- [IS.], BOOL
  184.  
  185.    FUNCTION
  186.      Override the users configuration reguarding the loading of images in
  187.      the HTML document. This may be usefull, if you use the HTMLtext.mcc
  188.      to display informations in which the image is a very important part.
  189.      In all other cases it might be better to let the user choose.
  190.  
  191.    EXAMPLE
  192.      moreHTML.c
  193.  
  194. HTMLtext.mcc/MUIA_HTMLtext_OpenURLHook HTMLtext.mcc/MUIA_HTMLtext_OpenURLHook
  195.  
  196.    NAME
  197.      MUIA_HTMLtext_OpenURLHook -- [IS.], struct Hook *
  198.  
  199.    FUNCTION
  200.      This hook will be called, always when an URL has to be loaded
  201.      whose protocol is not supported. These URL's may come from
  202.      hyperlinks, images or else.
  203.      The hook function will receive a pointer to a structure described bellow
  204.      in the register a1. In a0 is a pointer to the calling hook and in a2
  205.      a pointer to the calling object.
  206.  
  207.         struct
  208.         {
  209.            char *URL;
  210.            char TmpFilename[1024];
  211.         };
  212.  
  213.      The member 'URL' contains the full name of the URL. 'TmpFilename' is an
  214.      array of char whereto the calleing hook copies the name of a local file
  215.      that contains the data coming from the URL. The default name already
  216.      standing in 'TmpFilename' will be a file in "T:". (Created by SAS/C
  217.      tmpnam() function).
  218.      However, you may change the name as you like.
  219.  
  220.      Returning TRUE from the Hook will mean, that the loading was successfull
  221.      and that a local copy will be found in 'Filename'. FALSE means that
  222.      something worked wrong and HTMLtext.mcc will output the ordinary error
  223.      message.
  224.  
  225.      FUTURE:
  226.  
  227.      For the future I plan to do file notification, that means that you may
  228.      launch a process to load data from the URL in a file. Then you leave the
  229.      function called by the Hook but returning TRUE and the name of the file.
  230.      Once the file is loaded comletely, HTMLtext.mcc will refresh the display
  231. .
  232.      Due to some technical problems it will take some time, before everything
  233.      works fine :(
  234.  
  235.      A MUIA_HTMLtext_CloseURLHook is also planed, so that you may stop the
  236.      launched process or delete the temporary file. This Hook will always be
  237.      called, when the URL to be displayed will change.
  238.  
  239.    EXAMPLE
  240.      moreHTML.c
  241.  
  242.    BUGS
  243.      This attribute doesn't work very well. It is better to avoid it,
  244.      until it works stabile in a later version.
  245.  
  246.    SEE ALSO
  247.      MUIA_HTMLtext_URL, MUIA_HTMLtext_CloseURLHook
  248.  
  249. HTMLtext.mcc/MUIA_HTMLtext_Path               HTMLtext.mcc/MUIA_HTMLtext_Path
  250.  
  251.    NAME
  252.      MUIA_HTMLtext_Path -- (V1 ) [ISG], STRPTR
  253.  
  254.    FUNCTION
  255.      Sets the path to the used document. This value will be used, if
  256.      there are images to load or links to follow and they not have
  257.      a full path. If you use MUIA_HTMLtext_LoadContents, the path will
  258.      be automatically set.
  259.  
  260.    SEE ALSO
  261.      MUIA_HTMLtext_URL
  262.  
  263. HTMLtext.mcc/MUIA_HTMLtext_Title             HTMLtext.mcc/MUIA_HTMLtext_Title
  264.  
  265.    NAME
  266.      MUIA_HTMLtext_Title -- (V1 ) [..G], STRPTR
  267.  
  268.    FUNCTION
  269.      Gets the title of the document currently active. The title has
  270.      to be specified in the text between <title> and </title> tags.
  271.  
  272.    SEE ALSO
  273.      MUIA_HTMLtext_Contents
  274.  
  275. HTMLtext.mcc/MUIA_HTMLtext_URL                 HTMLtext.mcc/MUIA_HTMLtext_URL
  276.  
  277.    NAME
  278.      MUIA_HTMLtext_URL -- [ISG], STRPTR
  279.  
  280.    FUNCTION
  281.      Name of an URL to be loaded. If the URL is of an not supported
  282.      protocol, the MUIA_HTMLtext_OpenURLHook will be called.
  283.  
  284.      The only supported protocol, yet, is "file://". Names without
  285.      any protocol specification will be handled as normal local filenames.
  286.  
  287.    SEE ALSO
  288.       MUIA_HTMLtext_OpenURLHook, MUIA_HTMLtext_Path, MUIA_HTMLtext_Title
  289.  
  290. HTMLtext.mcc/MUIM_HTMLtext_Jump               HTMLtext.mcc/MUIM_HTMLtext_Jump
  291.  
  292.    NAME
  293.      MUIM_HTMLtext_Jump
  294.  
  295.    SYNOPSIS
  296.      DoMethod(obj,MUIM_HTMLtext_Jump, struct MUIS_HTMLtext_Element *el);
  297.  
  298.    FUNCTION
  299.      Jump to position of an element to make it visible to the user.
  300.  
  301.    INPUTS
  302.      el   - The element to be jumped to
  303.  
  304.    RESULT
  305.      If for some resons it was impossible to jump, FALSE is returned.
  306.  
  307.    BUGS
  308.      Function may crash if element passed are not in element list.
  309.  
  310.    SEE ALSO
  311.      MUIA_HTMLtext_ElementList, MUIA_Virtgroup_Top
  312.  
  313. HTMLtext.mcc/MUIM_HTMLtext_Mark               HTMLtext.mcc/MUIM_HTMLtext_Mark
  314.  
  315.    NAME
  316.      MUIM_HTMLtext_Mark
  317.  
  318.    SYNOPSIS
  319.      DoMethod(obj,MUIM_HTMLtext_Mark,
  320.         struct MUIS_HTMLtext_Element *first,
  321.         struct MUIS_HTMLtext_Element *last);
  322.  
  323.    FUNCTION
  324.      Mark a part of the HTML text. Use list from MUIA_HTMLtext_ElementList
  325.  
  326.    INPUTS
  327.      first  - The first element to be marked
  328.      last   - The last  element to be marked
  329.  
  330.    RESULT
  331.      The result value is currently undefined.
  332.  
  333.    BUGS
  334.      Function may crash if element passed are not in element list.
  335.  
  336.    SEE ALSO
  337.      MUIA_HTMLtext_ElementList
  338.  
  339.