The Quartex Pascal dialect supports traditional object pascal events, the same that you find in Delphi, Freepascal, C and C++. These are used throughout the runtime-library for a plethora of reasons, and some widgets expect you to manually write event handlers for particular events.
The rationale for this has to do with how HTML documents deal with events, because in the DOM (document object model) events bubbles upwards until handled. If you click a button on a panel, the event actually fires on the background first, then on the panel and finally on the button.
This makes sense when you realize that you can have animations executing on multiple layers (like a Netflix menu which scroll both horizontally and vertically at the same time), layers which all need feedback from touch, mouse or pointer movement at the same time.
Easy to use
The Quartex IDE makes it very easy to deal with delegates. You can create and attach as many consumer delegates as you like to a widget. If you need 10 “OnClick” event handlers, that is not a problem. I have done my best to represent delegate consumers as close to Delphi as I could; in that you can select a widget, switch to the delegates tab, click the ‘Add’ button, pick the delegate you need – and the IDE will automatically insert a handler procedure for you. The IDE will also create the delegate consumer object automatically as a part of the constructor, so you don’t really have to think that much about it.
Widget developers can also create their own delegate provider objects via TQTXCustomDelegate.