fpGUI - a Free Pascal widget set

Author: Graeme Geldenhuys (graemeg at gmail dot com)
Last updated: 2010-08-02

The latest release is: version 0.7
Downloadable from SourceForge

This website has moved...

This website has moved to the SourceForge.net servers. That will now be the new official website for the fpGUI Toolkit project. Please update your bookmark links to point to: http://fpgui.sourceforge.net

fpGUI v0.7 (final release) is out.

The v0.7 release contains a lot of added features compared to the previous release. Below is just a small list of things that changed or was added (see the repository log for more details).

The pre-built HTML and INF class documentation will be made available during the next few days. This will include updated Class Documentation for fpGUI, FPC's RTL, FPC's FCL and a special version of FPC's Language Reference document in INF format. I will also include pre-built binaries of DocView (fpGUI's own help viewer) for Linux and Windows, plus intructions on how to integrate DocView with Lazarus IDE and MSEide so you can have context sensitive help from within each IDE's code editor.

For more information as to what is included in the v0.7 release, please see the change-log page.

Contents

Introduction


This is a status update of what is happing with the fpGUI project, for those that didn't follow all the newsgroup posts over the last month (June 2007).

At the beginning of June I started a total rewrite of fpGUI. Fixing design issues I found in the first attempt and basing the new code on a multi-handle design. Meaning every widget (component) has it's own window handle.

The old fpGUI code (single handle design) has been archived (tagged) in the repository under /tags/single_handle_fpgui The new code has replaced the old code completely and is now available in /trunk/src/

The reasons for the rewrite:
I tried to use fpGUI (old code) for a prototype application. To see what issues we might experience. eg: What is vital and still missing for real application use etc.. After all, that is what I want to use fpGUI for - real world commercial applications.

I found some major issues with the old fpGUI.

I started re-evaluating my thinking and design choices. I did a lot more research in other widget set implementations - especially cross-platform widgets sets. I also did a lot of reading about graphics libraries and widget set design. I can count on one hand how many widget sets decided to follow the one-handle-per-form route compared to the truck loads of widget sets that implement a handle-per-widget method. Surely there must be a good reason for their design choice?

As a result I thought I would take a step back, before I take another step forward. Questions need to be answered! Being a personal issue to me, I thought I would invest the time to answer these questions (at least for my own curiosity).

Where are we now?
As a result, I started implementing a new version of the fpGUI widget set based on the one-handle-per-widget design. Redesigned the whole event loop process, removing the TEventObj etc... After two weeks of working on a new prototype fpGUI, I came to the conclusion that the new design is much better! As such, I made the new prototype fpGUI the new default fpGUI codebase.


Features


Screenshots


Example of Layout Managers at work.

Fig.1: Example of the Layout Managers at work. Click to enlarge.
This is a screenshot of the old fpGUI, but layout managers will soon be supported in the new code base. The second top red block shows a BoxLayout in a horizontal orientation. Group Box 1 shows a BoxLayout in vertical orientation and vertical fill mode. Group Box 2 shows a BoxLayout in vertical orientation, but this time a centre fill mode - spreading the buttons and centering them vertically.



Components autosized to fit text.

Fig.2: Components autosized to fit new text. Click to enlarge.
A quick fake translation to demonstrate the autosize feature. Notice how the Label component increased in size and decreased the combo box next to it. Also notice how the right most button increased in width to allow for the larger caption. In the process the button to the left was moved horizontally to make space for the larger button, yet keeping the spacing between them constant.



Example of a custom style. Fig.3: Example of a very basic custom style. Click to enlarge.
A custom style has been applied to the form, changing the look of the Group Box components (single flat border line and underlined title) and a different Focus Rectangle. The rest of the components inherited the Windows Style.



Minimum size

Fig.4: Minimum Size of form Click to enlarge.
When resizing the form, the Layout Managers auto set the minimum size of the form, based on all it's child components and makes sure no clipping occurs.



fpGFX Bitmap Test

Fig.5: fpGFX Bitmap Test. Click to enlarge.
This was done with direct manipulation of the bitmap pixel data.



fpGFX Hello World

Fig.6: fpGFX Hello World test.
Painting directly onto the window canvas.



fpIMG Blitting Mask test

Fig.7: fpIMG Blitting Mask test. Click to enlarge.



fpGFX running on a WinCE device

Fig.8: fpGFX running on a WinCE device. Click to enlarge.
The first screenshot of fpGFX running on a WinCE device. Here it shows the Hello World demo in action.



fpGUI UTF-8 test

Fig.9: fpGUI UTF-8 test.
Paints correctly under Linux and any Windows 9x and up OS.



fpGUI Form Designer

Fig.10: fpGUI Visual UI Designer. Click to enlarge.
You can now visually design your forms. The designer saves the user interface code into a normal *.pas unit as if you created the form via code. It can also handle multiple forms in a single *.pas unit.



fpGUI File Open dialog

Fig.11: fpGUI File Open dialog. Click to enlarge.
The standard File Open dialog. The File Save dialog looks similar.


Source Code

Since 2009-04-04 the source code is stored in a Git repository on SourceForge. The old SubVersion repository will still be available for a week or two before it is disabled. You can get the latest code by executing the following command.

git clone git://fpgui.git.sourceforge.net/gitroot/fpgui/fpgui

The source can also be viewed online with your web browser. Use the following link: http://fpgui.git.sourceforge.net/git/gitweb.cgi?p=fpgui


Documentation

Most of the documentation are skeleton docs at the moment, created by fpdoc. A few units have already been documented and I should be able to complete all the documentation over the next few weeks.

NewsGroups

Due to SourceForge.net not being able to import my old message archives into the mailing list setup, and our company replacing a fault ADSL Router Modem, support is moved back to the News Server. I have tested the news server, and ask others to test it for me as well, and indeed it seems to have been the faulty ADSL Router that gave us all the timeout errors. Things are running smoothly again. Here follows the details for the News Server.

Server Name: opensoft.homeip.net
Port: 119

Available groups:
  fpgui.development Discuss development of fpGUI itself.
  fpgui.support Ask questions about using fpGUI.

For those behind a firewall, that can't access newsgroups. I have a web interface to the news sever at:
OpenSoft's WebNews


Bug Tracker

Bugs and Feature Requests can be submitted via the SourceForge Tracker. Please detail the steps to reproduce a software defect. If it's a painting issue, submit a small screenshot showing the affected area. Small example programs reproducing the problem can also help.
The tracker is located at the following address:
http://sourceforge.net/tracker/?group_id=182330


License

The widget set is under a Modified LGPL license (like Free Pascal's RTL). This means you can link dynamically or statically to fpGUI without releasing your code. Only the changes to fpGUI needs to be made public. This allows you to use fpGUI in commercial applications as well.


To Do List

We still have some missing features that were available in the old fpGUI, but things are moving fast. We already have components not previously available. Missing components will be a short lived issue.


Available components (and growing):
Outstanding features: