EuGTK

EuGTK -An easy-to-use cross-platform GUI Library

EuGTK is a very complete, up-to-date cross-platform 'toolkit' for creating your own GUI programs using GTK3 and the Euphoria programming language on Linux, Windows™ and OS X™. Unlike most available languages and libraries, Euphoria and EuGTK allow you to program in plain concise English words.

Introduction:

Euphoria is a fast interpreted language (several times faster than Python, for example), free and open source, with options to 'bind' your source code with the needed run-time code, which makes programs run faster, 'shrouding' your code so it can't be modified, or automatically translating your Euphoria code into C, and then compiling it to an executable, which runs even faster.

There's no tricky syntax to get in the way. Programs can be written quickly, and tested instantaneously, without the hassles of multiple source files, makefiles, compiling, etc.

Euphoria and the EuGTK library are free to use (GPL3) for any purpose. Extensive html docs - pretty much a complete book on GTK programming with Euphoria - are included with the downloads. Please take the time to read them!

How it works:

Euphoria (when not using a GUI) runs in text mode in a terminal; EuGTK adds a GUI, which can be built manually, with simple code.. No tricky sizing or layout code is required, and all that crazy type-casting you have to do with other programming languages doesn't exist! In addition, EuGTK provides 'wrappers' around several of the more difficult-to-use Gtk widgets (e.g. GtkListView) which makes them much easier to use.

Coding:

Any plain text editor works (vi, emacs, gedit, geany, etc.) Syntax color coding files and instructions are included for several of the more popular editors.

Pete Eberlein's excellent cross-platform editor, written in Euphoria for Euphoria programmers, uses EuGTK for the Linux/OS X GUI. Download it here: WEE Euphoria IDE

If you prefer, Glade can be used to visually design your program's user interface, which EuGTK can then load with just one line of code! As you must do with Visual Basic, Delphi, etc... you will then write Euphoria code to respond to user actions (signals).

Platforms:

Linux is the native platform for GTK. The needed GTK3 libraries are usually installed as part of the distro, or can be added with a simple apt-get command. No setup is required, just drag the demos folder from the .gz, and drop it into your home folder. I currently prefer Mint Linux.

Windows: I have tested EuGTK with Windows 7 and Windows 10 with the 64-bit version of the Gtk libraries for Windows. Instructions for downloading the necessary GTK libraries for Windows are included. The latest Gtk 3.22 library for Windows works very nicely, but is only available in 64-bit versions.

OS X is also reported to work. I don't have a computer to test this with, but others have reported success.First, install MacPorts, and then the GTK3 library with this command: sudo port install gtk3 That should eventually install the GTK3 library to /opt/local/lib/libgtk-3.dylib.

Raspberry Pi: I've had good results running Euphoria on the Raspberry Pi, a cheap ($37.) and tiny computer running Linux (Raspbian or Ubuntu).

Cross-platform Source Code: EuGTK will automatically detect and use the appropriate libraries. Many programs can be run on all platforms without any changes. Programs which access files will need the file paths to be specified for each platform.

Installation:

  • Download and install Euphoria 4.1 Beta 2

  • Download EuGTK 4.15.2

  • Download the GTK3 Docs (You will need these!)

  • Click on the downloaded EuGTK file to open it with your archive program

  • Drag the demos folder into your home folder, e.g. /home/your_name or C:\Users\your_name

  • Read the html documentation - it's in the ~/demos/documentation folder

  • Associate *ex files with the Euphoria run-time, e.g. /usr/bin/eui

  • Click on any of the test programs. If nothing happens, open a terminal and try to run from there.


Note: errors may be presented in the terminal about missing libraries or coding errors. When developing programs or having problems, test run your programs from a terminal (xterm or similar in Linux, cmd.exe on Windows)