THtmlPort/es

From Lazarus wiki
Revision as of 20:26, 14 December 2009 by Iskraelectrica (talk | contribs) (New page: {{THtmlPort}}category:Españolcategory:Castellano === En breve ===    THtmlPort es la versión Lazarus/Free Pascal de los componentes HTML de Dave Baldwin, incluye...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

English (en) español (es)

En breve

   THtmlPort es la versión Lazarus/Free Pascal de los componentes HTML de Dave Baldwin, incluye THtmlViewer, TFrameViewer y TFrameBrowser. El código adaptado mantiene la compatibilidad completa con Delphi.

   El código original no adaptado se encuentra aquí:

 http://www.pbear.com/

Pantallazos

Ejemplo de FrameDem usando la interfaz Carbon
Ejemplo de FrameDem usando la interfa Win32
Ejemplo de FrameDem usando la interfa GTK2t

Descarga

   Puedes descargar el código fuente adaptado usando Subversion:

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

   También hay disponible un archivo zip:

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

Licencia

   El código original Delphi en que está basa esta adaptación fue liberado por Dave Balwin como de Dominio Público. El código adicional añadido con esta adaptación se distribuye bajo la licencia MPL 1.1.

Instalación

   Para instalar el paquete HtmlComp en Lazarus:

  • Seleccionar Paquete | Abrir archivo de paquete (-lpk)..., y marcar htmlcomp.lpk (en el directorio package).
  • Pulsar Compilar para compilar el paquete.
  • Pulsar Compilar una segunda vez. Una peculiaridad de la FPC actual parece que requiere esta compilación extra.
  • Pulsar Instalar para reconstruir el IDE y relanzar Lazarus.

   Para compilar una aplicación de ejemplo que utiliza componentes del paquete HtmlComp:

  • Seleccionar Archivo | Abrir, ahora busacr y marcar framedem.lpi o htmldemo.lpi (ambos en el directorio demo_src).
  • Seleccionar Ejecutar | Ejecutar (o F9) para compilar y lanzar las aplicaciones de ejemplo.

Estado

Interfaz Carbon

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

Works with stable Lazarus 0.9.28.2, but for best results in the Lazarus form designer, use 0.9.29.

Win32 widgetset

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

Works with stable Lazarus 0.9.28.2, but 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.

Contact

If you have fixes for any problems in the package, please contact Phil:

 MacPgmr (at) fastermac (dot) net

Known Issues

Carbon widgetset

  • In FrameDem app, title and subtitle at top (readme2.htm) display in sans serif font even though style in demo.css specifies Times New Roman, which is a Mac font.
  • In FrameDem app, WingDing characters (sample3.htm) are not correct.
  • In FrameDem app, image files that are inlined in text (sample3.htm) or tables (properties.htm) do not display. This is accompanied by many errors outputted to the Console app window by the Carbon widgetset code.
  • Vertical scroll bar thumb does not move all the way to bottom of scroll bar when window is scrolled all the way down.
  • In FrameDem app, shelling to whatsnew.htm does not work since can't start second copy of app.
  • In FrameDem app, clicking Preview in Print dialog gives error that Copies is set to 0. Changing Copies to 1 allows Preview to proceed, but not much is shown. In HtmlDemo app, previewing works fairly well, although doesn't display quite as good as in app itself. With both apps, the second time Preview button is clicked, processing hangs.

Win32 widgetset

  • HtmlDemo sample app throws exception at startup.
  • FrameDem sample app sometimes fails to load samples3.htm when HTML Samples link is clicked; other times it loads fine.
  • In FrameDem app, shelling to whatsnew.htm starts another copy of app okay, but nothing displayed. Same issue with starting FrameDem with a file other than demo.htm specified on command line.
  • In Lazarus form designer, dropping THtmlViewer on form displays a scroll bar in the upper left corner of the control. Changing THtmlViewer's BorderStyle, for example, hides the scroll bar. Looks like a form designer bug.

GTK2 widgetset

  • HtmlDemo sample app won't load anything.
  • FrameDem sample app throws exception in several places (for example, clicking Stylesheet Support link). In debugger, enter "break gdk_x_error" and run backtrace following exception to see where error is occurring.
  • Font issues in FrameDem app. This may be due to inability to match font against Windows font that is specified in .css files. For example, no underlining or strikethrough, text in <PRE> tag is not indented properly, text looks too big in About box, etc.
  • In FrameDem app, first two WingDing characters (sample3.htm) are not correct.
  • In FrameDem app, File | Printer Setup throws exception in /printers/unix/cupslcl.pas if selected before clicking in one of the frames. Clicking in a frame enables File | Print and once Printing dialog has been displayed, File | Printer Setup is okay.
  • In both apps' Fonts dialog (Options | Default Font/Colors), the Font Name list will be empty if HasX was not defined when GTK2 was compiled (default on OS X; without HasX, EnumFontFamiliesEx is not implemented, meaning Screen.Fonts is empty list). But even if the list does contain fonts (HasX defined), clicking one blanks the example HTML (LoadAgain failing?).
  • In FrameDem app, shelling to whatsnew.htm starts another copy of app okay and loads file, but no vertical scroll bar is displayed, although clicking on invisible scroll bar does scroll the window.

All widgetsets

  • In the sample apps' Fonts dialog (Options | Default Font/Colors), the Font Color and Link Color areas are blank since a TColorGrid was used in the original Delphi apps. TColorGrid is not an LCL control and has been removed from the .lfm files.
  • Preview has been disabled since this depends on TMetaFile, which is not part of LCL.
  • Copying to clipboard does not yet work.
  • Does not yet support 64-bit.