docs/display.html

<HTML>
<HEAD>
   <TITLE>HTMLRenderingLib - HTML Display Routines</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H3>&nbsp;</H3>
 
<H3>HTMLRenderingLib - Routines for selecting HTML files for
display</H3>
 
<H4><A NAME=HRGoToURL></A></H4>
 
<P>&nbsp;</P>
 
<H4><FONT COLOR="#FF0000">HRGoToURL</FONT></H4>
 
<BLOCKQUOTE><PRE>OSStatus HRGoToURL(
        <A HREF="types.html#HRReference">HRReference</A> hrRef,
        const char * url,
        Boolean addToHistory,
        Boolean forceRefresh);</PRE>
   
   <P><B>hrRef</B> - a reference to a HTML rendering object
   previously obtained by calling <A HREF="generalroutines.html#HRNewReference">HRNewReference</A>.</P>
   
   <P><B>url</B> - a pointer to a C - style string containing the url
   to display. This URL should begin with the resource type specifier
   "file:".</P>
   
   <P><B>addToHistory</B> - a boolean value.</P>
   
   <P><B>forceRefresh</B> - a boolean value.</P>
   
   <P>function result - an error code or noErr if successful.</P></BLOCKQUOTE>
 
<P>HRGoToURL can be used to ask the HTML object to display the file
specified by the URL. addToHistory will be passed through to your
<A HREF="userdefined.html#MyHRNewURLProc">MyHRNewURLProc</A> if you
have defined one. If forceRefresh is true, then the view rectangle
will be redrawn.</P>
 
<P><A HREF="index.html">return to index</A></P>
 
<H4><A NAME=HRGoToAnchor></A></H4>
 
<P>&nbsp;</P>
 
<H4><FONT COLOR="#FF0000">HRGoToAnchor</FONT></H4>
 
<BLOCKQUOTE><PRE>OSStatus HRGoToAnchor(
        <A HREF="types.html#HRReference">HRReference</A> hrRef,
        const char * anchorName);
   </PRE>
   
   <P><B>hrRef</B> - a reference to a HTML rendering object
   previously obtained by calling <A HREF="generalroutines.html#HRNewReference">HRNewReference</A>.</P>
   
   <P><B>anchorName</B> - A pointer to a C - style string containing
   the name of the anchor to scroll into the display.</P>
   
   <P>function result - an error code or noErr if successful.</P></BLOCKQUOTE>
 
<P>Call HRGoToAnchor to scroll display so that a particular anchor
inside of the HTML image is visible.</P>
 
<P><A HREF="index.html">return to index</A></P>
 
<P><A NAME=HRGoToPtr></A></P>
 
<P>&nbsp;</P>
 
<H4><FONT COLOR="#FF0000">HRGoToPtr</FONT></H4>
 
<BLOCKQUOTE><PRE>OSStatus HRGoToPtr(
        <A HREF="types.html#HRReference">HRReference</A> hrRef,
        char * buffer,
        UInt32 bufferSize,
        Boolean addToHistory,
        Boolean forceRefresh);</PRE>
   
   <P><B>hrRef</B> - a reference to a HTML rendering object
   previously obtained by calling <A HREF="generalroutines.html#HRNewReference">HRNewReference</A>.</P>
   
   <P><B>buffer</B> - a pointer to a block of memory containing the
   HTML to display.</P>
   
   <P><B>bufferSize</B> - the number of bytes in the block pointed to
   by buffer.</P>
   
   <P><B>addToHistory</B> - a boolean value.</P>
   
   <P><B>forceRefresh</B> - a boolean value.</P>
   
   <P>function result - an error code or noErr if successful.</P></BLOCKQUOTE>
 
<P>HRGoToPtr allows you render HTML from memory. addToHistory will be
passed through to your <A HREF="userdefined.html#MyHRNewURLProc">MyHRNewURLProc</A>
if you have defined one. If forceRefresh is true, then the view
rectangle will be redrawn.</P>
 
<P><A HREF="index.html">return to index</A></P>
 
<P><A NAME=HRGetRootURL></A></P>
 
