XmHTML Current State

This page is updated almost on a daily basis and describes changes, bugfixes, personal frustrations and victories, milestones and release dates of past, present and future XmHTML alpha versions.

The first entry dates back to november 12, 1996. While this may seem a long time, I'm doing the development single-handed, making stupid mistakes, writing, rewriting and re-rewriting code. XmHTML has come a long way since then and it's gaining more attention every day. The XmHTML Developers mailing list currently contains about 120 subscribers, and it's still growing.

This document gives a fairly good description on how XmHTML is progressing, and, most of all, it shows that XmHTML is a project that is alive and kicking!

October 6
Hmm, I've been lazy updating this page. Here's what I've been doing during the past weeks:

In addition to the above, I've also been thinking about restructering the source tree and splitting the code in common and toolkit-dependent parts. XmHTML will be placed onto the GNOME CVS repository shortly which should speed up the development of the gtk-xmhtml port and XmHTML considerably . To keep a clean oversight and make life easier for the gtk-xmhtml developers and myself, a restructured source tree is very much desired.

September 11
Fixed a couple of serious bugs in the table layout algorithm with respect to nested tables. Not entirely perfect yet but things are looking much better.

I seem to have fixed the layout bug properly, although I still need to verify vertical positioning of images and make a few changes to the layout computation of preformatted text. Proper rendering of table borders is also much closer to the real thing.

A few problems still remaining: proper handling of getting and setting line numbers. This has been thrown of balance since the positions of all text-based objects has slightly changed. I have added a (temporary) fix which seems to work satisfactory for now.

Nevertheless, the long awaited XmHTML/Beta Version 1.1.5 has been released as of today.

September 9
Added Setvalues support for the XmNenableIconEntities, XmNiconAlignment and XmNtabWidth resources.

Added support for the above resources to examples/example_2.

Fixed a bug in the parser: XmHTML could reference an invalid parser tree when a convenience routine was called from inside a XmNdocumentCallback callback function. This in could cause XmHTML to crash.

September 4
Added the XmNtabWidth resource: this resource allows one to adjust the width of a horizontal tab in preformatted text.

Fully incorporated support for W3C icon entities. Added the XmNenableIconEntities and XmNiconAlignment resources.

September 1
Updated the XmHTML manual page. I also seem the have the layout bug resolved properly.

August 31
Didn't get much to do on XmHTML since I spent almost the entire day trying to recover XmHTML's latest sources after one of my disks died a horrible, screeching death. I did manage to get the disk spinning again by messing with the hardware, only to find it was totally wasted. I won't bother you with further details, I'll suffice to say I had to wade through a dump of over 2gig to recover them...

As a result I transferred development to another system which supports full mirroring (an IBM 42T in case you're interested).

It was waaaay past midnight when I finally had everything up and running again.

August 30
Reworked the history mechanism in the examples, it works much better after I added two convenience functions that allow one to test the visibility state of a hyperlink: XmHTMLAnchorVisibleById and XmHTMLAnchorVisibleByName.

Fixed a few bugs here and there. Most importantly, XmHTMLAnchorScrollToId could cause a buffer overrun and subsequently bring XmHTML to a grinding halt.

August 27
Minor bug fixes, comment updates. Started to merge in code donated by Eric Bello (belloer@gemse.fr) for embedded object support.

August 25
Code review, I need to familiarize myself again with the code, it's been almost three months since I had a look at it...

Came a long way with fixing a fundamental flaw in the layout code.

August 24
I've finally recovered from back problems and a fractured wrist, so after a very long delay I've started working on XmHTML again.

Target date for (the long overdue) XmHTML Beta 1.1.5 is set for Thursday, September 3, 1998.

June 4
Made a start with updating and correcting the manual pages and other documentation.

Made a beginning with the implementation of support for embedded objects. This will allow programmers to dynamically add their own HTML extensions, create external widgets or start up applications and bring them under XmHTML's management. This hugely extends XmHTML capabilities!

I also made some progress with further implementation of the ToolkitAbstraction. Still needs some work though.

Played around with adding autoconf/automake support to the XmHTML source tree. This basically works but needs a lot of tweaking before this system is fully functional. Things that work are:

Building shared libraries needs to be tested.

Things that don't work (yet) are:

I expect to solve these problems during the coming weekend. Stay tuned.

May 25
The scrolling problem reported by a number of people finally seems to be solved!

Eric Bello submitted an optimization for the scrolling which simply collapses all outstanding motion events. The entire chain of events caused by fast scrolling is now more or less handled synchronously and thus this (very important fix) should ensure that the screen is finally updated properly.

Since this approach may lead to jumpy scrolling on some systems, the XmNsmoothScrolling resource has been introduced. If True, XmHTML will use not collapse motion events and scrolling will always be smooth.

April 27
Released XmHTML/Beta Version 1.1.4.

April 26
A day dedicated to bugtracking (with many thanks to Marcel Ruff for keeping me busy...)

Modified the XmImageProc definition from:

typedef XmImageInfo*(*XmImageProc)(Widget, String, XtPointer);
typedef XmImageInfo*(*XmImageProc)(Widget, String, Dimension, Dimension, XtPointer);
The new arguments are the width and height as specified by the width and height attributes on the <IMG> tag.

This change offers more flexibility for external image caches and is consistent with the way XmHTML performs internal image caching: internally, XmHTML caches images on a per-document basis: before the XmNimageProc resource is called, XmHTML looks at the list of images already loaded for that document. If it finds an image with the same url and dimensions, that image is reused instead of reloaded. Previously, this could lead to inconsistency (images with incorrect dimensions or images not appearing at all) with external image caches that only use the filename or url of a loaded image.

Several bugfixes:

April 18
Fixed an important buffer overrun in the parser that made XmHTML terribly unstable...

April 13
Greatly improved the table layout algorithm. XmHTML now uses a separate routine to compute the layout inside each cell. This enables XmHTML to make a proper distinction between cells that contain a multitude of images, special centering and linebreaking rules. It also sped up the layout computation of documents without tables in them.

It's not yet perfect but I'm getting there.

April 8
Fixed a few important bugs in table rendering: while scrolling a table with a background specification, the entire background would be repainted but only the newly scrolled content would be rendered making the existing content invisible.

Loosened HTML conformance checking when the XmNstrictHTMLChecking is set to False: font changes are now allowed to cross all HTML container elements (<H1>, <DIV>...).

Anchors are now rendered using the current background color instead of the document background color.

Enhanced the parser to automatically detect and correct a tag without a greater than sign (>).

April 4
Released XmHTML/Beta Version 1.1.3.

Moved all warning messages in a stringtable and made a number of other changes to reduce the data size of the library. That succeeded fairly well, it decreased with more than 20kb.

Made a few changes in exposure handling, tables seem to behave themselves a lot better now.

April 3
A few more optimizations in the document formatter: introduced a generic Stack class and replaced a few small but often used functions by macros.

Fixed a small bug in table layout: content of cells with a single line of text in them is now properly centered.

Fixed an important bug in image scaling: previously, XmHTML modified the original image data directly, leading to quality loss when the same image but with the original dimensions is referenced later. XmHTML now works with a copy of the original data when scaling is to be employed.

April 1
Added support for relative image dimensions;
A few optimizations in tag attribute checking: tag attributes are now made caseless when the document is parsed, so attribute checking can now be done caseless as well.

The COLOR attribute for horizontal rules (<HR>) is now also supported for rules without the NOSHADE attribute set.

March 13
Added the XmHTMLGetDocumentInfo convenience routine. This routine returns a list of all images and hyperlinks contained in a document, allowing one to display the structure of a document.

March 12
Bummer, haven't had much time the last weeks to work on XmHTML. Nevertheless, the following changes have been made:

February 15
Added full text searching using POSIX 1. regular expressions. Works quite well if I may say so...

February 12
Fixed an annoying parser bug: trailing contents in closing tags wasn't properly ignored which could lead to badly formatted documents.

Converted two routines heavily used by the parser to macros to speed it up a little.

Fixed a bug in anchor painting: when anchor highlighting is turned off, anchors now return to their normal state when they are deselected. Previously they would be painted with the highlightcolor.

February 9
Introduced some much needed optimizations after performing some profiling tests: XmHTML now spends less time in color allocation (in some tests even less than 65 percent), caseless string matching and the GIF decoders.

Fixed some bugs in the 16bit RGB color matching code.

February 7
More table fixes: width of nested tables & spanned cells finally computed correctly.

Modified all color allocation routines to work with 16bit RGB values and subsequently modified the image readers, quantizer and dither engines. Sped up dithering of JPEG images and did some prelimenary work on 16bit image support.

Modified colorhashing to reduce the number of collisions.

February 1
Loosened parsing of RECT <AREA> coordinates: any sequence of non-digit characters is now considered a separator (www.infoseek.com is a site containing very nice examples of bad HTML).

January 29
Released XmHTML/Beta Version 1.1.2.

January 28
It's been a while since the last update. I have been rather occupied with other items since the last update, but nontheless, a few improvements have been made:

December 31
Happy Newyear!

December 15
HTML Form widgets are no longer actively destroyed when the parent HTML widget is destroyed. Previously, this lead to an XError. Bugfix thanks to Richard Offer.

<BR> bugfixes:

December 14
Fixed a bug in anchor rendering when it is the first object in a page: XmHTML couldn't find a proper starting point and didn't render the anchor at all.

Fixed a bug related to empty named anchors, they used to reset the left margin (this one has been lurking under the carpet for a very long time...).

Some improvement in table exposure handling.

December 13
Modified handling of the XmNenableBadHTMLWarnings resource: you can now select what type of errors the parser detects will be shown.

December 11
libhttp: the HTTPHEAD HTTPLoadMethod now supports both HTTPLoadToFile and HTTPLoadToString. For the latter, any received headers are stored in a new headers (array of type HTTPNamedValues) field in the HTTPRequest return structure.

HTML tables: cell width takes horizontal margin into account properly. Previously, the cell width tended to be too small for the widest cell. Bugfix: linebreaks contained in anchors are no longer rendered.

Fixed a number of bugs in the Imakefiles.

December 9
HTML tables:

December 8
Fixed a small redraw bug in XmBalloon popup.

Changed the handling of <BR> tags: they are now treated as text objects. This fixes a bug in table cell content rendering if a table is placed in an intended paragraph.

Added the Composite Extension fix.

December 4
Released XmHTML/Beta Version 1.1.1.

December 3
Nested tables seem to be working almost flawlessly. Added partial support for the BGCOLOR attribute on all table elements. Still scrolling problems and offsets between different child tables doesn't always work correctly.

Loosened the parser to allow appearance of the <P> element inside elements it shouldn't be appearing the XmNstrictHTMLChecking resource has been set to false.

December 1
Tables are really going now: the COLSPAN and ROWSPAN attributes are now working. Table margins, cell and row padding also seems to work. If you care to take a look at a sneak preview, click here and be amazed :-))

