eumandy/eugtk/examples/test32.ex
2016-11-25 00:33:18 -07:00

46 lines
1.3 KiB
Elixir

-------------------------------------------------------------------------------------------
--# Info dialogs; Numerous options allow customization
-------------------------------------------------------------------------------------------
include GtkEngine.e
constant win = create(GtkWindow,
"title=`Gtk Dialog`,size=200x100,border_width=10,position=1,$destroy=Quit")
constant tux = create(GdkPixbuf,"thumbnails/BabyTux.png")
set(win,"icon",tux)
constant panel = create(GtkBox,"orientation=VERTICAL")
add(win,panel)
constant lbl = create(GtkLabel,"markup=Click OK to open a <b><u>Custom Dialog</u></b>")
add(panel,lbl)
constant box = create(GtkButtonBox)
set(box,"layout",GTK_BUTTONBOX_EDGE)
pack(panel,-box)
add(box,create(GtkButton,"gtk-quit","Quit"))
add(box,create(GtkButton,"gtk-ok",_("Foo")))
show_all(win)
main()
-----------------------------------------------------------------------------
function Foo() -- use markup, custom button, and custom image in Info dialog;
-----------------------------------------------------------------------------
Info(win,
"About Penguins",
"\n<big><i>Penguins</i></big>",
`<small><span color='blue'>
(1) They eat little-bitty fish
(2) They live far, far away
(3) They aren't as small as you might think!
</span></small>`,{{"face-cool#_OK"}},tux,tux)
return 1
end function