Historical eugtk, Revision 122
Overview
EuGTK is a complete and up-to-date* Euphoria 4.1 wrapper for the GTK3 GUI (graphic user interface) for Linux, Windows, and OS-X. Euphoria 4.1 is required, earlier versions 3.x and 4.0 do not work.
- All GTK3 widgets are wrapped, and up-to-date with the latest version of GTK3 - currently 3.24.5, Feb 1, 2019). GTK is also one of the few GUI packages that is under continuous development and updating.
- Euphoria/GTK code is much simpler and easier to understand than similar libraries for other programming languages.
- EuGTK uses a pseudo object oriented approach, and many difficult or complex GTK3 functions (such as creating and using a ListView) have easier-to-use alternatives implemented in Euphoria. More than 250 test programs are provided as examples, along with ample documentation in html form to help you get up and running.
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.
Download
The latest EuGTK version can be downloaded from http://sites.google.com/site/euphoriagtk/Home
Platforms
EuGTK runs on Linux, Windows, and OSX. In most cases, the same source code can run on all three platforms without change.
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. Apparently, only 64-bit versions are now being maintained. A link to an easy Windows installer is included in the pdf which comes with the EuGTK package.
For OSX, you must install the gtk3 package with MacPorts
Installation
Simply open the .gz file, drag the 'demos' folder and drop it into your home folder (e.g. /home/irv/*demos goes here*).
Documentation
Extensive html docs are provided with the download, as well as more than 250 test programs which you can use to explore the capabilities of GTK3, and to copy/paste to make your own programming easier.
Simple, easy syntax:
Keywords
- create - declares a new, unique instance of a GTK object (a.k.a. 'widget')
- add - puts 'widgets' into container, sharing available space equally
- pack - puts 'widgets' into container, using only as much space as required
- show_all - instantiates created widget instances
- set - set one or more properties of a widget
- get - retrieve the value of a widget property
- main
- enters the GTK main loop,
- waits for user activity (called 'events')
- and calls your Euphoria function(s) which you have connected to those events
Capable of creating complex programs:
Above program, called BEAR (for Browse, Edit, and Run), edits and runs EuGTK programs, and is an excellent and productive web page html/css editor/viewer as well. This complex program is just over 900 lines of code, in only one file. The equivalent if written in C would involve dozens of files and thousands of lines of code. (Linux only at this time)
Drag & Drop Design
You can create your programs using any plain-text editor (WEE is recommended), or you can use Glade to design your user interface visually, then load the interface with just one line of Euphoria code!
Notes
In newer 64-bit versions of Linux, the GTK3 libraries are not in /usr/lib, but in /usr/lib/x86_64-linux-gnu/. These should be linked automatically, and found by EuGTK without a problem, but if for some reason they are not, you can make a symbolic link:
ln -s /usr/lib/x86_64-linux-gnu/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.
- diff to current revision, view current revision history, backlinks
- Last modified Mar 07, 2019 by irv