Friday, October 18th 2002
Added a hint to the requirements section that you need an older version oft GtkGLArea which is for GTK-1.
Tuesday, October 1st 2002
Thanks to the hint of Anthony Tekatch I found some compiling problems. The new version 0.7 fixes them.
Friday, January 4th 2002
Release 0.6 is out. I think I found the bug in CObject.Destroy. Additionally I changed all calles to <class>.Destroy; to <class>.Free;
The CDialog class was added.
Check out the GLWaves project. It is a rather long example how to write programs with GTKpas.
Tuesday, January 1st 2002
First of all: Happy New Year to all visitors of my project's homepage!
Second: Happy EURO € to all Euroland citizens!
This is the initial homepage for GTKpas. At the moment it is rather simple but should give a fairly well view regarding my project. Here you'll find some information how to use it and probably the most important thing: the sourcecode itself.

GTK, the Gimp Tool Kit, is a widget set for the graphical user interface. It is available for quite a lot platforms.

As usual for projects developed with/for Unix like operating systems (e.g. Linux) GTK is written in plain C. The ordinary plain C lacks the possibility of object orientated programming (OOP). But a widget calls for OOP, so the C implementation is a little bit ugly to deal with.

Making GTK available to Pascal programmers requires a translation of the C header files of GTK. This is available at the FreePascal homepage. Since those header files are a straight translation from C there is still no OOP included.

The idie of eliminating this lack lead to th founding of the GTKpas project. It is an OO wrapper for GTK. Each widget is represented by a class. The classes have relationships between each other (inheritance).

Programming a GUI is much more fun with GTKpas compared to direct usage of the GTK functions.

In addition to the standard GTK a wrapper for GtkGLArea namely GTKpasGLArea is available. These wrappers simplify embedding OpenGL drawing area in a GTK window.

Almost 20 examples explaining the usage of the GTKpas widgets have been taken from the GTK tutorial and translated to Pascal.

GTKpas is distributed under the terms of the GNU General Public License (GPL). You may freely download and distribute it as long as you supply the copyright information.

Hello World
Progress bar
Radio buttons
Range widgets
This program seems to have a problem at the moment so that the window is 1300 pixels wide. I don't want to show you an erroneous picture.
Spin buttons
Status bar
Wheel barrow

wheelbarrow demonstrates the use of windows with nonrectangular shape.


This is the program GLWaves which is a demonstration program for electromagnetic waves. It uses GTKpas for adjusting the wave parameters and GTKpasGLArea for the 3D OpenGL windows.

On this picture the main window (left) and three OpenGL windows (CWindow with an Add()ed CGtkGLArea) are shown. The top OpenGL window shows an elliptic polarised wave. Below the left window shows the polarisation ellipse and the right one the Poincare sphere visualizing the aptitude and ellipticity of the polarisation ellpise.


You can download the released files at the Release page.

To use GTKpas you need some prerequisites.
  1. FreePascal
  2. FPC GTK package
  3. FPC OpenGL package (only for GTKpasGLArea)
  4. GtkGLArea (only for GTKpasGLArea, Attention: Use an older version which is made for GTK-1 instead of GTK-2, gtkglarea5-1.2.3 workes fine for me)
  5. GNU make


The project page at SourceForge can be viewed here.


I would like to hear from you. Please send me an EMail to If you encounter problems, have any questions or find bugs, please feel free to contact me. I am interested in your comments, suggestions, ideas, so drop me a mail too, please.

When you want to help me completing GTKpas (see Todo) it will be necessary that I describe you the technique writing a wrapper class.


No, GTKpas is not ready yet. It is far away from being really ready. But it can by used in your own projects. In the source distribution there are included nearly 20 example programs. A complete project using GTKpas is GLWaves.

Things to do are at least:

  • check if the bug in CObject.Destroy is away
  • make the examples more OOP like
  • add the remaining wrapper classes
  • add the remaining examples from the GTK tutorial.
  • write documentation for all classes, methods and properties
  • find the bug in C[VH]Scale
  • find the bug in rangewidgets.pas example (huge window)
  • find why some examples SigSegV on exit.
  • find why some examples dont't exit when their window is closed
  • make a "Links:" section on the homepage for projects using GTKpas
  • find why CDialog doesn't free all memory

Get GTKpas at Fast, secure and Free Open Source software downloads Webmaster: Johann Glaser Valid HTML 4.01!
validate HTML 4.01
Valid CSS!
validate CSS