November 26
More work on table layout: cell heights are now computed correctly, cell and rowspacing works, cell and row spanning should work. Nested tables also seems to work but has received little testing.

November 25
First success at table displaying! The layout algorithm seems to work rather well (and fast!). Details aren't rendered yet (borders, background color or image), suppport for cell and row spanning hasn't been added and scrolling is sometimes messed up, but the borderline is: the basic table layout computation algorithm works, and it works damn GOOD!

November 21
Finally found a satisfying design for table support. Extended the document formatter to fill in the table data structures.

November 20
Internal changes to the parser as preparation for progressive document loading. Temporarely removed the ParserObject from the XmHTML Widget library.

November 14
Played around with the HTML 4.0 event model: added the XmNeventProc resource to parse any scripts attached to these events and added the XmNeventCallback callback resource whenever an event should be served. Support for all HTML4.0 events is present in the code but currently only the onMouseUp and onMouseDown events are support for anchors.

Still thinking about a decent and fast way to handle tables.

November 12
Some small performance increases in the document formatter: whenever possible, objects are reused instead of being deleted.

November 11
Played around a bit with the HTTP.c code in the contrib dir:

The result of the above changes is that loadHTTPURL will never block again.

Modified a few routines in parse.c so that they can now be shared by both XmHTML and XmHTMLParser.

Small bugfix in ScrollToLine.

November 10
Added the XmNclientData resource. This resource allows one to provide a pointer to client data that should be provided as the last argument to any function installed on any of the functional XmNanchorVisitedProc and XmNimageProc resources. As a logical consequence, the corresponding typedef for these resources now have one additional argument of type XtPointer.

November 8 and 9
Working on tables;
Much work on example_2.c: I'm completely rewriting it in a rather modular way where a basic Browser object can act in four different ways: as a complete browser, as member of a HTML frameset, as a popup window and as the desktop window. All of which can be used in every possible combination.

November 3
All resource strings used by the XmHTML Widget Library are now placed in a separate header file called HTMLStrings.h.

November 2
Added a XmBalloon widget to the library. This is a simple "tooltip" widget that can be popped up to display a small string. The string can be displayed in a rectangle or an oval (the latter is achieved using the Shape extension). example_2.c contains a possible usage: whenever an anchor is entered that contains the title attribute, this tooltip is popped up.

October 31
Modified example_4 so it now also compiles and runs with X11R5 (or earlier)

October 28
CDE and Solaris related Imakefile fixes and a workaround for a possible bug in SparcWorks cpp.

October 26
Bugfix: the widget's size wasn't always correctly set at creation time.
Modified XmHTML's translation table: anchor selection/document scrolling now works with any key combinations but Shift, Meta and Ctrl. The previous table masked of all modifiers, making the widget practically unseable if, for instance, the NumLock key was active.

October 22
Bugfix on vertical scrolling: any vertical scroll requests are now properly ignored when the currently loaded document doesn't have a vertical scrollbar.

October 21
XmHTML's form support is now complete: the XmNformCallback is now fully implemented thanks to Richard Offer!
Richard also provided a simple HTTP/1.0 implementation. A big round of applause!