<P>&nbsp;</P>
 
<H4><FONT COLOR="#FF0000">HRGetRootURL</FONT></H4>
 
<BLOCKQUOTE><PRE>OSStatus HRGetRootURL(
        <A HREF="types.html#HRReference">HRReference</A> hrRef,
        Handle rootURLH);</PRE>
   
   <P><B>hrRef</B> - a reference to a HTML rendering object
   previously obtained by calling <A HREF="generalroutines.html#HRNewReference">HRNewReference</A>.</P>
   
   <P><B>rootURLH</B> - a handle. This handle must be allocated by
   the caller before this routine is called.</P>
   
   <P>function result - an error code or noErr if successful.</P></BLOCKQUOTE>
 
<P>HRGetRootURL returns a C - style string inside of a memory block
refered to by a Handle that contains the root URL used for all
relative links given image is currently in the display. </P>
 
<P><A HREF="index.html">return to index</A></P>
 
<P><A NAME=HRGetBaseURL></A></P>
 
<P>&nbsp;</P>
 
<H4><FONT COLOR="#FF0000">HRGetBaseURL</FONT></H4>
 
<BLOCKQUOTE><PRE>OSStatus HRGetBaseURL(
        <A HREF="types.html#HRReference">HRReference</A> hrRef,
        Handle baseURLH);</PRE>
   
   <P><B>hrRef</B> - a reference to a HTML rendering object
   previously obtained by calling <A HREF="generalroutines.html#HRNewReference">HRNewReference</A>.</P>
   
   <P><B>baseURLH</B> - a handle. This handle must be allocated by
   the caller before this routine is called.</P>
   
   <P>function result - an error code or noErr if successful.</P></BLOCKQUOTE>
 
<P>If the HTML file showing in the display contains a &lt;BASE&gt;
tag, then HRGetBaseURL will return a C - style string inside of a
memory block refered to by a Handle containing it's value. If the
file does not contain a &lt;BASE&gt; tag, then the Handle is set to
an empty string.</P>
 
<P><A HREF="index.html">return to index</A></P>
 
<P><A NAME=HRGetHTMLURL></A></P>
 
<P>&nbsp;</P>
 
<H4><FONT COLOR="#FF0000">HRGetHTMLURL</FONT></H4>
 
<BLOCKQUOTE><PRE>OSStatus HRGetHTMLURL(
        <A HREF="types.html#HRReference">HRReference</A> hrRef,
        Handle HTMLURLH);</PRE>
   
   <P><B>hrRef</B> - a reference to a HTML rendering object
   previously obtained by calling <A HREF="generalroutines.html#HRNewReference">HRNewReference</A>.</P>
   
   <P><B>HTMLURLH</B> - a handle. This handle must be allocated by
   the caller before this routine is called.</P>
   
   <P>function result - an error code or noErr if successful.</P></BLOCKQUOTE>
 
<P>HRGetHTMLURL returns the URL for the page currently visible in the
display. The URL will be returned in a C - style string inside of the
memory block refered to by Handle provided in the HTMLURLH
parameter.</P>
 
<P><A HREF="index.html">return to index</A></P>
 
<P><A NAME=HRGetTitle></A></P>
 
<P>&nbsp;</P>
 
<H4><FONT COLOR="#FF0000">HRGetTitle</FONT></H4>
 
<BLOCKQUOTE><PRE>OSStatus HRGetTitle(
        <A HREF="types.html#HRReference">HRReference</A> hrRef,
        StringPtr title);</PRE>
   
   <P><B>hrRef</B> - a reference to a HTML rendering object
   previously obtained by calling <A HREF="generalroutines.html#HRNewReference">HRNewReference</A>.</P>
   
   <P><B>title</B> - a pointer to a variable of type Str255.</P>
   
   <P>function result - an error code or noErr if successful.</P></BLOCKQUOTE>
 
<P>HRGetTitle returns the title of the HTML file visible in the
display. This title is appropriate for setting a window's title.</P>
 
<P><A HREF="index.html">return to index</A></P>
 
<P>&nbsp;</P>
 
<P></P>
</BODY>
</HTML>