vkrish at vkrish.cjb.net
vkrish at vkrish.cjb.net
Fri Nov 14 04:47:30 CET 2003
> Let me see if I understand your concern...
> >>wxWindows is a good library/framework indeed. But why do we need a
> >>pascal interface to it ? It adds too many layers to the whole system.
> >>eg: to create a button => pascal-layer->wxWindows->gtk+/motif/win32->window system window.
> How does LCL work- doesn't it abstract the widget set as well?
> LCL Button -> LCL Abstraction -> Widget Set -> Windows System
What is that LCL Abstraction ? It should read
LCL Button -> Widget Set -> Window system.
This is one layer less.
> Now, correct me if I am wrong- what is *exactly* the difference? My
> point of view is that by developing a wxWindows GUI, Lazarus would
> benefit from a mature and well organized abstraction layer- that is
> it. I know that I could build a wxLCL and offer it to the community
> sometime in the future. I just wanted to know why build yet another
> Window System abstraction layer when there is good, mature, stable,
> and fast options around. Many Python users, for instance, are moving
> away from their older GUI libraries/toolkits to wxPython.
Python and Object Pascal are different beasts.
> >>Do we really need these layers ? (wrapper wrapping a wrapper wrapping a
> >>wrapper !!!)
> >>OTOH, what we really need is an emulating toolkit atop the native window
> >>system (a la FLTK).
> Isn't FLTK something just like wxWindows? I mean, FLTK is just a toolkit
> and one would expect it to be much less complex than wxWindows, which is
> a full GUI framework. In the end, both come down to API calls so on the
> developer's point of view they'd be the same on a coding perspective...
FLTK is really light. It requires only basic window creation and a simple mechanism for passing events. It draws its own widgets. Moreover, the widgets are lightweight - they don't require native windows for widgets.
> > Or the foundation classes of Lazarus, LCL.
I have'nt looked at LCL so I can't comment on it. But if it is good/solid, people should get behind it and support it. Does it support automatic layout management ?
> The discussion is exactly about how LCL supports native widget sets.
wxWindows is a C++ framework - so its design is oriented towards it. Take a look at how event handling is done in wxWindows. Why should Object Pascal use its (rather ugly) event handling mechanism when it has a (relatively) beautiful mechanism in method pointers ?
If u r not convinced, try implementing the observer pattern (which is required by a general purpose event dispatch system) in C++ and Object Pascal and you'll be convinced.
More information about the fpc-pascal