eiffel-cd plugin for Liberty Eiffel

I’m working in the plugin eiffel-cd, a complement for eiffel-iup. eiffel-cd is a plugin for the CD library, a vector graphics toolkit with device independent output. With this plugin you will be able to draw into the canvas of your graphical applications. This is still not complete, but is about a 70%. I you want test the eiffel-iup library (the current git repository), now it depends on eiffel-cd. These plugins will let you write your graphical applications with Liberty Eiffel. Here an screenshot:

eiffel-cd

Second release of eiffel-iup

I’m glad to announce the second release of eiffel-iup. A wrapper that allow create graphical applications with Liberty Eiffel using the IUP toolkit. This second version add flat buttons and fix some errors. The main changes are in the names of some features, which now have names in the eiffel style. This is enough mature to create graphical interfaces. The package contains examples that show how use eiiffel-iup. So let me know if you have problems and Happy hacking!

First release of eiffel-iup

I’m glad to announce the first release of eiffel-iup. A wrapper that allow create graphical applications with Liberty Eiffel using the IUP toolkit. In this first release are available all the dialogues at IUP and all standard controls (except IupFlatButton). All controls has been tested, but not all its features. So, could be problems. But this is enough mature to create graphical interfaces. So let’s look at some screenshots of the examples that comes with this package. The image below show a simple editor with a tool bar that can be detached. Only one button works at that tool (the button to underline), the rest are just examples of buttons with predefined images at IUP stack.

eiffel-iup-1

The example number 5, show how use several predefined dialogues, as show the images below:

eiffel-iup-2

eiffel-iup-3

eiffel-iup-4

The same example show, in other tabs, the use of many other controls, like popups, combo box, sliders, calendars, spin box, splits and others:

eiffel-iup-5

eiffel-iup-6

Other example show how use a tree, an expander and a sbox:

eiffel-iup-7

To get an idea about how use this package, the image below show the code of a small app to display a dialog with a label and a button to close the app (you should insert the class IUP_INTERFACE):

my_example

You can download this first release here. So, let me know if you have problems, and wait for upcoming lessons on how to use eiffel-iup. Happy Hacking!

Liberty Eiffel wrapper for IUP toolkit

Since a couple of months ago I’m working in a Liberty Eiffel wrapper to the IUP toolkit. IUP is a multi-platform toolkit for building graphical user interfaces. This is still under development, but I think the current state is enough to start playing with it. Here some screen shots:

iup1

A small converter for inches and centimeters:

iup2

Currently you can use widgets like Windows (in IUP are called Dialogs), buttons, labels, radio buttons, text box, text views (called multi line), sliders, links, combo box, menus and a variety of containers. For the moment there are only four examples, but I will add more later. The example4.e show how create menus and use mnemonics and short cuts. Here some screen shots of this example:

iup4

iup5

To give you an idea about how is the use of this wrapper here an extract of the converter example shown previously:

iup-code

The project is hosted at notabug.org. So you can download it and start playing. Of course you should install first Liberty Eiffel and IUP.

First steps with Liberty-Eiffel

liberty-light

Well, after the release of Liberty-Eiffel as part of GNU I’m giving my first steps with Eiffel language. Some years ago I tried this language, but unfortunately I don’t found documentation in spanish. Now that I can read english, I will give me a try with this language. And, of course, I will also write spanish tutorials for upcoming users 🙂

The first thing I notice is a different terminology. An executable is called system and a set of classes is refereed as universe. The classes can be grouped in clusters into the universe. And the routines (operations) of a class, and its attributes, are called features. The routines are divided in functions or queries (which return a value) and procedures (which do not return a value). As opposed to C language, where we need a function named main, on Eiffel we can designate any procedure to start the execution.

But let start looking the example “Hello World!” that comes in the source tarball. First install Liberty-Eiffel, in my case I have the deb packages from Snapshots, because the stable packages for i386 are broken. The example is this, from — to the end of the lines are comments (I removed the original comments, but add others for explanation):

eiffel1

{ANY} mean that any other class can call this routine. In Eiffel we can limit the calls from certain classes. io is a class for input/output and the routine put_string write a message at default output. The source tarball, at work/eiffel.el, provide a major mode for Emacs. Save this program in a file with the name hello_world.e and compile this with:

se compile hello_world.e -o hello

In Eiffel is recommended have one class per file. The name of class capitalized and the name of the corresponding file in lowercase. Now run the executable:

./hello
Hello World.

Clap clap, our first program with Eiffel.

OK, here happened something magic. We don’t set any routine as the initial to start the execution. Liberty-Eiffel don’t implement 100% the ECMA standard in which, if the initial routine isn’t specified, is assumed it has the name make. So, I suppose in Liberty-Eiffel it is assumed to have the name main. But go ahead, Liberty use ACE files with the same purpose of makefiles in other languages. This is our ACE file for this example:

eiffel2

Again, from — to the end of the lines are comments. In cluster section there are two lines. The current directory, where is our file hello_world.e, and the paths of Liberty libraries, defined in loadpath.se. Save this file in the same directory of our source file, and with the extension ace, for example hello.ace: Now you can compile the program with:

se compile hello.ace

To clean the compile products, except the executable, use:

se clean *.e

And that is all for now. In next posts I will share other examples while I learn this interesting language. Regards 🙂