Difference between revisions of "THtmlPort"

From Lazarus wiki
Jump to navigationJump to search
(Added screenshots and updated To Do to current version.)
Line 3: Line 3:
 
=== About ===
 
=== About ===
  
THtmlPort is a Lazarus/Free Pascal version of Dave Baldwin's HTML Components, including THtmlViewer, TFrameViewer and TFrameBrowser. The original unported source is available from here:
+
THtmlPort is a Lazarus/Free Pascal version of Dave Baldwin's HTML Components, including THtmlViewer, TFrameViewer and TFrameBrowser. The ported code retains full compatibility with Delphi.
 +
 
 +
The original unported source is available from here:
  
 
   http://www.pbear.com/
 
   http://www.pbear.com/
  
=== Screenshot ===
+
=== Screenshots ===
  
[[Image:FrameDem_MacBook.jpg|frame|none|framedem sample app on a MacBook using the carbon widgetset]]
+
  [[Media:THtmlPort_Framedem_Carbon.jpg|FrameDem sample app using the Carbon widgetset]]
 +
 
 +
  [[Media:THtmlPort_Framedem_Win32.jpg|FrameDem sample app using the Win32 widgetset]]
 +
 
 +
  [[Media:THtmlPort_Framedem_GTK2.jpg|FrameDem sample app using the GTK2 widgetset]]
  
 
=== Download ===
 
=== Download ===
Line 44: Line 50:
  
 
=== To Do ===
 
=== To Do ===
==== carbon widgetset ====
+
==== Carbon widgetset ====
 +
 
 +
Stable but needs support for additional image file formats and special characters. Both FrameDem and HtmlDemo sample apps are working.
 +
 
 +
Works fine with stable Lazarus 0.9.28.2.
  
Works well, but needs support for additional image file formats and special characters.
+
==== Win32 widgetset ====
  
==== win32 widgetset ====
+
Looks almost identical to Delphi but not completely free of problems. While the FrameDem sample app works well, the HtmlDemo app throws an exception at startup.
  
Unstable. While the framedem sample app works pretty well, you can see the problem with the THtmlViewer component on Windows when you select About - the About dialog comes up but then you can't close it. If you open Task Manager you'll see that the framedem app is using as much as 95% or more of CPU time. The same thing happens with the htmldemo sample app since it uses THtmlViewer directly. If you drop a THtmlViewer on a form in Lazarus you'll also see this problem - now Lazarus will be using all the CPU time.
+
For best results in the Lazarus form designer, use 0.9.29.
  
It's not known if this problem is due to issues with the win32 widgetset code, the LCL code, or some assumption in Dave's Delphi code that does not work with Lazarus. If anyone can fix this or suggest a workaround, please communicate it to the THtmlPort maintainer at:
+
==== GTK2 widgetset ====
 +
 
 +
Starting to look pretty good but the FrameDem sample app is prone to crashing in several places. HtmlDemo app does not display loaded HTML file.
 +
 
 +
Be sure to use Lazarus 0.9.29 with this widgetset.
  
  MacPgmr (at) fastermac (dot) net
 
  
==== gtk2 widgetset ====
+
If you have fixes for any problems in the package, please contact the THtmlPort maintainer at:
  
The framedem sample app displays some of the HTML, then crashes with a stack overflow exception. This is likely due to some endless loop within the GTK2 widgetset that is exhausting the stack. Again, if anyone has insights into this problem or comes up with a workaround, please contact the THtmlPort maintainer at the above e-mail address.
+
  MacPgmr (at) fastermac (dot) net

Revision as of 01:06, 6 December 2009

English (en) español (es)

About

THtmlPort is a Lazarus/Free Pascal version of Dave Baldwin's HTML Components, including THtmlViewer, TFrameViewer and TFrameBrowser. The ported code retains full compatibility with Delphi.

The original unported source is available from here:

 http://www.pbear.com/

Screenshots

 FrameDem sample app using the Carbon widgetset
 
 FrameDem sample app using the Win32 widgetset
 
 FrameDem sample app using the GTK2 widgetset

Download

You can download the ported source using Subversion:

 svn co https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/components/thtmlport [local dir]

A zip file of the source is also available:

 http://web.fastermac.net/~MacPgmr/THtmlPort/

License

The original Delphi code on which this port is based has been released by Dave Baldwin into the public domain. Additional code supplied with this port is released under the MPL 1.1 license.

Installation

To install the HtmlComp package in Lazarus:

  • Choose Package | Open package file, then select htmlcomp.lpk (in the package subfolder).
  • Click Compile to compile the package.
  • Click Compile a second time. A quirk in the current FPC apparently make this extra compile necessary.
  • Click Install to rebuild and relaunch Lazarus.

To compile a sample app that uses the HtmlComp package:

  • Choose File | Open, then select framedem.lpi or htmldemo.lpi (both in the demo_src subfolder).
  • Choose Run | Run to compile and run the sample app.

To Do

Carbon widgetset

Stable but needs support for additional image file formats and special characters. Both FrameDem and HtmlDemo sample apps are working.

Works fine with stable Lazarus 0.9.28.2.

Win32 widgetset

Looks almost identical to Delphi but not completely free of problems. While the FrameDem sample app works well, the HtmlDemo app throws an exception at startup.

For best results in the Lazarus form designer, use 0.9.29.

GTK2 widgetset

Starting to look pretty good but the FrameDem sample app is prone to crashing in several places. HtmlDemo app does not display loaded HTML file.

Be sure to use Lazarus 0.9.29 with this widgetset.


If you have fixes for any problems in the package, please contact the THtmlPort maintainer at:

 MacPgmr (at) fastermac (dot) net