[Lazarus] What are "widgets" in lazarus?

Michael Schnell mschnell at lumino.de
Thu Jan 6 11:32:45 CET 2011


On 01/05/2011 02:47 PM, zeljko wrote:
> I'd say that widget = TWinControl (and others derived from TWinControl of
> course).
>
OK, but rater irrelevant regarding Lazarus.

Here "*Widget Type* = TWinControl + all handling of External Events".

Handling of External (Main Thread) Events means: allowing the main 
thread to do non busy waiting for something and being waked if something 
happens and execute the appropriate event handler.


Background:

If the program is not a command line tool, the main thread needs to be 
waiting nearly always and needs to be waked whenever something happens 
that needs attention.

Theses "external events" are scheduled by the GUI (key and mouse 
triggered events), inter-process or inter-thread communication, Timers, 
etc, you name it. They need to be queued, so that the main thread can 
handle them one after the other (see "TApplication.ProcessMessages").

As the GUI events is the by far most complex class of external events, 
and the GUI stuff is handled in the Widget Set code in the LCL, the 
other external events are dealt with, in theses files as well. 
(unfortunately) there is no common implementation of non-GUI external 
events that is used by multiple Widget sets. This makes the creation of 
Widget sets that are independent of an external widget set (such as 
Windows, GTK, or QT) a lot more difficult and less "compatible".

OTOH, FPGUI seems to succeed on this behalf.

-Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110106/e1b8791b/attachment-0003.html>


More information about the Lazarus mailing list