[Lazarus] TTabControl reverted to it's old implementation

Graeme Geldenhuys graemeg.lists at gmail.com
Wed Jul 27 19:31:57 CEST 2011


On 27 July 2011 12:22, Martin wrote:
>
> Notebooks are CustomControls (haven't checked TTabedNotebook...)
> Tab/PageControl are Wincontrol

Ah.  I saw that TNotebook is custom drawn (not that there is much to
draw), but can't recall TTabbedNotebook. But I think you are right,
that both of them are probably custom drawn controls.


>> I simplified this whole tab/notebook mess in fpGUI. I have one
>> PageControl component.
>
> Do you have a difference between WinControls and none WinControls? Or
> actually do you have a need for it?

All widgets in fpGUI have window handles. Some widgets are built up of
multiple widgets (window handles) too.


> Anyway, in W32 (and probably others too) If I invalidate multiply rects of
> the same WinControl (a wincontrol has a handle in the OS) then the minimum
> bounding rect is invalidated => so I may end up painting more than actually
> required.

All painting in fpGUI is done via double buffering, so painting is
normally quite fast. But yes, some components are tweaked as composite
widgets (various areas have there own window handles) thus reducing
painting too.


> So it's a question if you have a very time-expensive paint handler, you may
> want to have more handles, and paint less

This is not always the case. Take Qt as an example. The used to be a
window-handle-per-widget framework, but after Qt 4.5 switched to a
single window-handle-per-window. They felt the latter gave them better
performance - I experienced the opposite in fpGUI.


-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net




More information about the Lazarus mailing list