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

49 lines
1.3 KiB
Elixir

----------------------------------------------------------------------------
--# Numerable Icons from ancient Rome (<i>really</i> deprecated)
----------------------------------------------------------------------------
include GtkEngine.e
constant docs = `<b><u>Numerable Icons</u> - </b>the ancient Roman version
<span color="red"><small>Numerable Icons are deprecated</small></span>`
constant win = create(GtkWindow,"size=200x100,border=5,position=1,$destroy=Quit")
constant panel = create(GtkBox,VERTICAL)
add(win,panel)
constant lbl = create(GtkLabel)
set(lbl,"markup",docs)
add(panel,lbl)
constant top = create(GtkBox,"orientation=HORIZONTAL,spacing=30,border=10")
add(panel,top)
constant f = create(GFile,"thumbnails/mongoose.png")
constant icn = create(GFileIcon,f)
object img = repeat(0,5)
object ico
object roman = "\xE2\x85\xA0" -- Roman numeral I
for i = 1 to 5 do
ico = create(GtkNumerableIcon,icn)
img[i] = create(GtkImage)
set(ico,"label",roman)
roman += {0,0,1} -- increment the UTF numeral;
set(img[i],"from gicon",ico,6)
add(top,img[i])
end for
constant
btn1 = create(GtkButton,"gtk-quit","Quit"),
btnbox = create(GtkButtonBox)
add(btnbox,{btn1})
pack(panel,-btnbox)
show_all(win)
main()