[fpc-pascal] GUI application sample for windows and linux

Graeme Geldenhuys graemeg.lists at gmail.com
Wed Aug 6 10:17:39 CEST 2008


On 8/5/08, Osvaldo Filho <arquivostcf at gmail.com> wrote:
> Hi, i need a sample of an application with this:
>
> One form
> One button with an event, the event: showmessage('Hello, my name is: '+
> button.name)
>
> The application to be need cross plataform for windows and linux and not use
> gtk, gtk2, qt or fpGui.


That is not a trivial task!  For example: fpGUI talks directly to GDI
(windows) and XLib (Linux & FreeBSD). The make the whole process
"cross-platform" for the users of fpGUI, you have to abstract all
drawing and painting calls to abstract classes. Override/Implement
them for specific platforms. Then place a platform neutral interface
over those. Plus you need to handle OS events, the event loop and
application events in a cross-platform way....  Now the developer can
use the platform neutral classes to design there applications and not
worry about the platforms specific backend.  A huge task which I have
been busy with for the last 1.5 years in fpGUI.

It's simply easier to use one of the existing cross-platform
solutions. The ones I know of that are implemented in Free Pascal are:
fpGUI, MSEgui and Lazarus.  Or if you are not happy with any of those
and you are up to the challenge and you have A LOT of spare time, then
start implemented you own cross-platform GUI toolkit.  :-)

Good luck!

Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the fpc-pascal mailing list