HTMLayout
Encyclopedia
HTMLayout is an embeddable layout engine
Layout engine
A web browser engine, , is a software component that takes marked up content and formatting information and displays the formatted content on the screen. It "paints" on the content area of a window, which is displayed on a monitor or a printer...

 for HTML
HTML
HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....

. Produced by Terra Informatica, it is given away free of charge (for both non-commercial and commercial use) but it is not free software
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

 and has some licence requirements.

Main purpose of HTMLayout is to support so called Web UI in desktop applications and yet to be embeddable.

History

HTMLayout is a plain C wrapper of h-smile layout engine used in other Terra Informatica projects, like Sciter and moSciter. It was first released on September 4th, 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. Host application may allow or discard any external request.
  • Application is allowed to extend 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:
  • Set of standard input elements in HTMLayout is significantly extended by specialized versions for
    • Integers numbers with spin buttons;
    • Floating numbers with spin buttons;
    • Currencies with special formatting like number group separators;
    • Dates;
    • Hierarchical lists;
    • Horizontal and vertical sliders
  • 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 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 presently 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, Bindings

Terra Informatica officially supports C SDK with reference C++ wrapper implementation. SDK contains examples of MFC and WTL host applications, examples of HTML markups, brief documentation.

Third party bindings include
  • Ruby binding HTMR by Victor Shepelev (not under development)
  • .Net 1.1/Managed C++ binding (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 third party HTMLayoutSpy tool available for Windows x86 platform. This tool does the same job as well known Microsoft Spy++, but for HTMLayout windows.

Support

Free support includes forums, both 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.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK