FpGUI

FpGUI

Infobox_Software
name = fpGUI

latest_release_version = v0.6
latest_release_date = 2008-02-18
operating_system = Unix/Linux/BSD (X11), Windows
genre = Widget toolkit
license = GNU Lesser General Public License
website = [http://opensoft.homeip.net/fpgui/ opensoft.homeip.net/fpgui/]

The Free Pascal GUI toolkit (fpGUI) is a cross-platform graphical user interface toolkit developed by Graeme Geldenhuys. fpGUI is free software (aka Open-source software), licensed under a Modified LGPL license. The toolkit has been implemented using the Free Pascal compiler, meaning it is written in the Object Pascal language.

fpGUI consists only of graphical widgets or components and a cross-platform 2D drawing library. It doesn't implement database layers, 3D graphics, XML parsers etc. It also doesn't rely on any huge third party libraries like GTK or Qt. All the extras come straight from what is available with the Free Pascal Component Library (FCL) which comes standard with the Free Pascal compiler.

History

The first version of fpGUI was written by Sebastian Günther back in 2000. The project was then abandoned in 2002. There were still a lot of things outstanding before the toolkit could be truly useful and used in real life applications.

Graeme Geldenhuys revived the toolkit in mid 2006 where Sebastian left off. He continued developing the toolkit for the next year. Merging three sub-projects (fpGFX, fpIMG and fpGUI) into a single project fpGUI. Graeme extended the amount of components and backend graphics layer and improving the overall toolkit. The supported platforms at that stage was Linux and FreeBSD via X11 and Microsoft Windows via GDI. After a few months Felipe Monteiro de Carvalho joined the development team adding support for Windows Mobile devices and extending the graphics support and design. Felipe also started working on Mac OS X support via Carbon.

Current

At the beginning of June 2007 Graeme found some major design issues in the source base. This prevented fpGUI from being truly useful in real applications. After numerous prototypes the fpGUI project was completely rewritten. Past experience helped a lot and new design ideas were implemented. The code base ended up being much simpler with a cleaner design. One of the major changes was that all widgets were now based on a multi-handle (windowed) design. Each widget now has a window handle. Other GUI toolkits that follow a similar design are GTK, Xt and FLTK to name a few. GUI toolkits that follow the opposite design are toolkits like the latest Qt [ [http://labs.trolltech.com/blogs/2007/08/09/qt-invaded-by-aliens-the-end-of-all-flicker#comment-15559 Trolltech Labs Blogs » Qt Invaded By Aliens — The End of All Flicker ] ] and MSEgui.

Example Program

The following program shows a single window with a "Quit" button in the bottom right. On the canvas (background) of the window it paints all the standard built-in images used with fpGUI.program stdimglist;

{$mode objfpc}{$H+}

uses Classes, SysUtils, fpg_base, fpg_main, fpg_form, fpg_imgfmt_bmp, fpg_button;

type

TMainForm = class(TfpgForm) private btnClose: TfpgButton; procedure btnCloseClick(Sender: TObject); protected procedure HandlePaint; override; public constructor Create(aowner: TComponent); override; procedure AfterCreate; override; end;

{ TMainForm }

procedure TMainForm.AfterCreate;begin SetPosition(100,100,700,500); WindowTitle := 'fpGUI Standard Image Listing';end;

procedure TMainForm.btnCloseClick(Sender: TObject);begin Close;end;

procedure TMainForm.HandlePaint;var n: integer; x: TfpgCoord; y: TfpgCoord; sl: TStringList; img: TfpgImage;begin Canvas.BeginDraw; // begin double buffering inherited HandlePaint;

sl := TStringList.Create; x := 8; y := 8; fpgImages.ListImages(sl); for n := 0 to sl.Count-1 do begin Canvas.DrawString(x, y, sl [n] +':'); img := TfpgImage(sl.Objects [n] ); if img <> nil then Canvas.DrawImage(x+130, y, img);

inc(y, img.Height+8); if y > Height-32 then // largest images are 32 in height begin inc(x, 200); y := 8; end; end;

Canvas.EndDraw; sl.Free;end;

constructor TMainForm.Create(aowner: TComponent);begin inherited Create(aowner); // Place button in bottom right corner. btnClose := CreateButton(self, Width-90, Height-35, 75, 'Quit', @btnCloseClick); btnClose.ImageName := 'stdimg.quit'; btnClose.Anchors := [anRight, anBottom] ;end;

procedure MainProc;var frm : TMainForm;begin fpgApplication.Initialize; frm := TMainForm.Create(nil); try frm.Show; fpgApplication.Run; finally frm.Free; end;end;

begin MainProc;end.

Here is a screenshot of the above program when run under Linux.

Licensing

fpGUI is statically linked into programs and is licensed using a modified version of LGPL specially designed to allow static linking to proprietary programs. The only code you need to make available are any changes you made to the fpGUI toolkit - nothing more.

Software written with fpGUI

* [http://www.mastermaths.co.za Master Maths]
Used in a computer based training system. As well as a basic accounting and administration package for franchisees.
* A Visual Form Designer which is now included as part of fpGUI. It allows the developer to create user interfaces at a much faster pace.

See also

* Widget toolkit
* Qt
* wxWidgets
* GTK+
* FOX toolkit
* FLTK

External links

* [http://opensoft.homeip.net/fpgui/ Official fpGUI website]
* [http://www.freepascal.org Free Pascal compiler]
* [http://lazarus.freepascal.org Lazarus IDE]
* A review of fpGUI appeared in the German programming magazine, [http://www.toolbox-mag.de Toolbox] , issue [http://www.toolbox-mag.de/archiv2008.html 3-4/2008] .
* Here is another small review of fpGUI. The review is in Hebrew and can be found at [http://idkn.wordpress.com/2008/05/20/fpgui/ http://idkn.wordpress.com/2008/05/20/fpgui/] . You can view a English version of the review, using [http://translate.google.co.za/translate_t?sl=iw&tl=en# Google Translate] . Simply enter the original URL and select Hebrew to English.

References


Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Look at other dictionaries:

  • fpGUI — Тип Библиотека элементов интерфейса (виджетов) Разработчик Себастьян Гюнтер, Граеме Гелденхуис Написана на Object Pascal Операционная система Unix, Linux, BSD (X11), Windows Последняя версия …   Википедия

  • Lazarus (software) — This article concerns the software IDE named Lazarus. For other uses of the name, see Lazarus (disambiguation). Infobox Software name = Lazarus caption = Lazarus IDE 0.9.25 Screen print (Linux, GTK1) developer = volunteers latest release version …   Wikipedia

  • Cocoa (API) — Cocoa Developer(s) Apple Written in Objective C Operating system Mac OS X Type Software framework …   Wikipedia

  • Cross-platform — For a type of interchange between different lines in a metro system, see cross platform interchange. In computing, cross platform, or multi platform, is an attribute conferred to computer software or computing methods and concepts that are… …   Wikipedia

  • Windows API — The Windows API, informally WinAPI, is Microsoft s core set of application programming interfaces (APIs) available in the Microsoft Windows operating systems. It was formerly called the Win32 API; however, the name Windows API more accurately… …   Wikipedia

  • XUL — Filename extension .xul Internet media type application/ vnd.mozilla.xul+xml Developed by Mozilla Foundation Type of format markup language In computer programming, XUL (pronounced …   Wikipedia

  • Motif (widget toolkit) — Motif Stable release 2.3.3 / March 19, 2010; 19 months ago (2010 03 19) Type Widget toolkit Website www.openmotif.org …   Wikipedia

  • Component Library for Cross Platform — (CLX) (pronounced clicks), is a cross platform visual component based framework for developing Microsoft Windows and Linux applications. It is developed by Borland for use in its Kylix, Delphi, and C++ Builder software development environment.… …   Wikipedia

  • Microsoft Foundation Class Library — Developer(s) Microsoft Initial release 1992 Stable release 10.0.40219.1 [1] …   Wikipedia

  • Object Windows Library — Developer(s) Originally Borland (now Codegear) Initial release 1991 Stable release OWLNext 6.30.9 / September 2, 2010; 14 months ago (2010 09 02) …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”