October 11
Released XmHTML/Beta Version 1.1.0., the first XmHTML Beta Release.

October 10
Last preparations for the XmHTML Beta 1.1.0 release.

Fixed a small bug in local anchor jumping: XmNanchorVisitedUnderlineType resource wasn't properly honored.

Removed a number of unused resource class names from the XmHTML string table (1kb of data), added the XmCAnchorUnderlineType resource class and corresponding converter and added a warning message to the parser (in some cases it forgot to complain about closing elements without an opening counterpart).

October 9
Added a "fast" mode to the parser which entirely bypasses the document verification and repair routines (as if it wasn't fast enough already :-) If you are absolute sure that a document is fully compliant with the HTML3.2 standard, and all elements for which termination is optional have a terminator, setting the value of the XmNmimeType resource to text/html-perfect will select the fast parser.

October 8
Finally fixed a very annoying bug: when the widget is created, the height wasn't always computed correctly, leading to incorrect screen updates when scrolling (small gaps appeared). The only way to get around this bug was to resize the widget. It turned out that the core class height gets modified sometime after the Widget's Initialize method has been called, but before it is being mapped to screen. What causes this is a mystery to me.

Final preparations for the first official Beta release, 1.1.0: added a collection of manual pages that describe each and every convenience function offered by XmHTML and updated the (hugely out of data) widget description.

October 7
Dithering to a fixed palette is now fully possible. There are four different methods available (closest match without error correction, ordered with and without error correction and closest match with error correction). You can specify a palette using the XmNimagePalette resource or let XmHTML create one for you.

October 6
Working on implementing support for the XmNimageMapToPalette and XmNimagePalette resources, which allow you to define a palette for XmHTML to use. Besides the obvious advantages this can offer, another advantage is a rather large speedup when switching pages: since a palette contains a fixed number of colors, XmHTML can allocate all colors on startup and doesn't have to free them until it is destroyed. This obliterates the need to release allocated colors each time a new page is loaded.

October 3
Replaced the current quantizer with a compacter and faster one. Previously XmHTML carried two quantizers: one for global use and one specifically for PNG images.

Fixed a bug in the colormap reading code of GIF images.

October 2
Fixed a small bug in form handling: optionmenu's didn't get reset when the reset button was pressed.

September 28
Added support for Fast Loadable Graphics. This is a format especially designed for XmHTML and optimized for very fast loading of images. The FLG format is actually nothing more than a compacted version of the XmImageInfo structure, and as such it supports plain transparency, alpha channel and animations (with all GIF disposal methods).

Data can be stored either compressed or uncompressed. Uncompressed FLG's are the fastest possible way to load an image into XmHTML, but they can take up a huge amount of space. A funny thing I noticed though is that, quite often, an uncompressed FLG takes up less space than the same image saved as a GIF image...

Animation support: the global colormap of an animation is now only allocated once for the entire animation instead of being allocated for each frame separatly. This has two significant advantages: memory usage is reduced and less time is spent in allocating colors. XmHTML will now also use the global colormap if the local colormap of an animation frame is equal to the global colormap.

September 26
Some changes to reduce memory usage:

September 22
A lot of improvements in the font allocation/caching routines:

One very major performance enhancement is the introduction of a smart font mapping scheme which maps unknown font names to known ones. I am particularly pleased with this scheme, it allows XmHTML to map fonts it does not know in the beginning to known ones later one. Assuming the helvetica font is present in your font path and arial isn't, the following happens: when XmHTML encounters a <FONT FACE="Arial"> tag, it will not know to which font it should be mapped and it will use the default font (whatever that is). However, when at a later stage a <FONT FACE="Arial,Helvetica"> is encountered, XmHTML will see that this Arial font can be mapped to the Helvetica font (which it does known), and as a result, any future reference to the Arial font will be mapped to the Helvetica font. XmHTML is smart enough to take any combination of weight, slant and size into account when making these decisions.

Performance tests with the new font caching and mapping schemes show some very satisfactory results: the cache hit ratio is steadily increasing, approaching 90 or more percent after about 10 documents with different fonts have been loaded. The average number of search actions seems to remain steady around 7 in this case. The font cache contained 55 fonts (including 10 font mappings) in various families, sizes and styles.

As a side note: this new ``font technology'' allows users to define their own font mapping by providing a document with a list of simple font mappings. Click this link for a sample document.

Before I forget: I made the builtin cursor allocation display-independant as well.

September 21
First success at flowing text around images with the ALIGN="LEFT" or ALIGN="RIGHT" attribute set.

September 20
Small parser bugfix: mime type of a new document wasn't properly saved.

Added a ``View Document Source'' menu item to example_2 and fixed a bug in jumping to locations in different files.

September 18
Fixed a few important bugs:

XmHTML now properly honors the XmNstringDirection resource: when set to XmSTRING_DIRECTION_R_TO_L, text is properly inversed. Paragraphs contents are ordered from bottom to top. Needs a bit more work though: list markers are always left-aligned at the first line of a paragraph instead of right aligned at the bottom.

Modified the linebreaking algorithm to handle line/paragraph breaks properly when the paragraphs contain non-text objects (HTML form components and images).

Table support: changed the text layout algorithms to work independantly of XmHTML's dimensions. They now use a (dynamically adjustable) bounding box.

September 16
When the title of a document is requested, leading and trailing spaces are now removed.
Added the HeadDocType mask bit to XmHTMLGetHeadAttributes() convenience function. When set, the value of the <!DOCTYPE> tag will be returned.

Improved path resolution and mime detection routines in example_2.c

September 10-12
Some prelimenary work on XmHTMLTextGetFormatted()

September 4
Fixed a few important memory leaks. One of those caused the stored anchor data never to be freed.

Reverted a few bad fixes.

September 1
XmHTMLTextSetString fix, text was always rendered twice.

Moved all resources into a stringtable. This actually seems to introduce a rather noticable speedup in document loading. Haven't got the slightest clue why this happens.

August 29-31
Numerous bugfixes & memory leak fixups. A grand applause to Ricky Ralston for having the courage to run XmHTML through purify. Thanks Ricky!!

Started with daily snapshot distribution.

August 28
Released XmHTML/Alpha Version 1.0.21., last Alpha release. The next release will be the first publically available Beta.

August 26
Rewrote and extended <PRE> support greatly. Plain text, form components and images can now be mixed freely.

Some minor changes in anchor rendering: anchors are now only extended to the right when there is room for it, they no longer cover adjacent text when activated. Fixed highlighting of transparent anchored images.

Added the XmNimageRGBConversion resource which allows one to select the conversion method XmHTML should use when converting 24bit to 8bit images.

Some minor fixes in the SetValues method: XmHTML now only triggers a redisplay if a resource change requires it.

August 25
Changed the proto's for XmHTMLImageReplace() and XmHTMLImageUpdate() : they now return a status indicating whether or not the document needs a recomputation of document layout if an image is replaced or updated.

Fixed a bug in the default image processing: when images were delayed, the delayed icon wouldn't show up. I forgot to properly propagate the image dimensions.

August 21, evening
Fully restored PNG alpha channeling support, there was a silly bug in doing the 24 to 8 bit conversion. Alpha channeling is now also supported for delayed images and any combination of background setting, set either via the loaded document or the SetValues method. See XmHTML PNG Demo for some screenshots.

Transparent background images are now also supported.

August 21, morning
Fixed a bug in delayed image loading that caused a fatal crash when the delayed image was freed.

Progressive and normal image loading now share the same XImage creation and update routines. Also fixed clipmask creation for progressively loaded images.

Rewrote most part of the handling of PNG images with an alpha channel.

Several bugfixes and changes to example_2 and it's caching routines.

August 20
HTML form support: vertical scrolling of a document with a HTML form in it should now be correct whether or not a horizontal scrollbar is present. Also fixed a bug in the SetValues method which caused XmHTML to ignore the already present form widgets.

Modified the debug routines, output can now be sent to a file.

Eliminated some dead/duplicate code in the painter and widget methods.

August 19
HTML form support:

Some code cleanup in the document formatter.

Experimented with the BaseClass stuff. Gave up on it after half a day or so, implementing it would require a totally different approach and a lot of information on Motif's BaseClass. XmHTML is very much an Intrinsics widget with some added Motif value, and I would keep to like it that way, at least for a while.

August 18
Small performance increase: XmHTML now uses Manager's GC's (XmHTML is a subclass of Manager) to paint the anchorbuttons and horizontal rules instead of using it's own GC (and switching colors all the time).

Changed the XmNanchorHighlightOnArm resource to the standard XmNhighlightOnEnter resource. The highlight color is now computed dynamically depending on the current background color, which makes a lot more sense than having a fixed highlight color.

Modified the anchor highlighting stuff when anchors are displayed as buttons: with highlighting enabled they now really resemble pushbuttons.

Extended the supported HTML extensions to now also recognize a color attribute on the <P>, <DIV> and <CENTER> tags. The color attribute is now also supported for <HR> with the noshade attribute set, so you can now have colored lines in your document.

Progressively loaded images can be scaled on the fly (and as a side effect it resolved a fatal bug in the plc code).

August 16-17
Took two days off, needed some rest drastically...

August 15
Changing any font resource should now work properly. There was a bug in the font cache and the SetValues method which prevented XmHTML from properly honoring this change. Most of the time XmHTML choose to ignore any changes to the font resources altogether...

Fixed a very nasty bug which occured with the SetValues/XmNdocumentCallback combination: setting any formatting resource from within the XmNdocumentCallback would sometimes lead to a document being loaded twice, but mostly it just caused a sigsegv.

SetValues fix: changing the XmNimageEnable, XmNenableBodyImages and XmNbodyImage resources should work properly.

August 14
Added the XmNanchorHighlightOnArm resource. Enabling this resource provides a constant visual feedback as each anchor the user moves his/hers mouse over will receive highlighting. The XmNarmColor resource allows one to set the color to use for this anchor highlighting.

August 10-13
Lots of bugfixes in the progressive image loading routines. They finally seem to behave in an orderly manner.

Rather large performance increase in color allocation on PseudoColor and StaticColor displays. XmHTML now uses a hashtable instead of querying the X server.

Test with dynamically changing of resource setting revealed a couple of bugs in the SetValues method. One of those bugs caused XmHTML to overlook internally cached images.

August 6
Setting XmNscrollBarDisplayPolicy to XmSTATIC will now also force a horizontal scrollbar to appear.

Modified the parser so it will now properly remove the contents of the <SCRIPT> and <STYLE> tags when these tags aren't placed in the <HEAD> tag (which is the only place where they may occur).

August 5
Added the XmNenableColorSwitching and XmNenableFontSwitching resources. XmNenableColorSwitching allows one to disable support for the color tag while XmNenableFontSwitching allows one to disable support for the <FONT> element.

Added an options menu to example_2.

August 4
Fixed a parser bug: elements with an optional closure are now being flushed when they prevent a new element from becoming legal. Previously the new element was discarded, which sometimes lead to bad results (pointed out by Danny Backx).

August 3
Added an additional pass to the font loading algorithm to search for a font when it can't be found with the current value of the XmNcharset resource.

Modified the PLC routines to share a single GC for every image that is being loaded.

July 18-August 2
Took a much needed holiday.

July 17
Released XmHTML/Alpha Version 1.0.20.

July 15
Fixed a few bugs in font loading:

Text enclosed in a paragraph (<P>...</P> or <DIV>...</DIV>) now also gets a trailing linefeed.

July 13,14
Made a start at making XmHTML's image support self-sustaining for various reasons:

  1. allows implementation of a primary and secondary image cache. A primary image cache could for example contain the real image data XmHTML uses internally (pixmaps and thelike) and have a short-time lifespan, while the secondary image cache could contain the XmImageInfo structures required for creating XmHTML's internal images and have a long lifespan.
    This would gain a huge performance increase in switching between documents.
  2. makes it a lot easier for other people to add image capability to their own applications without needing to use XmHTML;
  3. and last but not least, it would make the core of XmHTML a lot lighter.

Form image buttons work correctly.

July 11
Fixed a baseline adjustment bug for image objects.
Fixed a GIF animation bug with dispose by background disposal method.

Modified the parser so it is now able to backtrack when unbalanced HTML tags are encountered.

Fixed progressive image loading to work with buffers as small as one byte. Progressively loading XBM images now works correctly.

July 9
More work on forms:

Fixed a memory leak: when freeing anchor data, the value of named anchors wasn't freed properly.

July 4
I've found the wonderfull XtInsertEventHandler function! This finally got me to get form scrolling correctly working: I can now simply choose to ignore all exposure events generated all over the place when the form components are being scrolled!

Fixed a bug in baseline adjustment for form components.

July 3
Made a few changes in the text outlining routines, should look a lot better now (the words on a line are distributed more evenly).

Detected and fixed a number of bugs:

The background image and X11 Bitmaps can now also be loaded progressively.

July 2
Fixed a number of bugs in the progressive JPEG loader that showed up when experimenting with PLC buffer resizing.

All PLC routines are finally fully reentrant.

July 1
The buffers used by the progressive image loader can now be resized by an application.

GIF images can now also be loaded progressively by using an external GIF decoder installed on the XmNdecodeGIFProc resource. Introduced the XmHTMLGIFStream object which is now the sole argument to any function attached to this resource.

Modified progressive decoding of GIF images when using the internal GIF decoder to wait until all compressed raster data has been received; progressive decoding of a GIF image by the internal GIF decoder is impossible due to the forking of uncompress(1) (a well, it's not impossible but terribly slow).

Added a new resource, XmNprogressivePerfectColors, which allows one to instruct XmHTML when and if a final color quantization pass should be performed once a progressive image has been loaded. I've made this into an option instead of doing it always as this is a rather time-consuming operation. Possible values are Never, Always or Automatic (let XmHTML decide when a quality increase can be expected).

June 26
Fixed simultaneous updating of multiple copies of the same, progressively loaded, image in the current document.

Modified XmHTMLXYToInfo() to ignore images that are currently being loaded progressively: most of the XmImageInfo fields returned have a very limited lifespan (a few or so polling intervals) during image load.

June 25
Progressive JPEG images that are loaded progressively are now also displayed properly: each pass adds additional detail. XmHTML now requires libjpeg version 6 or above for full jpeg support.

Added a final color quantization pass in progressive JPEG support (first passes are dithered against a fixed palette, the final pass will do Floyd-Steinberg using a histogram of the image itself).

Added three convenience functions to suspend, continue and kill progressive image loading.

Fixed a serious bug in the main plc engine which caused a total server (and system) lock when any mouse button was activated on the display area.

June 20
Baseline JPEG images can now also be loaded progressively.

June 19
Fixed a bug for transparent frames in animated gifs with dispose by background disposal method; clipmask was used incorrectly when restoring to background.

June 18
Interlaced GIF & GZF images are loaded properly now.

June 17
First success at progressive image loading!!

June 16
Modified XmHTMLAllocColor and XmHTMLFreeColor (two non-XmHTML supporting routines) so they no longer interfere with XmHTML's private color allocation.

Fixed a bug in the color matching algorithm, RGB values were shifted out of range, causing colors to be mapped to the wrong color or even worse (to black).

June 15
All PLC interfacing routines written. Image PLC interfacing routines written and verified. First tests show the scheme is working better than expected.

June 14
Most top-level PLC routines written. Image PLC routines nearly finished, GIF and GZF progressive image decoders written.

June 11
Rewrote the color allocation routines: profiling showed that XmHTML's old color allocation scheme spends quite a lot of time allocating its colors. The new scheme is nearly 30% faster.

June 10
Started on progressive image loading: Progressive Loading Context (PLC) object written. Object-specific structures written. Started splitting the image loading routines so they can be used for progressive image loading.

June 9
Wrote a very feasible progressive object loading concept. The implementation will use a ringbuffer with object-specific function pointers, visited by XmHTML using a variable polling interval. The concept allows for an easy implementation of progressive document loading as well.

June 5
Alpha channel PNG images are now created when they are needed by the painter. The reason behind this is that when XmHTML is resized horizontally, the position of the image changes with respect to the current background setting, making a redo of alpha channel processing necessary. It works but causes a very undesirable delay. Seems like progressive image loading is becoming a real necessity...

June 3
PNG support: XmHTML now supports the following features as set forth in the decoder requirements specified in the W3C Official PNG Recommendation:

The tRNS and alpha channel support both work with a fixed background color as well as composing against a background image. As you can see, everything except progressive image loading is now supported. Thanks to Greg Roelofs for the quite usefull PNG Home Page, usefull tips and adding XmHTML to the PNG Supporting Applications page.

Also upgraded the PNG code to comply with libpng version 0.96.

June 2
Finally fixed a transparency bug on animations with a disposal method of none while the first frame contains transparency. This bug has been around since Alpha 1.0.16 or so.

June 1
Fixed a bug in image scaling: scaling the clipmask data of transparent images directly was wrong so I now simply recreate the clipmask data out of the scaled image data (which also gains us a small performance increase).

May 31
More work on PNG image support: background substitution and RGB images. Alpha channel support and transparency support is partially in.

Added the XmNscreenGamma resource to fully exploit the gamma correction capabilities of both PNG and JPEG images.

Released XmHTML/Alpha Version 1.0.19.

May 29
Fixed a few more bugs in the parser: the rules for definition lists were not entirely correct. Added a check on invalid nesting of HTML markup elements.

May 27
Added a check on the scrollbar dimensions when they are specified using application defaults or in a resource file. Subsequently added a section on specifying XmHTML's dimensions in the same way in the Programmers guide.

More work on the XmHTML Programmers Guide.

May 26
Bugfix 05/26/97-01, a nasty bug which caused XmHTML to crash every so often in the most strangest ways. It turned out to be a stupid typo...

Rewrote the caching routines in example_2 to be more generic and robust.

May 23
Fixed the parser to recognize the contents of the <SCRIPT> and <STYLE> elements. The XmHTMLGetHeadAttributes convenience function now also fills the appropriate fields of the XmHTMLHeadAttributes structure.

May 22
Fixed a nasty bug in XmImageFreeImageInfo when it was called by application code. As a result of this the function call itself now takes two arguments: the widget id of a XmHTMLWidget and a pointer to the XmImageInfo structure that is to be released.

Fixed a bug in comment parsing: single dashes appearing in a HTML comment are now properly ignored.

Added the XmHTMLAllocColor convenience routine which can be used for easy color allocation using the colormap installed on a given XmHTMLWidget.

May 18
Added the XmImageConfig structure for use with XmHTML's external image support. This structure allows one to configure the behaviour of the XmImageCreate... routines and contains various flags to set (amongst others) an external gif decoder, create a clipmask, perform background substitution, color quantization and frame selection on gif animations.

May 16
Added support for the XmNmaxImageColors resource: when an image contains more colors than allowed, it will be quantized (and possibly dithered using the Floyd-Steinberg algorithm) to match the maximum number of allowed colors.

May 15
Added the XmHTMLGIFtoGZF convenience routine: this routine converts a gif image to a compatible image format in which the LZW compressed raster data has been replaced with deflate compressed raster data. This function can be used by application programmers that want to keep the slowdown caused by XmHTML's gif workaround to an absolute minimum by converting a GIF image to a GZF image and subsequently using the GZF image whenever a corresponding GIF image is to be loaded. The GZF image format is a compatible GIF format, in which only the raster data is compressed in a different format.

GZF images can be somewhere between 5 and 60%(!) smaller than the original GIF image and it loads considerably faster.

May 13
After two weeks of negotiating with Unisys to obtain a license for the use of their patented LZW algorithm for decoding the LZW compressed raster data as found in GIF images, I was utterly frustrated by their absolutely mindboggling attitude towards the use of the LZW algorithm for decoding gif images. I was even more frustrated by the ridiculous restrictions an LZW license would place on the distribution of XmHTML (for instance: a splash screen would be mandatory for every application using XmHTML and I would not be allowed to distribute the LZW decoder to people that don't have an LZW license, even if I have a valid LZW license).

Instead of removing support for gif images, I decided to replace the built-in LZW decoder with a workaround that translates the LZW compressed raster data to the format used by compress(1), after which XmHTML calls uncompress to perform the actual decoding of the compressed raster data. This workaround causes (surprisingly) a hardly noticable slowdown for single-image and small gif animations. Decoding large animations however takes a bit more time now.

For those that want to take the risk of violating Unisys's patent policy (or those that have a valid LZW license), the XmNdecodeGIFProc resource has been added. One can use this resource to install an alternate gif decoding procedure and thus surpass XmHTML's workaround.

May 2
Released XmHTML/Alpha Version 1.0.18.

April 30
XmHTML will now always use any colormap provided for it (thru Core's XmNcolormap resource) instead of using the default colormap. It will also walk the widget tree to find a Shell (or a subclass of Shell) and use the visual provided for that Shell. XmHTML will only use the default visual if no Shell parent can be found. All of this also works for the XmImage type.

Modified the HTML comment detection routine in the parser so nested and bad HTML comments (dashes don't occur in a multiple of four) are properly dealt with.

April 28
Setting the XmNfreezeAnimations resource to True will now restart animations when they were previously frozen.
Added an additional IMAGE_GIFANIMLOOP type to XmHTMLImageGetType() when the image is an animated gif with the NETSCAPE2.0 loop extension.


April 27
Still busy rewriting the documentation: programming manuals for both XmHTML and XmHTMLParser. The XmHTML manual is halfway now.

Fixed a lot of minor bugs that I discovered when writing example code for the XmHTML programming manual:

April 20
Reverted integration of the htmlParserObjectClass. Too many problems and too many overhead involved.
Made a start with writing programming manuals for both XmHTML and HTMLParserObject.

Pretty cool news: added the XmImage type which allows using XmHTML's image reading capability to be used by other programs as well.

April 15
Moved XmHTML's parser into a seperate widget subclassed from Object. A standalone parser can now be created and configured using the standard X functions. Class pointer of this parser is htmlParserObjectClass.
The standalone parser is an Intrinsic widget which can be used without Motif.

Replaced XmHTML built-in parser with this HTMLParserObject (with surprisingly few modifications to XmHTML's interface).

April 10
A lot of enhancements to the parser: one can now create and use a standalone HTML parser for a number of purposes. Features include:

Modified the document verification/repair routines to use better defaults.

April 6
Released XmHTML/Alpha Version 1.0.17.

April 3
Fixed a problem with scrollbars when XmHTMLRedisplay was called: document length wasn't updated properly.

Fixed two problems related to documents with a body image: images serving as anchors should no longer disappear when scrolling and regular anchors (XmNanchorButtons == False) should now be rendered transparantly.

Anchors with mixed fonts are now rendered as a single anchor instead of separate blocks. Mixing images and text in an anchor doesn't work well.

Underlining and/or striking out of words with mixed fonts is now treated properly.

Released XmHTML/Alpha Version 1.0.16.

April 2
Delayed image loading now also works for the background image.
Added the XmHTMLFrameGetChild convenience function.
Fixed the SetValues method for enabling/disabling body colors and body images: the effect should be visible immediatly.

April 1
Fixed a problem related to color freeing with StaticGray, GrayScale, DirectColor and TrueColor visuals (colors got freed more than once for these types of visuals). Color freeing should no longer cause X Protocol Errors.

Fixed a number of things pointed out by Dick Porter:

Animations are now explicitly excluded as a background image. Image scaling now also works properly for delayed images. Finally fixed transparency for the default images.

March 28
Released XmHTML/Alpha Version 1.0.15.

March 27
The parser now calls the XmNparserCallback resource when installed. Added a new action field to the XmHTMLParserCallbackStruct which allows a user to select certain actions when a fault in a document is encountered. Warning messages caused by the document verification/repair routines are no longer displayed on screen but propagated to the XmNparserCallback instead.

Fixed a small bug in the text layout routines: text and images are now only centered or adjust to the right margin if their width doesn't exceed the available screen width.

The scrolling attribute on frames is now properly handled.

All action routines are now implemented and fully functional.

March 26
Frames are in. Not perfect yet but it certainly works! Fixed a few bugs that caused XmHTML to crash when the widget's Destroy method was called. Added the XmNframeCallback resource and XmHTMLFrameCallbackStruct callback structure.

Fixed a small bug in horizontal scrolling, text should no longer flow onto itself when there isn't a vertical scrollbar present. Fixed a small bug in refreshment if image anchors, images serving as an anchor should now always be selectable.

March 25
Bugfix in JPEG loading.
XmHTML now makes proper use of the core offsets: a XmHTML widget can now be a child of any Motif manager widget at any position.

March 24
Released XmHTML/Alpha Version 1.0.14.

March 23
Fixed a buffer overrun when converting preformatted text to a series of words.

Added the XmNmimeType resource: allows XmHTML to be used for documents of which the content-type isn't text/html. Mime types recognized by XmHTML are text/html, text/plain and a number of image mime type specifications.

March 21
XmHTML recognizes character escape sequences without a trailing ;. Character escape sequences in the alternate image description are now also expanded.

More improvements on document verification and repair: really bad HTML documents (numerous and consecutive misplaced elements) are now repaired in such a way that display is possible.

Animation support: the first frame of an animation now also uses the requested disposal method.

March 20
Completely rewrote the HTML parser: document verification and auto-repair of poorly formatted HTML documents has been added. Especially the latter is fairly powerfull. Features include detection and repair of overlapping elements, omitted list start tags and improperly nested font switches. It also includes auto-addition of terminators on elements for which a terminator is optional (dd, dt, li, p, option, td, th and tr). XmHTML can now also handle documents without the required <HTML> and optional <BODY> tags.

More work on the mixed text/image layout: vertical alignment attributes on images are now properly recognized and dealt with.
Released XmHTML/Alpha Version 1.0.13.

March 14
Again more work on animation frame disposal: both disposal methods (by background and by previous) now work with any background color or image. Animation support is almost fully completed, the only thing missing is the ability to immediatly restore composite animations that are scrolled off and back on screen.

Added a workaround for incomplete screen updates when scrolling full screen: the XmNrepeatDelay resource now determines the minimum time a key must remain pressed before scrolling continues.
Text colors are now also properly freed (and fixed a serious bug as well).
Also some work on example_2: added a global image cache and a per-document history stack.
Added the XmHTMLImageFreeImageInfo convenience function.

And last but not least, added PNG image support to the XmHTMLImageDefaultProc convenience function.

March 13
More work on animation support: all frame disposal methods are now supported.

And a lot of bugfixes:
Font stack is now properly reset when a new document is loaded; named anchors are now rendered in the current text color instead of XmNanchorVisitedForeground; no more color flashing when switching between documents that make heavy use of color-rich images; Images wider than the available screen width are no longer moved downwards; delayed images are now displayed in the correct dimensions when they are flushed to XmHTML and transparent XPM images are now truly transparent.

March 12
Colors allocated for images are now properly released when the images are freed.
Fixed X11 bitmaps. Updated all documentation.

March 24
Released XmHTML/Alpha Version 1.0.12 (documentation update).

March 11

XmHTML now supports Gif89a animated gifs (Netscape Loop Extensions as well as multi-image Gif89a files). Scrolling composite animations currently doesn't work as it should. Added the XmNfreezeAnimations resource.
Replaced the XmNimageDefaultProc resource by the XmHTMLImageDefaultProc convenience function.
All image reading routines now use a memory buffer instead of reading directly from a file. Text layout now considers text and images as the same object.
XmHTML now properly renders any alternate text if images are disabled. Modified the XmImageInfo structure again and renamed most of the convenience functions to more logical names.

Released XmHTML/Alpha Version 1.0.11.

March 5
XmHTML Developers mailing list is up and running, with 51 subscribers from the first day.

Many thanks to Brian Dowling and Simplicity Communications for offering me this valuable service. Thanks Brian!

Released XmHTML/Alpha Version 1.0.10.

March 4
Fixed a spacing bug in the text layout routines which caused words that shouldn't be glued together got glued together anyway. Added the animation support.

March 3
Added polygon and default shape imagemap support. Delayed Image Loading: XmImageInfo structure updated and three new convenience functions added: XmHTMLUpdateImage, XmHTMLReplaceImage and XmHTMLRedisplay.

February 28
A number of changes in the text-layout routines: words should now be glued together properly. Text colors are now preserved accross anchors.

Released XmHTML/Alpha Version 1.0.8.

February 27
More work on Imagemaps: support for external client-side imagemaps has been added but not tested (yet). Added the XmHTMLAddImagemap convenience routine. Added default images which are displayed when the XmNimageEnable resource is set to False or when an unsupported imagetype is encountered. Changed the XmHTMLAnchorCallbackStruct, please be aware of this!

February 26
Added client-side imagemaps; rectangular and circle shaped area types work well. Empty as well as combined anchors (both name and href in a single anchor) are now supported. Added the XmNimagemapCallback resource and corresponding callback structure.
Fixed a small parser bug which sometimes (only seen it once really) caused wrong text alignment. A lot of small bugfixes in anchor creation and selection. Removed the extra field in XmHTMLanchorCallbackStruct and added three new fields instead.

February 25
Modified color allocation to get an exact, close or substituted color. This produces *very* nice results. The background attribute on the body tag is properly honored, scrolling with an image as background is very smooth. Images can now also serve as anchors. Mixed text and image layout works but needs a bit more work.

February 20
Major News: image support is almost completely added and functional! The default image loading procedure supports X11 bitmaps, X11 XPM pixmaps, JPEG and GIF87a and GIF89a images, PNG is being worked on. This procedure should in theory work properly with every visual class, although only PseudoColor has been tested. Images with a width and height specification different from the real image dimensions are automatically scaled. I hacked this code in on two evenings, and I'm pretty proud of it.

The XmImageInfo section has been updated and contains some more information on image handling. For future animated image support, a few extra members have been added to the XmImageInfo structure itself.

I do owe John L. Cwikla a lot of gratitude for his small but very usefull XCC package!

February 18
Internationalization: the font loading scheme employed by XmHTML has been modified drastically and is much more robust now. Added the XmNcharset resource to allow specification of the ISO character set and changed the format of the XmNfontFamily and XmNfontFamilyFixed resources.
(pointed out by Valery Kravchuk)

February 13
Added support for the face tag on the font element, e.i. <font face="Helvetica,arial"> is now recognized.

February 11
Released XmHTML/Alpha Version 1.0.6.

February 10
Fixed a number of potential buffer overruns (suggested by Dick Porter).
Complete rewrite of the text layout routines. Interword and interline spacing is adjusted depending on the current font. Simplified the outlining and alignment adjustment routines.
Removed a number of internally unused structure members.
Changed anchor treatment: consumes less memory and is easier to use.
Second alpha release shipped.

February 6
Fixed interword and interline spacing when different fonts are mixed on a single line: lines do no longer overlap each other and font changes in the middle of a word are properly attached.
Indentation is now computed regardless of the current font.

February 4
Added code to support the BASEFONT element and updated the code that deals with the FONT element accordingly.
All shorttag elements are now recognized and dealt with properly by the parser (empty tags, empty closing tags, unclosed tags and NULL-end tags). XmHTML passes all example pages from the Dark Side of the HTML without even as much as a single hickup. Watch your browser choke on the test pages at the above URL ;-).

February 3
First bug reports are seeping in: fixed a bug in font loading routines, color releasing routines and unknown anchor types.
Updated the <li> element formatting to recognize the type and value attributes.
Removed default identation for preformatted text.

January 31
Released XmHTML/Alpha Version 1.0.5, first alpha release.

January 30
Fixed a bug with jumping to anchors: when jumping to the end of a document, the value of the vertical scrollbar exceeded the maximum allowable value.
Final preparations for the alpha release. We'll be shipping out any time now.

January 29
Reworked some of the anchor parsing/handling routines: anchor activation and anchor tracking callbacks are a little bit more efficient now.
XmHTML is now able to determine the type of URL referenced by an anchor: added the url_type field to the XmHTMLAnchorCallbackStruct.
Updated exposure handling after tests with Motif 1.2.0/X11R5.

Preparations for the alpha release: cleaned up the source and wrote a few examples demonstrating the use of XmHTML.

January 28
A lot of memory leaks have been fixed. Switching between documents with/without a <body> color specification seems to be working.

January 27
Fixed a serious bug with preformatted text: multiple newlines weren't recognized properly and thus were rendered wrong.

January 26
Added a SubstructureNotifyMask so we get notified when the widget is mapped on the screen for the first time. Text is now displayed properly if text is set directly on XtCreateWidget. This fixed a serious bug in SetValues which caused a BadWindow error when setting text on the widget before XtRealizeWidget was called.

January 25
Nested aligment is now recognized properly.
Changed the font routines to use a pointsize specification as mentioned in the documentation. Previously pixel size was used.
Linespacing for text with a font other than the default font is now correct.

Public request for XmHTML alpha testers posted on comp.windows.x.motif, comp.windows.x and comp.windows.x.apps

January 24
Screen redrawing finally done: only the exposed regions are now redrawn instead of the entire line of which the exposed region was part.
Preformatted text now also draws anchors correctly.

January 23
More work on horizontal scrolling: when scrolling to the left, text drawn previously in the margin is now properly erased. Horizontal redrawing to the right now takes the starting x position of the exposed region into account, instead of repainting the entire screen.
Preformatted text is now painted properly.

January 20
Enhanced the parser to insert closing elements on elements where they are optional (<P>, <LI>, <DT> and <DD>).
Finally got round to implementing preformatted text.

January 19
Scrolling: the widget now remembers it's current vertical text position when it is resized.
Removed left and right quotes from the list of punctuation characters.

January 17
Added the <TAB> element extension.
Fixed a number of memory leaks reported by dmalloc.
Fixed a bug in the parser which made it impossible to correctly detect elements with trailing spaces inside them.

January 16
Text outlining: bugfixes and few performance enhancements.
Added the <COLOR> tag extension.

January 13
Removed the XmHTMLCallbackStruct and replaced it with callback-specific callback structures: XmHTMLAnchorCallbackStruct, XmHTMLFormCallbackStruct, XmHTMLLinkCallbackStruct and XmHTMLParserCallbackStruct.
Added jumping to local anchors when a local anchor is pressed.
Added the XmNanchorVisitedProc resource.
More work on vertical scrolling.
XmHTML can now handle named anchors by itself (but it can be vetoed by the programmer).
Added the following convenience functions: XmHTMLGetAnchorId, XmHTMLScrollToAnchorById, XmHTMLScrollToAnchorByName, XmHTMLScrollToLine.
Enhanced HTML comment detection in the raw HTML parser.

January 12
Accelerated screen update when scrolling vertically. Horizontal scrolling needs a bit more work.
Nested lists are now rendered as they should: mixing ordered and unordered lists works.
Added the XmNenableOutlining resource: when enabled (default) all text of which the alignment is not explicitly set will be outlined.
Implemented the color tag for all elements mentioned in the extensions.

January 10
Horizontal scrolling works. Fixed scrollBar offsets when XmNmarginWidth/XmNmarginHeight is smaller than the width of a scrollBar. sliderSize and pageIncrement now reflect the percantage of hidden text.
Nesting of ordered lists and unordered lists now works when they are not mixed.
Changed the type of all positions from Position (signed short) to int. Documents larger than SHRT_MAX used to cause a wrap-around of their y-position.

January 9
Working on scrolling. Scrollbars are displayed according to the XmNscrollBarPlacement resource. Vertical scrolling works. Changed the linebreaking algorithm to eat multiple block elements without contents. Also a number of aesthetical changes.

I expect to have an alpha release by the end of this month. Things that need to be implemented before a release will be made are: preformatted text, support for a few image types and nested sorted lists.

If you want be informed when an alpha release becomes available, please send us a mail.

January 8
Added autosizing stuff: setting XmNresizeWidth and/or XmNresizeHeight now causes XmHTML to size itself around the document properly. Rewrote text alignment routines. Fixed a bug in the parser which caused an anchor not be recognized if the name contained the string ``name'' or ``target''.

January 7
Fixed text alignment for lines consisting of different text elements. Finished the text outlining algorithm: paragraphs can now be outlined properly, which gives pretty neat results.

January 6
Happy Newyear!

A lot of work and thought went into the render engine. The previous method proved to be very memory- and time consuming, but did have a lot of potential. After a lot of trial and error, the final method is a mix of the original rendering engine and the state machine approach, resulting a an even more flexible (read extensible) and less memory- and time consuming.
Changed XmNstringDirection to XmNalignment, which makes more sense. Added a description of the implemented HTML 3.2 extensions. Added the XmNparserCallback resource.

December 19
Changed rendering completely: a stream of paint commands is now generated whenever a document is loaded. The actual paint engine is represented by a state machine in which parts of the painting stream are poured whenever a screen update is required. This is much more flexible and faster than the previous setup, in which rendering was performed ``just in time''.
This state machine approach also allows for an easy implementation of forthcoming extensions such as the <OBJECT> tag and HTML math. It also offers considerable advantages for a (possible) conversion of the widget to an HTML editor widget, although that would require an integration of the raw HTML parser and paint stream generator.

December 18
Implemented proper rendering of all attributes on horizontal rules. Linefeed checking almost working properly.
Added the XmNinputCallback and XmNmotionTrackCallback resources and updated action routines accordingly (as suggested by Ricky Ralston). Added the track-motion and help action routines. Added the XmNworkWindow resource.

December 17
Rendering of anchors as buttons is now done properly and anchors wrapping around a newline are finally connected as it should: linebreaking algorithm finally working properly.
Added an outlining algorithm for blocks of plain text (this is for a future OUTLINE attribute on the <DIV> tag). This produces some very nice results!
Furthermore a number of cosmetic updates on rules, underlining, strikeout and anchor selection rendering. Updated the set-values method: almost all resources can now be set using XtSetValues.

December 16
More work on anchor selection: pressing an anchor now highlights that anchor; anchors that wrap around a newline are now redrawn correctly; anchor cursor setting/unsetting finally seems to be working satisfactory. Also added a target field to XmHTMLCallbackStruct to support the frame extension.
XmNarmCallback implemented. <HR> rules are now painted. Numbered lists with type=i|I are now being rendered for roman numerals upto a value of 4999. Simplified list indentation.
Corrected a few minor bugs that came up when testing multiple instances of XmHTML widgets.
Major news: added the XmNanchorButtons resource: anchors can now be rendered as pushbuttons instead of being underlined. Needs some more work though.

December 13
XmHTML begins to take real shape! XmNactivateCallback and XmNanchorTrackCallback completely implemented: anchor selection fully functional now. First real XmHTML tests by using it in XntHelp, and it seems to be working quite well!
Numbered lists with type=1|a|A are now being rendered correctly.
Fixed a number of major memory leaks and minor small bugs in format.c and the set_values method.

December 12
Solid and dashed underlines as well as strikeout are being drawn correctly. List indentation finally correct. All three types of bullets in <UL> are also placed correctly.
Punctuation characters have a special treatment now so they are attached to words where they should be attached.
Fixed a few bugs in the font switching routines; nested fonts are rendered correctly now.
First attempts at anchor tracking have some success, XmNanchorTrackCallback resource treatment partially finished.

December 10
Linebreaking algorithm works pretty okay. Horizontal alignment is now also treated correctly. Added the XmNstringDirection resource. Fixed a few bugs in format.c.

December 9
First success at text displaying! The paint routines now can display all sort of texts in the selected font and/or color. Added support for a future ``outline'' attribute on the <DIV> tag. The linebreaking algorithm needs a lot more work. Changed the XmNanchorTrackProc resource to a callback: XmNanchorTrackCallback (as suggested by Danny Backx).

December 6
ALIGN and VALIGN attributes recognized. Added a few extra attribute parsing routines. Optimized recognition for underlining, strikout and anchors: nested combinations are now treated ok. Checked and corrected a few memory leaks. Performed some robustness checks and corrected bugs detected from this testing.

December 5
List support added: indentation and the TYPE attribute are recognized as well as nested lists. Underline, strikeout and anchor stuff written. More work on font routines: nested font combinations are recognized and treated ok.

Posted very first announcement on XmHTML on comp.windows.x.motif and comp.windows.x.

December 4
First implementation of text formatting/painting. Font loading/switching routines written.

December 2
Initialize now calls the HTML parser, creates the widget and anchor cursor and calls the HTML formatting routines. XmNlinkCallback installed.
Prelimenary tests on widget creation and resource setting/changing performed succesfully.

November 28
First drafts of expose, layout, resize, set_values, get_values_hook, query_geometry, geometry_manager and destroy methods.

November 26
Enhanced the parser to allow strict checking of HTML documents against the HTML 3.2 standard. Added the XmNstrictHTMLChecking resource.

November 22
Changed the XmNfontSize resources to XmNfontSizeList. Added XmHTMLLinkCallback, XmNanchorTrackProc, XmNanchorTarget and XmNenableBody resources. Figured out how to use the XmRepType functions. ClassInitialize, ClassPartInitialize and Initialize methods written.

November 21
Public and private interfaces defined. Updated Widget interface definition.

November 20
XmHTML Widget resources, callbacks and action routines interface definition nearly completed (you're reading it now).

November 19
Made some performance enhancements to the HTML parser after testing. When compared to NCSA, our parser is almost twice as fast! (Loading and parsing a 230kb HTML file with 14126 elements takes 0.16 seconds. NCSA takes 0.30 and does not parse table elements).

November 18
Final HTML parser completed, performance tests started.

November 12
First draft of HTML parser.

©Copyright 1996-1998 by Ripley Software Development
Last update: September 1, 1998 by Koen