constant win = create(GtkWindow)-- one parameter required, rest optional
win will contain a pointer,
a.k.a. handle to the newly created widget.
First parameter is never a string
constant btn = create(GtkButton,"gtk-ok")-- one parameter required, rest optional
creates a button using the stock GTK "ok" button image
and text.
set(win,"title","Foo Bar"...)-- three parameters required, optional up to 8
sets(widget,"Property",value,...)
"Property" is always a string,
value(s) that follow may be string, pointer, or integer.
x = get(win,"default size")-- two parameters required
gets(widget,"Property")
x will contain the value of that property, which may be
a Eu sequence, e.g. {600,400}
connect(win,"destroy",quit,[data])-- three parameters required, optional forth
sets(widget,"signal",Response)
where Response is a Euphoria function
[data] an atom or integer to be
passed to the Eu function.
add(win,panel)-- two parameters required, second may be an array {child1,child2,...}
adds child panel to the container win
expands child to take up as much space as
possible, children will share space equally.
pack(panel,btn,[expand],[fill],[padding])-- two parameters required, second may be {array}, rest optional
adds child btn to container panel,
using only as much space as child requires.
adding a minus sign (-btn) will cause the child
widget to be packed at the end (bottom) of the container,
otherwise at the start (top).
[expand] BOOLEAN defaults to FALSE
[fill] BOOLEAN defaults to FALSE
[padding] INTEGER defaults to 0
show(win)-- one parameter required
shows the widget
show_all(win)-- one parameter required
shows widget and all children contained
within that widget.
hide(win)-- one parameter required
hides widget
hide_all(win)-- one parameter required
hides widget and all children contained within.
main()-- no parameters required
enter the main GTK event processing loop.
quit()-- no parameters required
kill the GTK event processing loop,
return to xterm (if run from a terminal)