added eugtk examples

This commit is contained in:
2016-11-25 00:33:18 -07:00
parent 87a821e3da
commit c0b98b619e
877 changed files with 96872 additions and 0 deletions

42
eugtk/examples/test102.ex Normal file
View File

@@ -0,0 +1,42 @@
--# Custom animated buttons
include GtkEngine.e
constant docs = `<b><u>Custom Buttons</u></b>
You can create your own,
including animation!
`
constant ani_large = "thumbnails/dino_slo.gif"
constant ani_small = "thumbnails/dino_mite.gif"
constant win = create(GtkWindow,"border_width=10,position=1,icon=ani_small,$destroy=Quit")
constant panel = create(GtkBox,"orientation=VERTICAL")
add(win,panel)
constant lbl1 = create(GtkLabel)
set(lbl1,"markup",docs)
add(panel,lbl1)
constant box = create(GtkButtonBox)
pack(panel,-box)
constant btn = create(GtkButton)
set(btn,"label","Click Me!")
set(btn,"image",create(GtkImage,ani_small))
set(btn,"always show image",TRUE)
connect(btn,"clicked",_("Foo"))
add(box,btn)
show_all(win)
main()
----------------------------------------------------------------
function Foo()
----------------------------------------------------------------
Info(win,"OK","Thank you",
"<small>please click again sometime</small>",,ani_large,ani_small)
return 1
end function