Historical eugtk, Revision 40
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. 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()
Unix:
Windows:
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. You must also add a eu.cfg file to your home folder if you want to start EuGTK programs by clicking an icon in your window manager. When you write your own programs using EuGTK, you can set up paths in whatever manner you prefer.
- diff to current revision, view current revision history, backlinks
- Last modified Dec 16, 2016 by irv