2016-11-25 00:33:18 -07:00

30 lines
850 B
Elixir

----------------------------------------------------------------------------
--# Yet Another Hello World! program
----------------------------------------------------------------------------
include GtkEngine.e
constant --[1] create the widgets;
win = create(GtkWindow,"border width=10,icon=face-laugh,$destroy=Quit"),
pan = create(GtkBox,"orientation=1"),
lbl = create(GtkLabel,"color=blue"),
box = create(GtkButtonBox), -- default is horizontal;
btn = create(GtkButton,"gtk-quit","Quit")
set(lbl,"markup",
"<b><u><span color='red'>Hello World!</span></u></b>\n\n" &
"This demos a simple window with\na label and a quit button.\n")
--[2] add widgets to containers;
add(win,pan)
add(pan,lbl)
pack_end(pan,box)
add(box,btn)
show_all(win)
main() -- enter main processing loop;