HTMLayout
HTMLayout is an embeddable layout engine for HTML. Produced by Terra Informatica, it is given away free of charge (for both non-commercial and commercial use), but it is not free software and has some licence requirements.
The main purpose of HTMLayout is to support a so-called Web UI in desktop applications and yet to be embeddable.
History
HTM Layout is a plain C wrapper of the h-smile layout engine used in other Terra Informatica projects, like Sciter and moSciter. It was released on September 4, 2003 and has been under permanent development since.
Design goals
HTMLayout is unique among other layout engines by its design goal - a completely embeddable HTML/CSS engine. "Embeddability" of the engine implies following:
- Simplicity and transparency of embedding; e.g., on Windows to embed HTMLayout is a simple matter of three lines of code;
- It operates in windowed and windowless modes;
- Downloading of any external resource from the Internet happens after notification of the host application. The host application may allow or discard any external request.
- An application is allowed to extend the HTML vocabulary by adding new types of elements and/or to define behaviors of such elements - to define how DOM elements react on UI events and even how these elements are rendered (painted).
Standards compliance
HTMLayout supports a dialect of HTML. It has some problems with rendering certain non-compliant HTML markup (such as LI tags outside of lists), which could be seen as a negative, albeit minor. Its purpose is not to be a full-featured web browser, but to be a small embeddable engine, which it does adequately. This means:
- The set of standard input elements in HTMLayout is significantly extended by specialized versions for
- Each DOM element can be extended by the host application by supplying so called behavior - named set of event handlers implemented in code of the application. The behavior may define how DOM element is reacting on mouse, keyboard, focus, paint events or even custom events raised by other behaviors. Behaviors are assigned to DOM elements declaratively - by using the behavior CSS attribute.
- CSS in HTMLayout is extended to support such features of modern UI as:
- Flex length units in CSS that allow to define flexible layouts with flexibility in horizontal and vertical dimensions.
- Animation, e.g., some <img> element may have transition:blend defined in CSS to present blend animation between two states;
- Drag-n-drop, e.g., CSS definition div {accept-drop: selector(ul.cart>li);} declares that the DIV element accepts drops of LI elements residing in ul.cart containers only.
- Implementation of CSS selectors is much more complete than in usual web browsers.
Platforms
HTMLayout is available for Windows NT/XP/Vista, including 64-bit variants, and also Windows CE and Windows Mobile. Linux support is planned, but not yet available.
SDKs and bindings
Terra Informatica officially supports a C SDK with a reference C++ wrapper implementation. SDK contains examples of MFC and WTL host applications, examples of HTML markups, and brief documentation.
Third-party bindings include
- Ruby binding HTMR by Victor Shepelev (not under development)
- .NET 1.1/Managed C++ binding[3] (not under development)
- .NET 2.0-3.5/C# binding by Roman Akopov as a part of general purpose Nabu Library, Nabu.Forms.Html project. Supports all platforms, however mobile is known to be beta (end-of-life due to lack of interest).
- Java binding is under development.
Also, there is the third-party HTMLayoutSpy tool available for the Windows x86 platform. This tool does the same job as the well-known Microsoft Spy++, but for HTMLayout windows.
Support
Free support includes forums in English and Russian. For large-scale development, the company offers support contracts for a fee (per developer). A competent programmer can most likely manage with the accompanying documentation, which is sufficient to most tasks.
References
External links
|