HTML Component Library v4.0
HTML Component Library v4.0
HTML Component Library is a cross-patform and 100% native HTML rendering library for Delphi and Lazarus that brings all the power of HTML/CSS into desktop and mobile Delphi applications.
Unlike other «HTML-like» libraries it is based on powerful HTML/CSS rendering core with full support of HTML 4.1 and CSS 3 (some of HTML 5 tags are also supported). Tables, shadows, transitions, animations, SVG images, tranforms and much more.
No DLL’s, no ActiveX, no third party libraries dependencies, only pure native Delphi code.
Compatibility
Library supports all Delphi versions from ancient Delphi 5 to Delphi 10.3.2 Rio. For Delphi XE4 - Delphi 10.3.2 Rio all FMX platforms are supported - Win32/64, OSX, Android, iOS and Linux.
Linux GUI is supported with FMXLinux library and in Lazarus
Unicode (including Right-to-Left) is supported even for non-unicode Delphi 5 - 2007 using widestrings and TNT Unicode library.
Updates for new Delphi versions are released in one week (max) after Delphi release.
Parts
Library core contains:
HTML parser with full support of HTML standard and ability to handle incorrect markup. It was tested on thousands of real-world emails so missed closed tags and incorrect tag order is not a problem. Also it is currently fastest native HTML parser for Delphi.
XML Parser with XPath support.
CSS parser with CSS 3 support.
DOM classes with JQuery support.
SVG rendering library.
HTTP client with native implementation for Windows and OSX and https support.
HTML rendering core.
Set of rendering canvases (GDI, GDI+, Direct2D, FMX, Android, iOS, OSX, Linux (Lazarus), Meta, Plain Text)
Set of HTML-enabled VCL controls including Label, Panel, ListBox, ComboBox, Tabs, CheckBox, RadioButton, SpeedButton, PopupMenu, ComboListBox, Virtual Tree, CategoryButtons, BalloonHint.
Powerful cross-platform scripting engine
Bundle also contains
Email framework
SQL framework
HTML rendering class is separated from drawing class so you can choose between available drawing classes or write your own. Currently library contains GDI, GDI+ and Direct2D canvases for VCL (All Delphi versions and Lazarus), FMX canvas for FMX Win32/64, iOS, Android and OSX and also native Android, iOS and OSX canvases.
Performance
Library core is heavily optimized and extremely fast. Parsing speed is about 100Mb/s so parsing of typical 100Kb document takes only 1ms. Style and layout calculations takes additional 20ms for 100Kb document.
Using of native canvas on Android provides smooth scrolling and zoom similar to native Android applications (much better than FMX controls) and correct text rendering with full RTL support, kerning pairs and baseline alignment.
How to use
Drop THtPanel on form and set it’s HTML property. That’s all you have to do to get HTML viewer with automatic scrollbars, build-in zoom support (Ctrl+Wheel or zoom gesture), gestures support for both VCL and FMX, picture loading (from file or internet) with BMP, JPEG, PNG, ICO and GIF support, hints (HTML title attribute) animations and transitons (for elements with :hover or :active styles).
To simply draw HTML on Canvas write
Doc := THtDocument.Create;
try
Doc.Parse(HTML);
Doc.Draw(Canvas, Rect);
finally
Doc.Free
end;
try
Doc.Parse(HTML);
Doc.Draw(Canvas, Rect);
finally
Doc.Free
end;
Why do I need it?
VCL and FMX contains a lot of powerful controls with many features. But what if you need something non-standard, for example put an image into listbox item?
Of course writing OnDraw event handler and using canvas methods is a simplest way... as long as image is not placed inside the text and text not contains several lines and some formatting. With HTML enabled list box you can just add Some text with formatting and image
How many lines of code is neccesary to draw simple rounded rectangle with shadow and gradient? Or tiled background image Or symbol table Changing HTML property could turn simple Panel into this
Of course writing OnDraw event handler and using canvas methods is a simplest way... as long as image is not placed inside the text and text not contains several lines and some formatting. With HTML enabled list box you can just add Some text with formatting and image
How many lines of code is neccesary to draw simple rounded rectangle with shadow and gradient? Or tiled background image Or symbol table Changing HTML property could turn simple Panel into this
New in 4.0
HCL/Core
Much faster drawing, style calculation and text selection, especially for very large documents
New THtDocument.FormattedHTML method.
Improved CSS animations support.
Improved lines/borders rendering on HDPI screens and scaled documents.
Improved text rendering on GDI+ canvas.
Added SourceURL to HTML clipboard header
Added THtDocument.SavetoStreamANSIEncoded.
Workaround for Windows/OSX bug with double quote symbol in Times/italic fonts.
Infinite support for CSS animations
All image lists now changed to TCustomImageList to support VirtualImageList.
New THtDocument.ConvertAttributestoStyle method for converting HTML attributes into inline CSS style.
Added CSS text-decoration-style property
Added CSS cursor: help
Added SVG stroke-linejoin and stroke-linecap support.
Incorrect font size values are now ignored
Added column width parameter to InsertCol
Improved quirks/normal mode support
Editor/Reports
Faster text selection, caret positioning and text input
New customizable selection toolbar (popup) for both VCL and FMX
Improved RTF import
Improved print preview window scrolling and zoom
Added Active=false mode for fast editing of very large documents (1000+ pages)
Better support for pasting HTML from clipboard in non-unicode Delphi
Added RTF pasting from clipboard when HTML is not available.
Added OnPrepareImage param to DocXtoHTML and RTFStringtoHTML
Added support for WMF-JPEG conversion on RTF/DOCX import for Delphi 7-2009
New OnURLDetected event - fired when URL is detected in document.
New eoEnterSoftBreak option for swapping Enter and Shift+Enter behavior.
Improved Outlook compatibility.
New eoHighlightCurrentBlock and eoShowSelectionToolbar options.
Added startangle parameter for pie charts
Added direction="cw/ccw" parameter for pie charts
Reports: added x-order attribute for arranging x-values in stacked charts.
SQL/Email/Scripter
Email library now available for all platforms.
Added SelectFolder method for selecting IMAP folders.
SELECT INTO support.
New TSQLInsertQuery, TSQLUpdateQuery classes.
DECODE column now returns correct data type based on values.
WITH .. AS support for Oracle dialect.
Support for PIVOT operator
Added HasFetchLimit and FetchLimit functions.
Support for ElevateDB SQL dialect
New ConvertWheretoJoins method
Added FreeandNil procedure
Calling Free() for object variable will clear variable.
Script: added record helpers from IOUtils unit: TDirectory, TFile, TPath.
HCL/Core
Much faster drawing, style calculation and text selection, especially for very large documents
New THtDocument.FormattedHTML method.
Improved CSS animations support.
Improved lines/borders rendering on HDPI screens and scaled documents.
Improved text rendering on GDI+ canvas.
Added SourceURL to HTML clipboard header
Added THtDocument.SavetoStreamANSIEncoded.
Workaround for Windows/OSX bug with double quote symbol in Times/italic fonts.
Infinite support for CSS animations
All image lists now changed to TCustomImageList to support VirtualImageList.
New THtDocument.ConvertAttributestoStyle method for converting HTML attributes into inline CSS style.
Added CSS text-decoration-style property
Added CSS cursor: help
Added SVG stroke-linejoin and stroke-linecap support.
Incorrect font size values are now ignored
Added column width parameter to InsertCol
Improved quirks/normal mode support
Editor/Reports
Faster text selection, caret positioning and text input
New customizable selection toolbar (popup) for both VCL and FMX
Improved RTF import
Improved print preview window scrolling and zoom
Added Active=false mode for fast editing of very large documents (1000+ pages)
Better support for pasting HTML from clipboard in non-unicode Delphi
Added RTF pasting from clipboard when HTML is not available.
Added OnPrepareImage param to DocXtoHTML and RTFStringtoHTML
Added support for WMF-JPEG conversion on RTF/DOCX import for Delphi 7-2009
New OnURLDetected event - fired when URL is detected in document.
New eoEnterSoftBreak option for swapping Enter and Shift+Enter behavior.
Improved Outlook compatibility.
New eoHighlightCurrentBlock and eoShowSelectionToolbar options.
Added startangle parameter for pie charts
Added direction="cw/ccw" parameter for pie charts
Reports: added x-order attribute for arranging x-values in stacked charts.
SQL/Email/Scripter
Email library now available for all platforms.
Added SelectFolder method for selecting IMAP folders.
SELECT INTO support.
New TSQLInsertQuery, TSQLUpdateQuery classes.
DECODE column now returns correct data type based on values.
WITH .. AS support for Oracle dialect.
Support for PIVOT operator
Added HasFetchLimit and FetchLimit functions.
Support for ElevateDB SQL dialect
New ConvertWheretoJoins method
Added FreeandNil procedure
Calling Free() for object variable will clear variable.
Script: added record helpers from IOUtils unit: TDirectory, TFile, TPath.
Only for V.I.P
Warning! You are not allowed to view this text.