Historical eugtk, Revision 44

Overview

EuGTK is a Euphoria 4.1 wrapper for the GTK 3 GUI user interface. Euphoria/GTK code is much simpler and easier to understand than similar libraries for other programming languages.

History

Built on an original concept by Dave Cuny, with help from Mike Sabal, Ron Tarrant, and others. It is currently maintained by Irv Mullins.

Platform

EuGTK runs on Linux, Windows, and OSX. The latest version (4.11.7) May 2016, makes it very easy to build complex GUI interfaces for your programs. Interface can be hand-coded or designed using Glade. In many cases, the same source code can run on all three platforms without change.

Latest version can be downloaded from http://sites.google.com/site/euphoriagtk/Home

On the Linux platform, EuGTK uses the GTK3 libraries which are installed by default with current Linux distros such as Mint or Ubuntu, etc...

EuGTK on Windows requires the appropriate GTK libraries for Windows, either 32-bit or 64-bit. Links to several versions are included in the pdf which comes with the EuGTK package.

For OSX, you must install the gtk3 package with MacPorts

EuGTK uses an object-oriented approach to coding. Below is a sample:

---------------------------------------------------------------------------- 
--# Yet Another Hello World! program 
---------------------------------------------------------------------------- 
 
include GtkEngine.e 
 
constant --[1] create the widgets; 
     
    win = create(GtkWindow,"border width=10,icon=face-laugh,$destroy=Quit"), 
    pan = create(GtkBox,"orientation=1"),  
    lbl = create(GtkLabel,"color=blue"), 
    box = create(GtkButtonBox), -- default is horizontal; 
    btn = create(GtkButton,"gtk-quit", "Quit") 
 
    set(lbl,"markup", -- style text; 
    "<b><u><span color='red'>Hello World!</span></u></b>\n\n" & 
    "This demos a simple window with\na label and a quit button.\n") 
 
    --[2] add widgets to containers; 
     
    add(win,pan) 
    add(pan,lbl) 
    pack_end(pan,box) 
    add(box,btn) 
     
show_all(win)  
main() -- enter main processing loop; 

Unix:

https://sites.google.com/site/euphoriagtk/test.png

Windows:

https://sites.google.com/site/euphoriagtk/testw.png

Raspberry Pi 3:

https://sites.google.com/site/euphoriagtk/tach.png

Trouble Shooting

Over on Linux/Mint and probably other Debian distributions, we see libgtk-3.0 is no longer installed to /usr/lib. This causes problems with the library. Until this is worked around you can modify the code so it finds the library, or you can put a symbolic link:

ln -s /usr/lib/*/libgtk-3.so.0 /usr/lib 

On Linux/32-bit, the latest eubins fail to work with this library. This is an interpreter problem and not a problem with the library itself. See ticket #933.

If the demos fail with cannot find test1.ex or something, it is because when the documentation says install to the home directory it really means you must install it there.

Search



Quick Links

User menu

Not signed in.

Misc Menu