[lazarus] KCL [was: About toolkits.]

Sebastian Günther sguenther at gmx.de
Mon Jun 28 05:57:06 EDT 1999


Michael Van Canneyt wrote:

> there is another project which has an IDE, completely OOP, built on top
> of GTK, so it IS possible.
> (although, it must be said, they are stuck on a (different) compiler bug alo;
> We're working to solve it.)

yes, this bug is quite nasty as I can't finish the new keyboard handling
code in the editor widget... ;-)


The 'official' announcement for this project (KCL) is planned to happen
very soon; but while watching this discussion here I couldn't resist to
make some comments _now_:
  We don't know which widget library (GTK, Qt) will be the best in the
long term; in Win32 and other operating systems it's still the best
(most efficient way; keeps the look and feel of this OS...) to use the
native widgets of this OS / GUI.
  Almost all of the existing GUI APIs are quite unsuited for most
applications, if you want to use all those benefits of object pascal
compilers like FreePascal or Delphi: Win32 is too low-level, in most
cases; GTK, although is _is_ OOP in a way, is too procedural (writing
GTK applications in FPC is possible, of course, but the source will look
quite ugly); Qt uses many C++ specific features, and it doesn't support
FPC specific stuff like properties, of course.
  IMHO, the only solution is to create a component library similar to
Delphi's VCL, which wraps this APIs but which doesn't rely on platform
or toolkit specific features.
  KCL tries to do exactly this: Currently, there are about 25 classes
for stuff like widgets, forms, dialogs, layouts, fonts, canvas and so
on. The only implementation available at this time is build on top of
GTK, the native Win32 implementation will be in a usable state soon, and
an implementation based on Qt will be added later this year.
  KCL does *not* try to be a VCL clone, although most classes are quite
similar to VCL's classes. The most apparent difference is the way KCL
does its layouting: As KCL is platform-independent, you are encouraged
to use special layout widgets where possible.

Expect the public snapshot (LGPL license) of KCL soon. I'm very
interested in your comments and reactions... ;-)

Another important thing to mention: The IDE build on top of KCL. It
isn't really an IDE yet, it looks quite similar to the current CVS
version of Lazarus: Menu bar, output window and a notebook widget which
holds the editor widgets. The most important difference to Lazarus is
this editor widget: It does _not_ use the GTK memo widget, it only
consists of a canvas and a ScrollBox. It already does syntax
highlighting (the SH is done on demand, so it is *extremely* fast), and
there are no known bugs in this SH implementation. The most important
editing keys are working, and a setup dialog for the keyboard shortcuts
will be added very soon.
As you can see, this IDE is in a quite early stage, but the speed of
development is quite high, I think. Together with KCL, it has everything
that Lazarus lacks of... (and vice versa, our IDE isn't capable of
calling the compiler yet)
I think we all know that there are not enough resources for two
FreePascal RAD IDEs in the long term. Probably it would be the best to
merge both IDEs in the near future; at least we should try to find
identical solutions for some common problems like project management, or
(more low-level) i18n and documentation.


- Sebastian






More information about the Lazarus mailing list