3rd:HTML drawer

From wiki.visual-prolog.com

Jump to: navigation, search

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 </i>
  • <b> bold </b>
  • <u> underline </u>
  • <br> new line
  • <sub> subscript</sub>
  • <sup> superscript</sub>
  • <par> also new line
  • <t> tab
  • <big> increase font size </big>
  • <small> decrease font size </small>
  • <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: Link not found August 04, 2013

Personal tools