Programming with GtkAda

Some handy little things for GtkAda Newbies
Resources and examples related to the construction of
Graphical User Interfaces with GtkAda

Icon for a NEW product  Check out this GtkAda Reference Manual
(Many packages not listed in the Manual which comes with GAP)

This page is for people who are beginners with GtkAda.  It is a collection of resources, examples and helpful links.  Gadget and Walker are tutorials which take the beginner programmer into the mysteries of widgets.  They deal with the creation and use of a Graphical User Interface using buttons with icons and labels.

   Compilation Problems? - getting AdaCore's GtkAda to work on a PC
   GtkAda - creates GUIs
   Getting Executables - GtkAda for PC (Sources for other O/S)
   Access - getting GtkAda for your machine
   Gadget - Building a Compound Widget with GtkAda
   Walker - Working with a Multi-button Keypad in GtkAda

 

GtkAda gives Ada a GUI

One of the criticisms of Ada is that "You can't do graphics in Ada!"  The response is, "Tell that to the people who write all those avionics programs!"

GtkAda allows the Ada programmer to create sophisticated Graphical User Interfaces.  It takes a bit to get to know.  GtkAda programmers get a lot of typing practice, but the results are worth it.  GtkAda gives the programmer a quality interface without stepping outside of the safety of a secure and standardised language.

That is getting the best of both worlds

Top
Home

 

Getting GtkAda Executables for PC

Contact and get registered with the GNAT Academic Program run by AdaCore. Then you can download the GAP Package which includes a quality Integrated Development Environment complete with compiler and support packages including Win32 and GtkAda. The best advice is to download and install the lot using the default installation settings.

GAP supplies source code for all these packages for compilation on other operating systems.

Top
Home

 

Getting AdaCore's GtkAda Download to Work on a PC

There have been, to date, some problems getting the GtkAda download for PCs from the GAP Academic Program to work.  With a lot of help from the AdaCore people "Getting GtkAda Going" will get the system working properly.  Print a copy of this to find out how.

For those using GAP's GPS 2009 Integrated Development Environment, sample Project Files are available below.  If you are using Gprbuild, you will also neeed the configuration file "config.adc" in the same folder as the GPR file.

Download GettingGtkAdaGoing.pdf
Download ForGnatmake.gpr
Download ForGprbuild.gpr

Rename this file "config.zip".
Download Config File - unzip it into the working folder

Top
Home

 

Gadget: Building a Compound Widget with GtkAda

This article traces a learning experience.  It is intended to save GtkAda newcomers from some of the pain they might experience in learning how to use this package.  It traces the construction of a compound widget in verbose format with comments on the actions of parameters, what they do and what the options are.

Gadget will not actually do anything.  This is an exercise in making the composite widget appear the way it is planned.  It is almost certainly not perfect - merely an attempt to help.

Download Gadget.pdf

Warning:  Either read this document from Adobe or print it in colour.
Some of the diagrams will drive you nuts otherwise.

Rick Duley

Rick Duley has a First Class Honours Degree in Computer Science from Edith Cowan University in Perth, Western Australia (1996).  Currently out of the University environment he prefers working in Occupational Safety and Health in the Mining and Construction industries.  He calls producing this sort of stuff 'recreation'.

Top
Home

 

Walker: Working with a Multi-button Keypad in GtkAda

Many, maybe most, Graphical User Interfaces (GUIs) use buttons.  They appear on their own, they appear in rows, sometimes they appear in keyboards.  They have text labels, they have icons.  They are one of the usual means of GUI control of an application.

In this exercise you will create in verbose Ada code a keyboard of four buttons, set them with icons instead of labels and make them move the GUI around in the screen.

Download Walker.pdf

Warning:  Either read this document from Adobe or print it in colour.
Some of the diagrams will drive you nuts otherwise.

Top
Home

 


Outlook Express Logo
© Ada Safe House, Western Australia, 2009