Generics in recent stable FPC is not capable of handling the same as I tried implement in generics library using old way with templates and macros. And fgl implements only very limited part of all generics staff. So for the record I had tried to to implement such library using fpc generics for past years but there was various compilation and implementation problems even with trunk version. I called this package as NativeGenerics http://svn.zdechov.net/trac/PascalClassLibrary/browser/Generics/NativeGenerics
I looked at your NativeGenerics. Looks good. You have clearly put lots of energy for it. I have understood that FPC's generic support is improving all the time so maybe the problems are gone.
I am only thinking that it may become duplicate and obsolete work when FPC's standard generics library gets improved.
Yes, fgl is limited but there is another effort for a standard generics library. I know nothing much about it, except that the design is good but there are currently no people working on it. Pity! A proper generics container library is sorely missing. This is one reason why Pascal is loosing popularity and not taken seriously by many people.
As you have skills and motivation for the library, you could maybe help with the FPC's library... (just an idea).
In mentioned CoolBar component implementation my task was not to create Delphi compatible component and I think LCL should not be try to be as much compatible as it can be. But rather go in own way and do multiplatform stuff much more generic and multiplatform than original win32 based Delphi LCL. Then there is no need to be compatible. Rather take all good from original VCL and make it better. It is work for VCL to LCL converter to do the job.
I agree that LCL must be more than a copy of VCL but Delphi compatibility is also important.
VCL compatibility is kind of the first step. The second step is to extend the existing components and create new ones.
LCL has improved some things beyond VCL already but some components are still completely missing, like this CoolBar.
My converter experiments prove that the "first step" is not completed yet.
What should the VCL to LCL converter do when there is no similar component in LCL? Should it create the component for you using some artificial intelligence methods?
However I think compatibility for one direction is enough, meaning that old Delphi programs should be possible to convert but new LCL features can happily break the compatibility. Otherwise it would restrict the design and development too much.
And my implementation is very basic and is used as multiple toolbars arranged side by side. Aim was to have "main big toolbar" with multiple little toolbars (bands) where every band can have visible flag turned on/off which can be toggled from menu by user and stored in registry as persistent.
Then somebody with heavy knowledge of VCL and LCL who have spare time should create TCoolBar from scratch to fit LCL.
Thanks for the permission to use your code which you gave in a mail. I am still thinking how to implement TCoolbar.
Now it looks better to inherit from TToolWindow, and Bands must be a TCollection because it must show in Object Inspector. Etc...
Regards,
Juha