home *** CD-ROM | disk | FTP | other *** search
/ The Amiga Game Guide / AmigaGameGuide_CD.iso / Amiga / Tools / Browser / MCC_HTMLview / Developer / Autodocs / MCC_HTMLview.Doc
Text File  |  1977-12-31  |  16KB  |  543 lines

  1. TABLE OF CONTENTS
  2.  
  3. HTMLview.mcc/HTMLview.mcc
  4. HTMLview.mcc/MUIA_HTMLview_ClickedURL
  5. HTMLview.mcc/MUIA_HTMLview_Contents
  6. HTMLview.mcc/MUIA_HTMLview_CurrentURL
  7. HTMLview.mcc/MUIA_HTMLview_DiscreteInput
  8. HTMLview.mcc/MUIA_HTMLview_ImageLoadHook
  9. HTMLview.mcc/MUIA_HTMLview_ImagesInDecodeQueue
  10. HTMLview.mcc/MUIA_HTMLview_LoadHook
  11. HTMLview.mcc/MUIA_HTMLview_PageID
  12. HTMLview.mcc/MUIA_HTMLview_Prop_HDeltaFactor
  13. HTMLview.mcc/MUIA_HTMLview_Prop_VDeltaFactor
  14. HTMLview.mcc/MUIA_HTMLview_Qualifier
  15. HTMLview.mcc/MUIA_HTMLview_Scrollbars
  16. HTMLview.mcc/MUIA_HTMLview_Target
  17. HTMLview.mcc/MUIA_HTMLview_Title
  18. HTMLview.mcc/MUIA_HTMLview_URL
  19. HTMLview.mcc/MUIM_HTMLview_Abort
  20. HTMLview.mcc/MUIM_HTMLview_ContinueAnims
  21. HTMLview.mcc/MUIM_HTMLview_FlushImage
  22. HTMLview.mcc/MUIM_HTMLview_GetContextInfo
  23. HTMLview.mcc/MUIM_HTMLview_GotoURL
  24. HTMLview.mcc/MUIM_HTMLview_Parsed
  25. HTMLview.mcc/MUIM_HTMLview_PauseAnims
  26. HTMLview.mcc/MUIM_HTMLview_Reload
  27. HTMLview.mcc/MUIM_HTMLview_Search
  28. HTMLview.mcc/MUIM_HTMLview_VLink
  29.  
  30. HTMLview.mcc/HTMLview.mcc
  31.  
  32.           DO NOT SPREAD THIS FILE, EVERYTHING IS SUBJECT TO CHANGE!
  33.  
  34.             HTMLview.mcc is © 1998 by Allan Odgaard <Duff@DIKU.DK>
  35.  
  36. Please note that if you use this class, then your program may require a bit
  37. more stack than usual. 16KB should be sufficient.
  38.  
  39. This autodoc is not uptodate - please also read HTMLview_mcc.h!
  40.  
  41. ToDo:
  42.  
  43.    MUIM_HTMLview_Print
  44.    MUIM_HTMLview_SearchGUI ?
  45.  
  46. HTMLview.mcc/MUIA_HTMLview_ClickedURL
  47.  
  48.     NAME
  49.         MUIA_HTMLview_ClickedURL -- [..G], STRPTR
  50.  
  51.     FUNCTION
  52.         When the user follows a link, then this tag will reflect the complete
  53.         URL of the pressed link, even if the HRef argument is only relative.
  54.         If the Anchor-element holds target info, then you can read this via
  55.         the MUIA_HTMLview_Target tag.
  56.  
  57.         Note: The URL is only valid during the notify.
  58.  
  59.     EXAMPLE
  60.         /* Setup a notify that will just load the link that the user press */
  61.  
  62.         DoMethod(htmlview, MUIM_Notify,
  63.                  MUIA_HTMLview_ClickedURL, MUIV_Everytime,
  64.                  MUIV_Notify_Self, 3,
  65.                  MUIM_HTMLview_GotoURL, MUIV_TriggerValue, NULL);
  66.  
  67.     SEE ALSO
  68.         MUIA_HTMLview_Target, MUIA_HTMLview_Qualifier
  69.  
  70. HTMLview.mcc/MUIA_HTMLview_Contents
  71.  
  72.     NAME
  73.         MUIA_HTMLview_Contents -- [IS.], STRPTR
  74.  
  75.     FUNCTION
  76.         Use this tag to set the contents to whatever you want displayed.
  77.  
  78.         You currently need to embed the stuff that should be displayied in a
  79.         Body-element. This may change, since the Body-tag is infact not
  80.         required according to the HTML 4.0 specifications, but I really
  81.         dislike this...
  82.  
  83.     EXAMPLE
  84.         SetAttrs(htmlview, MUIA_HTMLview_Contents,
  85.             "<HTML><Body><H1>Test example</H1></Body></HTML>",
  86.             TAG_DONE);
  87.  
  88.     NOTE
  89.         When you set the contents using this tag, then the page ID will change.
  90.         You can get the new page ID with MUIA_HTMLview_PageID
  91.  
  92.     SEE ALSO
  93.         MUIA_HTMLview_PageID
  94.  
  95. HTMLview.mcc/MUIA_HTMLview_CurrentURL
  96.  
  97.     NAME
  98.         MUIA_HTMLview_CurrentURL -- [..G], STRPTR
  99.  
  100.     FUNCTION
  101.         This tag reflects which link is currently below the mousepointer.
  102.         This tag is very similar to MUIA_HTMLview_ClickedURL.
  103.  
  104.     EXAMPLE
  105.         /* Setup a notify that will show the link in a text-object */
  106.  
  107.         DoMethod(htmlview, MUIM_Notify,
  108.                  MUIA_HTMLview_CurrentURL, MUIV_Everytime,
  109.                  textbox, 3,
  110.                  MUIM_Set, MUIA_Text_Contents, MUIV_TriggerValue);
  111.  
  112.     SEE ALSO
  113.         MUIA_HTMLview_ClickedURL, MUIA_HTMLview_Target
  114.  
  115. HTMLview.mcc/MUIA_HTMLview_DiscreteInput
  116.  
  117.     NAME
  118.         MUIA_HTMLview_DiscreteInput -- [IS.], BOOL
  119.  
  120.     FUNCTION
  121.         Since several built-in MUI gadgets don't use eventhandlers, then this
  122.         class will only react on input, if it's either active, or default with
  123.         no other active objects.
  124.  
  125.         If you set the tag to FALSE, then it will always try to use the events
  126.         that it receive. This is desireable if you for example have an active
  127.         stringgadget and press arrow up/down, since the stringgadget can't use
  128.         these keys, and therfor pass 'em on, however only if you use one of
  129.         the stringgadget replacements, which use an eventhandler for input.
  130.  
  131.     NOTE
  132.         The default value of this tag is currently TRUE, but it may change,
  133.         when MUI's built-in objects start to use eventhandlers. So either set
  134.         the tag to FALSE, or leave it as it is.
  135.  
  136. HTMLview.mcc/MUIA_HTMLview_ImageLoadHook
  137.  
  138.     NAME
  139.         MUIA_HTMLview_ImageLoadHook -- [I..], struct Hook *
  140.  
  141.     FUNCTION
  142.         Setup a hook used for image-loading.
  143.  
  144.     SEE ALSO
  145.         MUIA_HTMLview_LoadHook
  146.  
  147. HTMLview.mcc/MUIA_HTMLview_ImagesInDecodeQueue
  148.  
  149.     NAME
  150.         MUIA_HTMLview_ImagesInDecodeQueue -- [..G], ULONG
  151.  
  152.     FUNCTION
  153.         Get the number of pictures which are currently being loaded/decoded.
  154.  
  155. HTMLview.mcc/MUIA_HTMLview_LoadHook
  156.  
  157.     NAME
  158.         MUIA_HTMLview_LoadHook -- [I..], struct Hook *
  159.  
  160.     FUNCTION
  161.         Setup a hook used for (page)-loading.
  162.  
  163.         The hook is called with a pointer to itself in a0, a pointer to a
  164.         struct HTMLview_LoadMsg in a1 and a pointer to the calling object in
  165.         a2.
  166.  
  167.         This hook will be called from a separate task, so the only MUI method
  168.         that you can use is MUIM_Application_PushMethod.
  169.         The hook may very well be called by sevaral tasks at the same time, so
  170.         your code needs to be re-entrant and thread-safe.
  171.  
  172.         The first field of the HTMLview_LoadMsg is lm_Type and can be either:
  173.  
  174.           HTMLview_Open
  175.             You should open the file and return non-null for succes.
  176.             The URL to open can be found as lmsg->lm_Open.URL.
  177.             Please have a look in HTMLview_mcc.h for flag definitions.
  178.             You can store a filehandle or similar in the lm_Userdata field.
  179.  
  180.           HTMLview_Read
  181.             Read upto lmsg->lm_Read.Size bytes and store them in
  182.             lmsg->lm_Read.Buffer.
  183.             Return the actual number of bytes read. 0 for EOF.
  184.  
  185.           HTMLview_Write
  186.             This is used when the user submit POST-forms. You can read the
  187.             encoding type and length as EncodingType & PostLength.
  188.  
  189.           HTMLview_Close
  190.             Close the file.
  191.  
  192.         There is also a lm_PageID field, this is a unique identifier for the
  193.         page requested. This ID is the same as returned by
  194.         MUIM_HTMLview_GotoURL.
  195.         Please have in mind, when using frames, that two different frames may
  196.         use the same ID, but you can distingish by looking at the calling
  197.         object, which will be two different instances of HTMLview.mcc.
  198.  
  199.     NOTES
  200.         The object which originally requested something loaded, may not be
  201.         valid, by the time you've actually loaded it (frames). So you should
  202.         actually never use the obj pointer.
  203.         Your LoadMsg contain a lm_App, which will always be valid.
  204.  
  205. HTMLview.mcc/MUIA_HTMLview_PageID
  206.  
  207.     NAME
  208.         MUIA_HTMLview_PageID -- [..G], ULONG
  209.  
  210.     FUNCTION
  211.         Get the page ID of the currently displayed page.
  212.         This is the same as returned by MUIM_HTMLview_GotoURL.
  213.  
  214.     SEE ALSO
  215.         MUIA_HTMLview_Contents
  216.  
  217. HTMLview.mcc/MUIA_HTMLview_Prop_HDeltaFactor
  218.  
  219.     NAME
  220.         MUIA_HTMLview_Prop_HDeltaFactor -- [..G], ULONG
  221.  
  222.     FUNCTION
  223.         This tag will give a reasonable delta factor for a horizontal
  224.         scrollbar.
  225.  
  226.     SEE ALSO
  227.         MUIA_Virtgroup_Width, MUIA_Virtgroup_Left, MUIA_Width
  228.  
  229. HTMLview.mcc/MUIA_HTMLview_Prop_VDeltaFactor
  230.  
  231.     NAME
  232.         MUIA_HTMLview_Prop_VDeltaFactor -- [..G], ULONG
  233.  
  234.     FUNCTION
  235.         This tag will give a reasonable delta factor for a vertical scrollbar.
  236.  
  237.     SEE ALSO
  238.         MUIA_Virtgroup_Height, MUIA_Virtgroup_Top, MUIA_Height
  239.  
  240. HTMLview.mcc/MUIA_HTMLview_Qualifier
  241.  
  242.     NAME
  243.         MUIA_HTMLview_Qualifier -- [..G], ULONG
  244.  
  245.     FUNCTION
  246.         The qualifier(s) which the user pressed, when she clicked on a link,
  247.         is registered and can be obtained with this tag.
  248.  
  249.     SEE ALSO
  250.         MUIA_HTMLview_ClickedURL
  251.  
  252. HTMLview.mcc/MUIA_HTMLview_Scrollbars
  253.  
  254.     NAME
  255.         MUIA_HTMLview_Scrollbars -- [I..], ULONG
  256.  
  257.     SPECIAL INPUTS
  258.         MUIV_HTMLview_Scrollbars_Auto
  259.         MUIV_HTMLview_Scrollbars_HorizAuto
  260.         MUIV_HTMLview_Scrollbars_No
  261.         MUIV_HTMLview_Scrollbars_Yes
  262.  
  263.     FUNCTION
  264.         If you supply this tag, then you will get back a scrollgroup object,
  265.         which contain the htmlview object as child.
  266.         You can't really use this scrollgroup object (other than having it as
  267.         part of your application) so you'll need to obtain the pointer to the
  268.         htmlview object. This can be done via MUIA_ScrollGroup_HTMLview.
  269.         E.g.:
  270.             get(scrollgroup, MUIA_ScrollGroup_HTMLview, &htmlview);
  271.  
  272.         If you don't want scrollbars, then you shouldn't use this tag.
  273.         If you always want scrollbars, then you should instead encapsulate the
  274.         htmlview object in a real scrollgroup, or setup your own
  275.         notifications.
  276.  
  277.     NOTE
  278.         If you use this tag with a subclass, then your OM_NEW needs a little
  279.         bit of modification, here's how:
  280.  
  281.         case OM_NEW:
  282.         {
  283.             if(result = DoSuperMethodA(cl, obj, msg))
  284.             {
  285.                get(result, MUIA_ScrollGroup_HTMLview, &obj);
  286.                struct mydata *data = INST_DATA(cl, obj);
  287.                ...
  288.             }
  289.             return(result);
  290.         }
  291.         break;
  292.  
  293.  
  294.     EXAMPLE
  295.         /* Create an instance with scrollbars, which will
  296.            automatically appear when needed */
  297.  
  298.         Object *dummy, *htmlview;
  299.  
  300.         ...
  301.             Child, dummy = HTMLviewObject,
  302.                 VirtualFrame,
  303.                 MUIA_HTMLview_Contents, "<HTML><Body><H1>Test</H1></Body></HTML>",
  304.                 MUIA_HTMLview_Scrollbars, MUIV_HTMLview_Scrollbars_Auto,
  305.                 End,
  306.         ...
  307.  
  308.         /* The scrollgroup has been created as part of the application tree.
  309.            Now we need a pointer to the *real* HTMLview object */
  310.         get(dummy, MUIA_ScrollGroup_HTMLview, &htmlview);
  311.  
  312.         /* We now have a pointer, so we'll setup some notifies... */
  313.         DoMethod(htmlview, MUIM_Notify, MUIA_HTMLview_Title, MUIV_EveryTime,
  314.             MUIV_Notify_Window, 3,
  315.             MUIM_Set, MUIA_Window_Title, MUIV_TriggerValue);
  316.         ...
  317.  
  318. HTMLview.mcc/MUIA_HTMLview_Target
  319.  
  320.     NAME
  321.         MUIA_HTMLview_Target -- [..G], STRPTR
  322.  
  323.     FUNCTION
  324.         When following an anchor, then the HTMLview-object will set this tag
  325.         to the target-part of the anchor-element.
  326.  
  327.     SEE ALSO
  328.         MUIA_HTMLview_ClickedURL, MUIA_HTMLview_Qualifier
  329.  
  330. HTMLview.mcc/MUIA_HTMLview_Title
  331.  
  332.     NAME
  333.         MUIA_HTMLview_Title -- [..G], STRPTR
  334.  
  335.     FUNCTION
  336.         The title of the page. Reflects the contents of the <Title> tag.
  337.  
  338. HTMLview.mcc/MUIA_HTMLview_URL
  339.  
  340.     NAME
  341.         MUIA_HTMLview_URL -- [..G], STRPTR
  342.  
  343.     FUNCTION
  344.         The URL of the page. This is just a copy of what you gave to
  345.         MUIM_HTMLview_GotoURL.
  346.  
  347. HTMLview.mcc/MUIM_HTMLview_Abort
  348.  
  349.     NAME
  350.         MUIM_HTMLview_Abort
  351.  
  352.     SYNOPSIS
  353.         DoMethod(obj, MUIM_HTMLview_Abort);
  354.  
  355.     FUNCTION
  356.         This will abort parsing of the current page.
  357.  
  358. HTMLview.mcc/MUIM_HTMLview_ContinueAnims
  359.  
  360.     NAME
  361.         MUIM_HTMLview_ContinueAnims
  362.  
  363.     SYNOPSIS
  364.         DoMethod(obj, MUIM_HTMLview_ContinueAnims);
  365.  
  366.     FUNCTION
  367.         This will continue animations which were previously paused with
  368.         MUIM_HTMLview_PauseAnims.
  369.  
  370.     NOTE
  371.         This method is automatically invoked when the window goes active.
  372.  
  373.     SEE ALSO
  374.         MUIM_HTMLview_PauseAnims
  375.  
  376. HTMLview.mcc/MUIM_HTMLview_FlushImage
  377.  
  378.     NAME
  379.         MUIM_HTMLview_FlushImage
  380.  
  381.     SYNOPSIS
  382.         DoMethod(obj, MUIM_HTMLview_FlushImage, STRPTR url);
  383.  
  384.     FUNCTION
  385.         Remove the given URL from the image-cache.
  386.         To flush several images, then URL can be one of
  387.  
  388.          MUIV_HTMLview_FlushImage_All         
  389.          MUIV_HTMLview_FlushImage_Displayed   
  390.          MUIV_HTMLview_FlushImage_Nondisplayed
  391.  
  392. HTMLview.mcc/MUIM_HTMLview_GetContextInfo
  393.  
  394.     NAME
  395.         MUIM_HTMLview_GetContextInfo
  396.  
  397.     SYNOPSIS
  398.         DoMethod(obj, MUIM_HTMLview_GetContextInfo, LONG X, LONG Y);
  399.  
  400.     FUNCTION
  401.         Returns info about the context of the (x, y) coordinate.
  402.         The coordinates are relative to the upper left corner of the window.
  403.  
  404.     RESULT
  405.         A pointer to a MUIR_HTMLview_GetContextInfo structure or NULL of there
  406.         is no context.
  407.         The structure currently holds these fields:
  408.  
  409.          URL    - Complete URL of the link found at the given position or NULL
  410.                   if no link was found.
  411.          Target - Target value of the potential link, at the given position.
  412.          Img    - Complete URL of the image found at the given position or NULL
  413.                   if no image was found.
  414.          Frame  - The URL of the frame, which the given position belongs to or
  415.                   NULL if no frame exist for the given coordinate.
  416.          Background - URL of the background image, if any.
  417.  
  418.         The structure will grow, please have a look in HTMLview_mcc.h for more
  419.         fields...
  420.  
  421. HTMLview.mcc/MUIM_HTMLview_GotoURL
  422.  
  423.     NAME
  424.         MUIM_HTMLview_GotoURL
  425.  
  426.     SYNOPSIS
  427.         DoMethod(obj, MUIM_HTMLview_GotoURL, STRPTR url, STRPTR target);
  428.  
  429.     FUNCTION
  430.         Go to the specified URL, and use a named frame as target.
  431.         Give NULL as target address for the current frame.
  432.  
  433.         In contrary to MUIA_HTMLview_Contents, then this method will instantly
  434.         return, because it starts a new task that will load and parse the
  435.         page.
  436.  
  437.     RESULT
  438.         A unique ID that has been asigned to the page. This ID will be given
  439.         to the loadhook.
  440.  
  441.     NOTES
  442.         This method is likely to be replaced with a more flexible varargs
  443.         version...
  444.  
  445.     SEE ALSO
  446.         MUIA_HTMLview_Contents, MUIA_HTMLview_LoadHook
  447.  
  448. HTMLview.mcc/MUIM_HTMLview_Parsed
  449.  
  450.     NAME
  451.         MUIM_HTMLview_Parsed
  452.  
  453.     SYNOPSIS
  454.         DoMethod(obj, MUIM_HTMLview_Parsed, ULONG parsed);
  455.  
  456.     FUNCTION
  457.         When a separate task is parsing a page, then this method will be
  458.         called approximately 5 times pr. second, with the number of parsed
  459.         bytes as first argument.
  460.  
  461.         This is useful if you want to have a gauge object reflect the amount
  462.         of parsed data and perhaps also a KB/s count.
  463.  
  464. HTMLview.mcc/MUIM_HTMLview_PauseAnims
  465.  
  466.     NAME
  467.         MUIM_HTMLview_PauseAnims
  468.  
  469.     SYNOPSIS
  470.         DoMethod(obj, MUIM_HTMLview_PauseAnims);
  471.  
  472.     FUNCTION
  473.         This will pause all animations.
  474.  
  475.     NOTE
  476.         This method is automatically invoked when the window goes inactive.
  477.  
  478.     SEE ALSO
  479.         MUIM_HTMLview_ContinueAnims
  480.  
  481. HTMLview.mcc/MUIM_HTMLview_Reload
  482.  
  483.     NAME
  484.         MUIM_HTMLview_Reload
  485.  
  486.     SYNOPSIS
  487.         DoMethod(obj, MUIM_HTMLview_Reload);
  488.  
  489.     FUNCTION
  490.         Reload the current page.
  491.  
  492. HTMLview.mcc/MUIM_HTMLview_Search
  493.  
  494.     NAME
  495.         MUIM_HTMLview_Search
  496.  
  497.     SYNOPSIS
  498.         DoMethod(obj, MUIM_HTMLview_Search, STRPTR string, ULONG flags);
  499.  
  500.     FUNCTION
  501.         Search for the given string.
  502.  
  503.         Flags can be:
  504.  
  505.         o MUIF_HTMLview_Search_CaseSensitive:
  506.           The string must be an exact match.
  507.  
  508.         o MUIF_HTMLview_Search_DOSPattern:   (not yet implemented)
  509.           The string is to be treated as a DOSPattern.
  510.           The class will call ParsePattern(NoCase).
  511.  
  512.         o MUIF_HTMLview_Search_Backwards:    (not yet implemented)
  513.           Search from the bottom and up.
  514.  
  515.         o MUIF_HTMLview_Search_FromTop:
  516.           The search normally starts at the top of the page, if you set this
  517.           flag, then it will start at the top of the document instead.
  518.           This flag does not make sense together with
  519.           MUIF_HTMLview_Search_Backwards nor MUIF_HTMLview_Search_Next.
  520.  
  521.         o MUIF_HTMLview_Search_Next:
  522.           The search will start at the last found string.
  523.  
  524.     NOTES
  525.         The search string mustn't exceed 120 characters.
  526.  
  527. HTMLview.mcc/MUIM_HTMLview_VLink
  528.  
  529.     NAME
  530.         MUIM_HTMLview_VLink
  531.  
  532.     SYNOPSIS
  533.         DoMethod(obj, MUIM_HTMLview_VLink, STRPTR url);
  534.  
  535.     FUNCTION
  536.         Each anchor element will call this method to know wether the link they
  537.         hold has been visited before. This affects the rendering of whatever
  538.         elements the anchor contain.
  539.  
  540.     RESULT
  541.         BOOL - Superclass returns FALSE.
  542.  
  543.