Unit rHTMLDrawText

Uses
Classes, Interfaces, Objects and Records
Constants
Variables

Description

rHTMLDrawText contain simple HTML parser and draw HTML content directly to Canvas. Used for rHTMLHint and rHTMLListView but can be used for any component, eses same tags as rHTMLLabel - see rHTMLLabel for details.

Version compatible with Delphi2010+.

Overview

Functions and Procedures

function rHTML_DrawTextSimple(C: TWinControl; Canvas: TCanvas; HTMLText: string; var Rect: TRect; CalculateSize: boolean = false; Enabled: boolean = true; WordWrap: boolean = false; ShowBeveled: boolean = false; Alignment: TAlignment = taLeftJustify; Layout: TTextLayout = tlTop): integer;
function rHTML_DrawText(C: TWinControl; Canvas: TCanvas; HTMLText: string; var Rect: TRect; CalculateSize, Enabled, WordWrap, ShowBeveled: boolean; Alignment: TAlignment = taLeftJustify; Layout: TTextLayout = tlTop; InnerSpace: integer = 1; TabGridWidth: integer = 30; rHTMLMode: TrHTMLMode = hmHTML; AnchorColor: TColor = clNone; AnchorInfoList: TList = nil; HotAnchorIndex: integer = -1): integer;
function rHTML_MouseOverAnchor(C: TWinControl; Left, Top, X, Y: integer; AnchorInfoList: TList; Cursor: TCursor): integer;
function rHTML_RunGetAnchorAction(AnchorInfoList: TList; HotAnchorIndex: integer): string;
procedure rHTML_FreeAnchorInfo(AnchorInfoList: TList);

Types

TrHTMLMode = (...);

Description

Functions and Procedures

function rHTML_DrawTextSimple(C: TWinControl; Canvas: TCanvas; HTMLText: string; var Rect: TRect; CalculateSize: boolean = false; Enabled: boolean = true; WordWrap: boolean = false; ShowBeveled: boolean = false; Alignment: TAlignment = taLeftJustify; Layout: TTextLayout = tlTop): integer;

draw HTML text to Canvas with default parameters

function rHTML_DrawText(C: TWinControl; Canvas: TCanvas; HTMLText: string; var Rect: TRect; CalculateSize, Enabled, WordWrap, ShowBeveled: boolean; Alignment: TAlignment = taLeftJustify; Layout: TTextLayout = tlTop; InnerSpace: integer = 1; TabGridWidth: integer = 30; rHTMLMode: TrHTMLMode = hmHTML; AnchorColor: TColor = clNone; AnchorInfoList: TList = nil; HotAnchorIndex: integer = -1): integer;

draw HTML text to Canvas according parameters

function rHTML_MouseOverAnchor(C: TWinControl; Left, Top, X, Y: integer; AnchorInfoList: TList; Cursor: TCursor): integer;

check mouse position over HTML link and return link index, application must store and provide AnchorInfoList defined by rHTML_DrawText

function rHTML_RunGetAnchorAction(AnchorInfoList: TList; HotAnchorIndex: integer): string;

run link action, application must store and provide AnchorInfoList defined by rHTML_DrawText

procedure rHTML_FreeAnchorInfo(AnchorInfoList: TList);

free all items from AnchorInfoList, application must call on destroy if defined and used in rHTML_DrawText

Types

TrHTMLMode = (...);

list of HTML drawing types

Values
  • hmHTML
  • hmHTMLSkipEnter
  • hmHTMLSkipLink
  • hmHTMLSkipEnterAndLink
  • hmPlainText

Author

Created

Dec 2015

Last Modified

Dec 2015


Generated by PasDoc 0.15.0.