VXPLib Documentation: COM
IVXPQuickHTML
IVXPQuickHTML is the core interface of the whole VXPLib library further on referred to as QHTML parser, or just parser. The parser implements all logic of interpreting QHTML documents and displaying them on a Device Context (DC) that supports API drawing functions. Because all methods implemented by the parser are generic UI functions they can be used on any development platform that supports COM.
MethodsDescription
SetSourceTextSets new QHTML contents in the object that complies with the syntax described in the QHTML specification document.
DrawDraws the current QHTML document on a display context (DC) at a specified point.
AddFilePathAdds a search path to the list of accessible directories.
RecalculateLayout Runs the QHTML parser to process contents of the current QHTML document.
SetDefaultRes Sets the default resource file to be used by the parser when there is no alternative resource file specified.
DrawStretched Similar to method Draw, only this function also allows to stretch or squeeze the drawing output automatically.
DrawBackground Draws the background contents of the current QHTML document as specified by tag <BODY>
AboutBox Brings up a dialog box with information about the VXPLib component and currently available license
GetSpeechText Returns a text string to be processed by a TTS engine.
DrawState Draws the current QHTML document on a device context using one or more visual effects.
GradientFillRect Not bound to QHTML documents this auxiliary function is to fill rectangle areas using gradient effect. It returns True, if succeeds.
GetBodyAttr Returns value of an attribute set in tag <BODY>.
GetControlAttr Returns value of an attribute set in tag <CONTROL> with specified ID.
GetControlAttrIdx Returns value of an attribute of tag <CONTROL> with specified index.
GetControlPos Returns position of a control with specified ID relative to coordinate {0, 0}.
TextToHTML Converts a simple text string into HTML-compatible format.
GetLicenses Returns the number of valid licenses available to the current client application.
GetControlsInfo Requests the parser to get some statistics on tags <CONTROL> in the current document.

PropertiesDescription
Height Resulting height in pixels of the drawing output when using method Draw.
Width Resulting width in pixels of the drawing output when using method Draw.
Transparent Setting to True makes function Draw perform drawing directly on the screen. Otherwise, the drawing is redirected into a bitmap, which is copied on the screen afterwards for speed optimization. The default value is False.
HasBackgroundPicture Contains True, if the current QHTML document has attribute BACKGROUND specified in tag <BODY>, and the picture was loaded correctly. To be used by client applications and components for speed optimization. The default value is False.
settings All QHTML settings.
BodyCodePage Code Page for automatic conversion when function SetSourceText is called.
TxtCodePage Default Code Page to be used in tag <TXT>.

All events described in the following table are available through interface _IVXPQuickHTMLEvents. The present VXPLib Documentation doesn't consider event interfaces separately from the main interface, and, therefore methods of such event interface represented here for simplicity as events of the IVXPQuickHTML interface.
EventsDescription
OnSetDefaults The parser fires this event to inform all client applications and components that it is time to set all default properties that will be used by the current QHTML contents.
OnSourceChanged Broadcasts to every interested client of the parser that function SetSourceText just has been called so that it subsequently changed the current QHTML contents.
OnRecalculate Whenever function RecalculateLayout is called it causes the parser to fire event OnRecalculate twice: first when the recalculation engine has started (Begin=True), and then when it has finished (Begin=False).
OnGetText The parser fires this event whenever it meets tag with attribute ID specified in order to retrieve the text dynamically from the client application/component.
OnDocumentGetSize Called when tag is met to retrieve the size of the document. If the tag includes attributes WIDTH and HEIGHT, then this event does not need to be handled.
OnDocumentDraw Called for a virtual document initiated by tag to be drawn within the rectangle area specified by coordinates {X, Y, Width, Height}.
OnControlGetSize For each tag <CONTROL> the parser fires this event passing specified attributes. Its purpose is to specify attributes WIDTH and HEIGHT of the control, if such were skipped in the tag, or override their values passed in the tag.

This document was last updated on 27/05/2003
Copyright © 2003 Tooltips.NET