[Glade-users] How to draw automatons?

Michael Ekstrand mekstran at scl.ameslab.gov
Tue Jan 30 13:35:19 EST 2007


On Mon, 2007-01-29 at 21:03 +0100, Mariano Perez-Sauquillo Perera wrote:
> I wolud like to know if any of you could tell me if it is possible to
> get something similar to the picture in glade, because i am searching
> for info and i havent found anything usefull yet.
> The problem is that i would like to move in the automaton and see in
> the interface how it moves, something similar what UPPAAL, the program
> from where i get the idea do, but it has been done in java, and i
> would like to do something similar but in glade and C. I would like to
> be able to change the properties of each element (node or arrow) of
> the automaton, like color. Do you think it can be done? can any of you
> tell me some tips to do it? 

Glade is just a tool for building window/widget layouts for the GTK+
toolkit.  It does not do any drawing itself, nor can it be used to do
so.

What you're looking for is GTK+ and its backing libraries GDK and Cairo.
They will let you do all the drawing you want, much as you would with
any other graphical system.  You can use Glade to design your window
layout, with a DrawingArea where you want to draw your automaton, and
then use calls to the GDK (or Cairo, if you don't need to target GTK <=
2.6) API's to do your drawing.

- Michael



More information about the Glade-users mailing list