TQTXWidget
The TQTXWidget class, defined in qtx.dom.widgets, is the fundamental ancestor for all visual controls in the Quartex Pascal DOM library. Think of it as the Quartex take on TControl or TCustomControl from Delphi or Lazarus. It is the mechanism that connects your object-oriented Pascal code to a live element in the web browser.
It provides the base functionality for everything a visual component needs:
- A reference to a DOM element (the Handle).
- A complete lifecycle from creation to destruction.
- A parent-child ownership system.
- Properties for position, size, visibility, and more.
- A powerful event-handling (delegate) system.
- A mechanism for CSS styling and theming.
A TQTXWidget's primary job is to act as a stateful, object-oriented wrapper for a DOM element, which is inherently stateless. It achieves this through a few core concepts.