36 lines
988 B
Elixir
36 lines
988 B
Elixir
|
|
--# Glade version of test13.ex
|
|
|
|
include GtkEngine.e
|
|
|
|
add(builder,"~/demos/glade/test13.glade")
|
|
|
|
constant bob = create(GdkPixbuf,"~/demos/glade/user_icon.svg")
|
|
constant bobby = create(GdkPixbuf,"~/demos/glade/user_icon.svg",24,24,1)
|
|
set("image1","from pixbuf",bobby)
|
|
|
|
object order = {}
|
|
|
|
main()
|
|
|
|
-----------------------------------------------------------------------
|
|
global function on_button2_clicked(Button self) -- show order
|
|
-----------------------------------------------------------------------
|
|
Info("window1","Bob's Burgers","Your Order",flatten(order,'\n'),,bob)
|
|
return 1
|
|
end function
|
|
|
|
-----------------------------------------------------------------------
|
|
global function on_checkbutton_toggled(MenuItem self) -- update order
|
|
-----------------------------------------------------------------------
|
|
object item = get(self,"name")
|
|
if get(self,"active") then
|
|
order = add_item(item,order,ADD_APPEND)
|
|
else
|
|
order = remove_item(item,order)
|
|
end if
|
|
return 1
|
|
end function
|
|
|
|
|