HTMLRenderingLib - Routines for drawing and affecting HTML display characteristics.

 

HRSetGrafPtr

OSStatus HRSetGrafPtr(
        HRReference hrRef,
        GrafPtr grafPtr);

hrRef - a reference to a HTML rendering object previously obtained by calling HRNewReference.

grafPtr - a pointer to a quickdraw grafport where the HTML should be drawn.

function result - an error code or noErr if successful.

HRSetGrafPtr can be used to set the grafport an HTML rendering object uses for drawing.

return to index

 

HRActivate

OSStatus HRActivate(
        HRReference hrRef);

hrRef - a reference to a HTML rendering object previously obtained by calling HRNewReference.

function result - an error code or noErr if successful.

Call HRActivate when one of a window containing an HTML rendering object receives an activate event.

return to index

 

HRDeactivate

OSStatus HRDeactivate(
        HRReference hrRef);

hrRef - a reference to a HTML rendering object previously obtained by calling HRNewReference.

function result - an error code or noErr if successful.

Call HRDeactivate when one of a window containing an HTML rendering object receives an deactivate event.

return to index

 

HRDraw

OSStatus HRDraw(
        HRReference hrRef,
        RgnHandle updateRgnH);

hrRef - a reference to a HTML rendering object previously obtained by calling HRNewReference.

updateRgnH - if not NULL, updateRgnH contains a region handle representing the area of the screen that should be redrawn. Normally, for update events, you will provide the window's visRgn in this parameter.

function result - an error code or noErr if successful.

Call HRDraw when one of a window containing an HTML rendering object receives an update event, or when you would like to redraw the HTML being displayed by an HTML rendering object.

return to index

 

HRSetRenderingRect

OSStatus HRSetRenderingRect(
        HRReference hrRef,
        const Rect *renderingRect);

hrRef - a reference to a HTML rendering object previously obtained by calling HRNewReference.

renderingRect - a pointer to a QuickDraw Rect structure defining the rectangle where the HTML should be drawn. This rectangle will include the HTML and the scroll bars when they are visible.

function result - an error code or noErr if successful.

Call HRSetRenderingRect to set the rectangle where the HTML rendering object should draw.

return to index

 

HRGetRenderedImageSize

OSStatus HRGetRenderedImageSize(
        HRReference hrRef,
        Point *renderingSize);

hrRef - a reference to a HTML rendering object previously obtained by calling HRNewReference.

renderingSize - a pointer to a QuickDraw Point structure.

function result - an error code or noErr if successful.

HRGetRenderedImageSize can be used to establish the actual size of the rendered HTML given the viewing rectangle specified in the last call to HRSetRenderingRect.

NOTE: HTMLRenderingLib does its best to fit the HTML into the viewing rectangle, however in some cases its width or height may extend beyond the boundaries of this rectangle.

return to index

 

HRScrollToLocation

OSStatus HRScrollToLocation(
        HRReference hrRef,
        Point *location);

hrRef - a reference to a HTML rendering object previously obtained by calling HRNewReference.

location - a pointer to a QuickDraw Point structure describing the horizontal and vertical coordinates (inside of the rendered HTML image) that should be moved to the top left corner of the view rectangle.

function result - an error code or noErr if successful.

Cal HRScrollToLocation to set the viewing origin to a particular location inside of the rendered HTML document.

return to index

 

HRForceQuickdraw

OSStatus HRForceQuickdraw(
        HRReference hrRef,
        Boolean forceQuickdraw);

hrRef - a reference to a HTML rendering object previously obtained by calling HRNewReference.

forceQuickdraw - a boolean value.

function result - an error code or noErr if successful.

Call HRForceQuickdraw to turn on and off QuickDraw drawing. It is appropriate to turn on QuickDraw drawing when asking the HTMLRenderingLib to draw to some devices such as, for example, printers.

return to index

 

HRSetScrollbarState

OSStatus HRSetScrollbarState(
        HRReference hrRef,
        HRScrollbarState hScrollbarState,
        HRScrollbarState vScrollbarState);

hrRef - a reference to a HTML rendering object previously obtained by calling HRNewReference.

hScrollbarState - a value of type HRScrollbarState specifying the state for the horizontal scroll bar. This can be either eHRScrollbarOn, eHRScrollbarOff, or eHRScrollbarAuto.

vScrollbarState - a value of type HRScrollbarState specifying the state for the vertical scroll bar. This can be either eHRScrollbarOn, eHRScrollbarOff, or eHRScrollbarAuto.

function result - an error code or noErr if successful.

HRSetScrollbarState can be called to explicity turn on or of the scroll bars in the rendering area. By default, the scroll bars are set to automatically show/hide themselves as appropriate depending on the size of the HTML image being displayed.

return to index

 

HRSetDrawBorder

OSStatus HRSetDrawBorder(
        HRReference hrRef,
        Boolean drawBorder);

hrRef - a reference to a HTML rendering object previously obtained by calling HRNewReference.

drawBorder -a boolean value.

function result - an error code or noErr if successful.

Call HRSetDrawBorder to ask the HTMLRenderingLib to draw a standard border around the outside of the area specified in the to HRSetRenderingRect call.

return to index

 

HRSetGrowboxCutout

OSStatus HRSetGrowboxCutout(
        HRReference hrRef,
        Boolean allowCutout);

hrRef - a reference to a HTML rendering object previously obtained by calling HRNewReference.

allowCutout - a boolean value.

function result - an error code or noErr if successful.

Call HRSetGrowboxCutout to notify the HTML rendering object that the HTML is being rendered inside of a window that has a grow box in the bottom right hand corner. If allowCutout is true, then the HTMLRenderingLib will not draw in the bottom right 16 by 16 pixel area of the viewing rectangle.

return to index