Monday, January 28, 2008

Native widgets vs GUI toolkits

When developing cross-platform applications we have a basic decision to make: use a wrapper like wxWidgets (C/C++) or Lazarus/LCL (Pascal) or use a GUI toolkit like FLTK (C/C++) or fpGUI (Pascal). The wrapper relies in the underlying API of the host desktop environment (Win32, Mac OS X, GTK+, X11, Motif, etc) in order to draw its widgets; the toolkit draws the widgets by itself, emulating the native GUI.

There is a very interesting thread about this topic on Lazarus mailing list.

2 comments:

Anonymous said...

The awesome thing of GUI Toolkits like fpGUI, is that you have complete control and more importantly, it is consistent across platforms. This greatly eases the job of the developer - no more IFDEF Linux, IFDEF MSWindows etc.. in you applications.

We started off with Lazarus LCL, but needed our application to use some corporate styling/theming. Some styling only worked under GTK, some only under Win32. This drove us nuts, and the Lazarus developers simply said I'm trying something that isn't native behaviour. A few components also behaved different on each platform - this made it really hard for use to develop with and even harder for the users to use, when they switch between a Linux and Windows system.

Ok, so Lazarus's design goals was clearly different to what we needed, hence I started the fpGUI Toolkit, which is working great for us. I think of fpGUI as a early version of Qt, but implemented in the brilliant Object Pascal language. We still use the Lazarus IDE, just not the LCL. fpGUI also includes a basic visual forms designer, so we can still created form layouts with ease.

Anonymous said...

I am currently porting my Delphi application to Lazarus completely and to put it mildly I am having terrible time. My main problem is integrating HASP HL security tool with the application. Hasp HL uses object files like dll to hide functions and procedures. However, Lazarus doesn't seem to recognize the obj file's syntax. I even try to write wrapper class, but that doesn't work either. I am not sure if I wrote the wrapper class right.

Any help will be appreciated.