Historical eugtk, Revision 29

Overview

EuGTK is a Euphoria 4.0 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.9.9) June 15, 2015, 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. These are available from http://gtk.org on the downloads page.

For OSX, you must install the gtk3 package with MacPorts

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

-------------------------------------------------------------------------------------- 
-- Requisite Hello World! program uses markup to style label text; 
-------------------------------------------------------------------------------------- 
 
include GtkEngine.e 
 
constant docs =  
     "<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" 
 
constant icn = valid_icon_name( -- find a usable icon, 
    {"face-laugh", -- from the icon theme, if available; 
     "~/demos/thumbnails/mongoose.png"}) -- or from a file, otherwise 
 
constant win = create(GtkWindow,{ -- the main window 
    {"border width",10}, 
    {"position",GTK_WIN_POS_CENTER}, 
    {"icon",icn}}) 
    connect(win,"destroy","Quit") -- clean up after ourself! 
	 
constant -- here are the window contents; (a.k.a. 'widgets') 
    panel = create(GtkBox,VERTICAL),  
    lbl1 = create(GtkLabel), 
    box = create(GtkButtonBox), 
    btn = create(GtkButton,"gtk-quit","Quit") 
    
   -- add the contents to the window; 
    set(lbl1,"markup",docs) 
    add(win,panel) 
    add(panel,lbl1) 
    add(box,btn) 
    pack_end(panel,box) 
     
-- show window and all its contents;     
show_all(win) 
-- enter the GTK main processing loop; 
main() 

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

Search



Quick Links

User menu

Not signed in.

Misc Menu