home *** CD-ROM | disk | FTP | other *** search
- TABLE OF CONTENTS
-
- HTMLview.mcc/HTMLview.mcc
- HTMLview.mcc/MUIA_HTMLview_ClickedURL
- HTMLview.mcc/MUIA_HTMLview_Contents
- HTMLview.mcc/MUIA_HTMLview_CurrentURL
- HTMLview.mcc/MUIA_HTMLview_DiscreteInput
- HTMLview.mcc/MUIA_HTMLview_ImageLoadHook
- HTMLview.mcc/MUIA_HTMLview_ImagesInDecodeQueue
- HTMLview.mcc/MUIA_HTMLview_LoadHook
- HTMLview.mcc/MUIA_HTMLview_PageID
- HTMLview.mcc/MUIA_HTMLview_Prop_HDeltaFactor
- HTMLview.mcc/MUIA_HTMLview_Prop_VDeltaFactor
- HTMLview.mcc/MUIA_HTMLview_Qualifier
- HTMLview.mcc/MUIA_HTMLview_Scrollbars
- HTMLview.mcc/MUIA_HTMLview_Target
- HTMLview.mcc/MUIA_HTMLview_Title
- HTMLview.mcc/MUIA_HTMLview_URL
- HTMLview.mcc/MUIM_HTMLview_Abort
- HTMLview.mcc/MUIM_HTMLview_ContinueAnims
- HTMLview.mcc/MUIM_HTMLview_FlushImage
- HTMLview.mcc/MUIM_HTMLview_GetContextInfo
- HTMLview.mcc/MUIM_HTMLview_GotoURL
- HTMLview.mcc/MUIM_HTMLview_Parsed
- HTMLview.mcc/MUIM_HTMLview_PauseAnims
- HTMLview.mcc/MUIM_HTMLview_Reload
- HTMLview.mcc/MUIM_HTMLview_Search
- HTMLview.mcc/MUIM_HTMLview_VLink
-
- HTMLview.mcc/HTMLview.mcc
-
- DO NOT SPREAD THIS FILE, EVERYTHING IS SUBJECT TO CHANGE!
-
- HTMLview.mcc is © 1998 by Allan Odgaard <Duff@DIKU.DK>
-
- Please note that if you use this class, then your program may require a bit
- more stack than usual. 16KB should be sufficient.
-
- This autodoc is not uptodate - please also read HTMLview_mcc.h!
-
- ToDo:
-
- MUIM_HTMLview_Print
- MUIM_HTMLview_SearchGUI ?
-
- HTMLview.mcc/MUIA_HTMLview_ClickedURL
-
- NAME
- MUIA_HTMLview_ClickedURL -- [..G], STRPTR
-
- FUNCTION
- When the user follows a link, then this tag will reflect the complete
- URL of the pressed link, even if the HRef argument is only relative.
- If the Anchor-element holds target info, then you can read this via
- the MUIA_HTMLview_Target tag.
-
- Note: The URL is only valid during the notify.
-
- EXAMPLE
- /* Setup a notify that will just load the link that the user press */
-
- DoMethod(htmlview, MUIM_Notify,
- MUIA_HTMLview_ClickedURL, MUIV_Everytime,
- MUIV_Notify_Self, 3,
- MUIM_HTMLview_GotoURL, MUIV_TriggerValue, NULL);
-
- SEE ALSO
- MUIA_HTMLview_Target, MUIA_HTMLview_Qualifier
-
- HTMLview.mcc/MUIA_HTMLview_Contents
-
- NAME
- MUIA_HTMLview_Contents -- [IS.], STRPTR
-
- FUNCTION
- Use this tag to set the contents to whatever you want displayed.
-
- You currently need to embed the stuff that should be displayied in a
- Body-element. This may change, since the Body-tag is infact not
- required according to the HTML 4.0 specifications, but I really
- dislike this...
-
- EXAMPLE
- SetAttrs(htmlview, MUIA_HTMLview_Contents,
- "<HTML><Body><H1>Test example</H1></Body></HTML>",
- TAG_DONE);
-
- NOTE
- When you set the contents using this tag, then the page ID will change.
- You can get the new page ID with MUIA_HTMLview_PageID
-
- SEE ALSO
- MUIA_HTMLview_PageID
-
- HTMLview.mcc/MUIA_HTMLview_CurrentURL
-
- NAME
- MUIA_HTMLview_CurrentURL -- [..G], STRPTR
-
- FUNCTION
- This tag reflects which link is currently below the mousepointer.
- This tag is very similar to MUIA_HTMLview_ClickedURL.
-
- EXAMPLE
- /* Setup a notify that will show the link in a text-object */
-
- DoMethod(htmlview, MUIM_Notify,
- MUIA_HTMLview_CurrentURL, MUIV_Everytime,
- textbox, 3,
- MUIM_Set, MUIA_Text_Contents, MUIV_TriggerValue);
-
- SEE ALSO
- MUIA_HTMLview_ClickedURL, MUIA_HTMLview_Target
-
- HTMLview.mcc/MUIA_HTMLview_DiscreteInput
-
- NAME
- MUIA_HTMLview_DiscreteInput -- [IS.], BOOL
-
- FUNCTION
- Since several built-in MUI gadgets don't use eventhandlers, then this
- class will only react on input, if it's either active, or default with
- no other active objects.
-
- If you set the tag to FALSE, then it will always try to use the events
- that it receive. This is desireable if you for example have an active
- stringgadget and press arrow up/down, since the stringgadget can't use
- these keys, and therfor pass 'em on, however only if you use one of
- the stringgadget replacements, which use an eventhandler for input.
-
- NOTE
- The default value of this tag is currently TRUE, but it may change,
- when MUI's built-in objects start to use eventhandlers. So either set
- the tag to FALSE, or leave it as it is.
-
- HTMLview.mcc/MUIA_HTMLview_ImageLoadHook
-
- NAME
- MUIA_HTMLview_ImageLoadHook -- [I..], struct Hook *
-
- FUNCTION
- Setup a hook used for image-loading.
-
- SEE ALSO
- MUIA_HTMLview_LoadHook
-
- HTMLview.mcc/MUIA_HTMLview_ImagesInDecodeQueue
-
- NAME
- MUIA_HTMLview_ImagesInDecodeQueue -- [..G], ULONG
-
- FUNCTION
- Get the number of pictures which are currently being loaded/decoded.
-
- HTMLview.mcc/MUIA_HTMLview_LoadHook
-
- NAME
- MUIA_HTMLview_LoadHook -- [I..], struct Hook *
-
- FUNCTION
- Setup a hook used for (page)-loading.
-
- The hook is called with a pointer to itself in a0, a pointer to a
- struct HTMLview_LoadMsg in a1 and a pointer to the calling object in
- a2.
-
- This hook will be called from a separate task, so the only MUI method
- that you can use is MUIM_Application_PushMethod.
- The hook may very well be called by sevaral tasks at the same time, so
- your code needs to be re-entrant and thread-safe.
-
- The first field of the HTMLview_LoadMsg is lm_Type and can be either:
-
- HTMLview_Open
- You should open the file and return non-null for succes.
- The URL to open can be found as lmsg->lm_Open.URL.
- Please have a look in HTMLview_mcc.h for flag definitions.
- You can store a filehandle or similar in the lm_Userdata field.
-
- HTMLview_Read
- Read upto lmsg->lm_Read.Size bytes and store them in
- lmsg->lm_Read.Buffer.
- Return the actual number of bytes read. 0 for EOF.
-
- HTMLview_Write
- This is used when the user submit POST-forms. You can read the
- encoding type and length as EncodingType & PostLength.
-
- HTMLview_Close
- Close the file.
-
- There is also a lm_PageID field, this is a unique identifier for the
- page requested. This ID is the same as returned by
- MUIM_HTMLview_GotoURL.
- Please have in mind, when using frames, that two different frames may
- use the same ID, but you can distingish by looking at the calling
- object, which will be two different instances of HTMLview.mcc.
-
- NOTES
- The object which originally requested something loaded, may not be
- valid, by the time you've actually loaded it (frames). So you should
- actually never use the obj pointer.
- Your LoadMsg contain a lm_App, which will always be valid.
-
- HTMLview.mcc/MUIA_HTMLview_PageID
-
- NAME
- MUIA_HTMLview_PageID -- [..G], ULONG
-
- FUNCTION
- Get the page ID of the currently displayed page.
- This is the same as returned by MUIM_HTMLview_GotoURL.
-
- SEE ALSO
- MUIA_HTMLview_Contents
-
- HTMLview.mcc/MUIA_HTMLview_Prop_HDeltaFactor
-
- NAME
- MUIA_HTMLview_Prop_HDeltaFactor -- [..G], ULONG
-
- FUNCTION
- This tag will give a reasonable delta factor for a horizontal
- scrollbar.
-
- SEE ALSO
- MUIA_Virtgroup_Width, MUIA_Virtgroup_Left, MUIA_Width
-
- HTMLview.mcc/MUIA_HTMLview_Prop_VDeltaFactor
-
- NAME
- MUIA_HTMLview_Prop_VDeltaFactor -- [..G], ULONG
-
- FUNCTION
- This tag will give a reasonable delta factor for a vertical scrollbar.
-
- SEE ALSO
- MUIA_Virtgroup_Height, MUIA_Virtgroup_Top, MUIA_Height
-
- HTMLview.mcc/MUIA_HTMLview_Qualifier
-
- NAME
- MUIA_HTMLview_Qualifier -- [..G], ULONG
-
- FUNCTION
- The qualifier(s) which the user pressed, when she clicked on a link,
- is registered and can be obtained with this tag.
-
- SEE ALSO
- MUIA_HTMLview_ClickedURL
-
- HTMLview.mcc/MUIA_HTMLview_Scrollbars
-
- NAME
- MUIA_HTMLview_Scrollbars -- [I..], ULONG
-
- SPECIAL INPUTS
- MUIV_HTMLview_Scrollbars_Auto
- MUIV_HTMLview_Scrollbars_HorizAuto
- MUIV_HTMLview_Scrollbars_No
- MUIV_HTMLview_Scrollbars_Yes
-
- FUNCTION
- If you supply this tag, then you will get back a scrollgroup object,
- which contain the htmlview object as child.
- You can't really use this scrollgroup object (other than having it as
- part of your application) so you'll need to obtain the pointer to the
- htmlview object. This can be done via MUIA_ScrollGroup_HTMLview.
- E.g.:
- get(scrollgroup, MUIA_ScrollGroup_HTMLview, &htmlview);
-
- If you don't want scrollbars, then you shouldn't use this tag.
- If you always want scrollbars, then you should instead encapsulate the
- htmlview object in a real scrollgroup, or setup your own
- notifications.
-
- NOTE
- If you use this tag with a subclass, then your OM_NEW needs a little
- bit of modification, here's how:
-
- case OM_NEW:
- {
- if(result = DoSuperMethodA(cl, obj, msg))
- {
- get(result, MUIA_ScrollGroup_HTMLview, &obj);
- struct mydata *data = INST_DATA(cl, obj);
- ...
- }
- return(result);
- }
- break;
-
-
- EXAMPLE
- /* Create an instance with scrollbars, which will
- automatically appear when needed */
-
- Object *dummy, *htmlview;
-
- ...
- Child, dummy = HTMLviewObject,
- VirtualFrame,
- MUIA_HTMLview_Contents, "<HTML><Body><H1>Test</H1></Body></HTML>",
- MUIA_HTMLview_Scrollbars, MUIV_HTMLview_Scrollbars_Auto,
- End,
- ...
-
- /* The scrollgroup has been created as part of the application tree.
- Now we need a pointer to the *real* HTMLview object */
- get(dummy, MUIA_ScrollGroup_HTMLview, &htmlview);
-
- /* We now have a pointer, so we'll setup some notifies... */
- DoMethod(htmlview, MUIM_Notify, MUIA_HTMLview_Title, MUIV_EveryTime,
- MUIV_Notify_Window, 3,
- MUIM_Set, MUIA_Window_Title, MUIV_TriggerValue);
- ...
-
- HTMLview.mcc/MUIA_HTMLview_Target
-
- NAME
- MUIA_HTMLview_Target -- [..G], STRPTR
-
- FUNCTION
- When following an anchor, then the HTMLview-object will set this tag
- to the target-part of the anchor-element.
-
- SEE ALSO
- MUIA_HTMLview_ClickedURL, MUIA_HTMLview_Qualifier
-
- HTMLview.mcc/MUIA_HTMLview_Title
-
- NAME
- MUIA_HTMLview_Title -- [..G], STRPTR
-
- FUNCTION
- The title of the page. Reflects the contents of the <Title> tag.
-
- HTMLview.mcc/MUIA_HTMLview_URL
-
- NAME
- MUIA_HTMLview_URL -- [..G], STRPTR
-
- FUNCTION
- The URL of the page. This is just a copy of what you gave to
- MUIM_HTMLview_GotoURL.
-
- HTMLview.mcc/MUIM_HTMLview_Abort
-
- NAME
- MUIM_HTMLview_Abort
-
- SYNOPSIS
- DoMethod(obj, MUIM_HTMLview_Abort);
-
- FUNCTION
- This will abort parsing of the current page.
-
- HTMLview.mcc/MUIM_HTMLview_ContinueAnims
-
- NAME
- MUIM_HTMLview_ContinueAnims
-
- SYNOPSIS
- DoMethod(obj, MUIM_HTMLview_ContinueAnims);
-
- FUNCTION
- This will continue animations which were previously paused with
- MUIM_HTMLview_PauseAnims.
-
- NOTE
- This method is automatically invoked when the window goes active.
-
- SEE ALSO
- MUIM_HTMLview_PauseAnims
-
- HTMLview.mcc/MUIM_HTMLview_FlushImage
-
- NAME
- MUIM_HTMLview_FlushImage
-
- SYNOPSIS
- DoMethod(obj, MUIM_HTMLview_FlushImage, STRPTR url);
-
- FUNCTION
- Remove the given URL from the image-cache.
- To flush several images, then URL can be one of
-
- MUIV_HTMLview_FlushImage_All
- MUIV_HTMLview_FlushImage_Displayed
- MUIV_HTMLview_FlushImage_Nondisplayed
-
- HTMLview.mcc/MUIM_HTMLview_GetContextInfo
-
- NAME
- MUIM_HTMLview_GetContextInfo
-
- SYNOPSIS
- DoMethod(obj, MUIM_HTMLview_GetContextInfo, LONG X, LONG Y);
-
- FUNCTION
- Returns info about the context of the (x, y) coordinate.
- The coordinates are relative to the upper left corner of the window.
-
- RESULT
- A pointer to a MUIR_HTMLview_GetContextInfo structure or NULL of there
- is no context.
- The structure currently holds these fields:
-
- URL - Complete URL of the link found at the given position or NULL
- if no link was found.
- Target - Target value of the potential link, at the given position.
- Img - Complete URL of the image found at the given position or NULL
- if no image was found.
- Frame - The URL of the frame, which the given position belongs to or
- NULL if no frame exist for the given coordinate.
- Background - URL of the background image, if any.
-
- The structure will grow, please have a look in HTMLview_mcc.h for more
- fields...
-
- HTMLview.mcc/MUIM_HTMLview_GotoURL
-
- NAME
- MUIM_HTMLview_GotoURL
-
- SYNOPSIS
- DoMethod(obj, MUIM_HTMLview_GotoURL, STRPTR url, STRPTR target);
-
- FUNCTION
- Go to the specified URL, and use a named frame as target.
- Give NULL as target address for the current frame.
-
- In contrary to MUIA_HTMLview_Contents, then this method will instantly
- return, because it starts a new task that will load and parse the
- page.
-
- RESULT
- A unique ID that has been asigned to the page. This ID will be given
- to the loadhook.
-
- NOTES
- This method is likely to be replaced with a more flexible varargs
- version...
-
- SEE ALSO
- MUIA_HTMLview_Contents, MUIA_HTMLview_LoadHook
-
- HTMLview.mcc/MUIM_HTMLview_Parsed
-
- NAME
- MUIM_HTMLview_Parsed
-
- SYNOPSIS
- DoMethod(obj, MUIM_HTMLview_Parsed, ULONG parsed);
-
- FUNCTION
- When a separate task is parsing a page, then this method will be
- called approximately 5 times pr. second, with the number of parsed
- bytes as first argument.
-
- This is useful if you want to have a gauge object reflect the amount
- of parsed data and perhaps also a KB/s count.
-
- HTMLview.mcc/MUIM_HTMLview_PauseAnims
-
- NAME
- MUIM_HTMLview_PauseAnims
-
- SYNOPSIS
- DoMethod(obj, MUIM_HTMLview_PauseAnims);
-
- FUNCTION
- This will pause all animations.
-
- NOTE
- This method is automatically invoked when the window goes inactive.
-
- SEE ALSO
- MUIM_HTMLview_ContinueAnims
-
- HTMLview.mcc/MUIM_HTMLview_Reload
-
- NAME
- MUIM_HTMLview_Reload
-
- SYNOPSIS
- DoMethod(obj, MUIM_HTMLview_Reload);
-
- FUNCTION
- Reload the current page.
-
- HTMLview.mcc/MUIM_HTMLview_Search
-
- NAME
- MUIM_HTMLview_Search
-
- SYNOPSIS
- DoMethod(obj, MUIM_HTMLview_Search, STRPTR string, ULONG flags);
-
- FUNCTION
- Search for the given string.
-
- Flags can be:
-
- o MUIF_HTMLview_Search_CaseSensitive:
- The string must be an exact match.
-
- o MUIF_HTMLview_Search_DOSPattern: (not yet implemented)
- The string is to be treated as a DOSPattern.
- The class will call ParsePattern(NoCase).
-
- o MUIF_HTMLview_Search_Backwards: (not yet implemented)
- Search from the bottom and up.
-
- o MUIF_HTMLview_Search_FromTop:
- The search normally starts at the top of the page, if you set this
- flag, then it will start at the top of the document instead.
- This flag does not make sense together with
- MUIF_HTMLview_Search_Backwards nor MUIF_HTMLview_Search_Next.
-
- o MUIF_HTMLview_Search_Next:
- The search will start at the last found string.
-
- NOTES
- The search string mustn't exceed 120 characters.
-
- HTMLview.mcc/MUIM_HTMLview_VLink
-
- NAME
- MUIM_HTMLview_VLink
-
- SYNOPSIS
- DoMethod(obj, MUIM_HTMLview_VLink, STRPTR url);
-
- FUNCTION
- Each anchor element will call this method to know wether the link they
- hold has been visited before. This affects the rendering of whatever
- elements the anchor contain.
-
- RESULT
- BOOL - Superclass returns FALSE.
-
-