[Lazarus] What are "widgets" in lazarus?

Graeme Geldenhuys graemeg.lists at gmail.com
Wed Jan 5 15:12:46 CET 2011


Op 2011-01-05 15:23, Bo Berglund het geskryf:
> So basically a widget set is a definition on what kind of graphics
> environment is used on the target system then?

Correct. As standard, Windows only has the WinAPI (GDI etc), and Delphi's
VCL is a wrapper for that API. Under Linux you have more choices of GUI
toolkits. Linux's GUI is provided via X11 (Xorg-XServer) and the most
common library used to talk to X11 server is XLib. This all comes standard
with Linux (desktop and most embedded systems). Qt, GTK, fpGUI etc are gui
toolkits built on top of that, talking to Xlib (Qt and GTK also talk to
Cairo, yet another graphics layer on top of Xlib).  Gnome and KDE are
"desktop environments" (the desktop you see when you boot Debian or Ubuntu
into a gui mode - and their application are based on GTK2 or Qt GUI
libraries respectively. LCL is another layer on top of that - a wrapper for
GTK2, Qt, Win API etc...  This is where LCL's bigger dependency comes from.
fpGUI and MSEide talks directly to Xlib (under linux, unix etc) or Windows
GDI (under Windows and WinCE).


> What about making a program for Linux? Do we have to compile the same
> program in different versions for different desktop managers on Linux?
> Like one for Gnome, another for KDE and yet another for X???
> Sounds mighty tedious and error prone...

Most linux distos for desktops (not embedded systems) come standard with
the various runtime libaries. So even though you use Ubuntu and Gnome as
you desktop, you can still run KDE applications under Gnome or Gnome/GTK
apps under KDE. If you want improved desktop integration with the desktop
environment, then it might be better to compile your apps for that specific
gui library (Gnome/KDE).


> The embedded card is a touch panel from Technologic Systems
> (http://www.embeddedarm.com/products/board-detail.php?product=TS-TPC-7390#),
> which runs an embedded version of Debian Linux, I believe.

As Henry mentioned, that website lists the core X11 server as included, and
also mentions that Qt-Embedded runtime library is included. So that leaves
you with an Qt-Embedded or Xlib based gui toolkits (GTK1/GTK2 was not
listed, but you might be able to install that yourself).

Note though that if you are creating commercial apps with Qt, you need to
purchase a license (+-3500 US dollars per developer - last time I checked).
fpGUI and MSEide are free, even for commercial apps.

As for doing drawings, graphs etc as you mentioned - that is all possible
with Qt-Embedded, fpGUI and MSEide. Just to be clear, the latter two can
also be used for desktop apps, they are not limited to embedded devices.

Regards,
  - Graeme -

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





More information about the Lazarus mailing list