Skip to content

Instantly share code, notes, and snippets.

@jrgifford
Created December 20, 2011 15:55
Show Gist options
  • Save jrgifford/1502049 to your computer and use it in GitHub Desktop.
Save jrgifford/1502049 to your computer and use it in GitHub Desktop.
Shoes.rb test app
Shoes.app :title => "MAIN" do
background "#DFA"
para "Welcome to Shoes"
@s = stack do
@p1 = para "First"
@p2 = para "Second"
@p3 = para "Third"
end
button "Spawn" do
window :title => "CHILD" do
para self
end
end
edit_box do |e|
@counter.text = e.text.size
end
@counter = strong("0")
para @counter, " characters"
stack do
edit_line
edit_line :width => 400
end
stack :margin => 0.1 do
title "Progress example"
@p = progress :width => 1.0
animate do |i|
@p.fraction = (i % 100) / 100.0
end
end
image "http://hacketyhack.heroku.com/images/logo.png"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment