Shoes is a very informal graphics and windowing toolkit. It's for making regular old apps that run on Windows, Mac OS X and Linux. It's a blend of my favorite things from the Web, some Ruby style, and a sprinkling of cross-platform widgets.
Shoes.app { button("Press Me") { alert("You pressed me") }}
require "shoes"Shoes.app :width => 450, :height => 400, :title => "Hello!" do banner "Hello Iron Shoes"end
require "shoes"Shoes.app :width => 200, :height => 200, :title => "Hello!" do @input = edit_line button("Say Hello") { alert("Hello #{@input.text}")}end
require "shoes"Shoes.app :width => 800, :height => 600, :title => "IronShoes everything sample" do flow :width => 800, :height => 600 do stack :width => 300, :height => 600 do link "CLICK ME" do; alert "HEY"; end link "GOOGLE", :click => "http://google.com" image "shoes-logo.png", :click => "http://code.whytheluckystiff.net/shoes/" @e = edit_line banner "Hello Iron Shoes" para "This is shoes...", strong("and another"), em("and a final one") button "Foo" do alert("Hello Foo") end button "Bar" do alert("Hello Bar") end button "Get Textbox Value" do alert(@e.text) end edit_box :width => 200, :height => 100 end
stack :width => 400, :height => 600 do banner "Banner" title "Title" subtitle "Subtitle" tagline "Tagline" caption "Caption" para "This is some more text" image "rails.png" para "Jimmy kissed", strong("Margaret"), "and I've saved a picture somewhere on", link("Flickr", :click => "http://flickr.com") end endend
To checkout the code for my IronRuby implementation of shoes you can download the zip file containing my demos from my Code Camp presentation.
Overall, the experience of creating a basic implementation of shoes with IronRuby was very enjoyable. While I did run into some problems, for the most part things went very smoothly. I created a basic calculator, a very ugly friendfeed client (since twitter was down), as well as the other basic examples shown here.
There is still a lot of API's available within shoes I'm not handling, as well as many things I'm not handling as well as I could so I'll likely continue to hack around on it a bit. WPF and Silverlight support would be nice (and very doable) as well!
Remember Me
Powered by: newtelligence dasBlog 1.9.6264.0
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
© Copyright 2008, Steve Eichert
E-mail