Difference between revisions of "3rd:HTML drawer"

From wiki.visual-prolog.com

(Description of drawHTML)
(No difference)

Revision as of 11:43, 30 November 2010

drawHTML.DLL is a DLL is written in VIP7.3. The DLL can be linked with VIP projects - the "glue" code and examples are provided. It is used simply to draw nice text: you can control text colour and font styles using HTML tags. Text wrapping and centring are dynamic, and both can apply to different parts of the same HTML text. The main call is (you will recognise):

DrawHTML:drawTextInRect(WindowType,RCT,HTML,FLAGS)

Also, certain attributes can be called from your own code e.g.

DrawHTML:set_wrap(true),

A limited number of tags are understood. Some of these are standard HTML, and some are unique to the DLL.

Standard HTML tags

  • <i> italic
  • <b> bold
  • <u> underline
  • <br> new line
  • <sub> subscript
  • <sup> superscript
  • <par> also new line
  • <t> tab
  • <big> increase font size
  • <small> decrease font size
  • <a ref=\"some text\">hyperlink</a>. Anchor: if the user clicks on this word, the callback will return "some text".
  • <img src=\"file.bmp\"> draws an image.

Non-standard Tags

  • <c> centred text on </c> ... and off
  • <wr> turn wrapping on </wr> ... and off
  • <lm=\"20\"> left margin = 20 pixels
  • <font=\"arial\"> change font
  • <color=\"#FF00FF\"> set text colour </color>
  • <hi>text within these tags are hidden when hide=active, and displayed as normal when hide=inactive</hi>

Downloads

Further information and downloads can be found here: http://www.acsumama.com/vipDeveloper/drawHTML.htm