green-shoes extentions (plugin?)
- From:
- Régis d'Aubarède
- Date:
- 2011-07-25 @ 14:59
Hello,
Tonight (+6h) I will commit this extentions to green-sho :
Thank you to tell me comments and suggestions.
systray
=====
api:
Shoes.app do
systray do
syst_icon "smile.png"
syst_add_button "Edit configuration" do |state| edit_conf() end
syst_add_button "Execute Test" do |state| $win.show; update(true)
end
syst_add_sepratator
syst_add_check "Option" do |state| alert("Test checkButon:
" +state.to_s) end
syst_quit_button true
end
end
Thread
=====
api:
Shoes.app do
define_async_thread_invoker()
end
Thread.new { ... ; invoke_in_shoes_mainloop {
shoes instructions
} ; ... }
tiny embeded webserver
=================
api:
web_server 9990 do
"/" => proc {|app|
ret=[[1,2],[1,2],[1,2],[1,2]]
@ws.to_tableb(ret) { |a| [a[0]," : ",a[1]] }
},
"/show" => proc {|app| invoke_in_shoes_mainloop { $app.show_app }
end
sample
====
A sample which use all this stuff, in a tiny LAN supervisor ;)
by
--
- - - - - - - - - - - - - - - - -
__ ___ __ __
|__) |__ / _` | /__`
| \ |___ \__> | .__/
- - - - - - - - - - - - - - - - -
Re: [shoes] green-shoes extentions (plugin?)
- From:
- ashbb
- Date:
- 2011-07-27 @ 14:10
to Régis,
Thank you for your great work! I've merged your pull request on GitHub.
to all,
If you have time, try out the latest Green Shoes. :)
https://github.com/ashbb/green_shoes
Let's have fun,
ashbb