GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: a tiny graphical app kit for ruby
Homepage: http://code.whytheluckystiff.net/shoes
Clone URL: git://github.com/why/shoes.git
commit  70c2f91603cdd6b3323de35f36527753cb4505ca
tree    e77e0eb2d280a8024cd2a9e7c89de15ba710ffe4
parent  999c47ecd4612e77761f5f627406b97f2495de87
shoes / samples / simple-form.rb
100644 29 lines (27 sloc) 0.84 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Shoes.app :width => 320, :height => 420 do
  background "../static/menu-gray.png"
  background "../static/menu-top.png", :height => 50
  background "../static/menu-left.png", :top => 50, :width => 55
  background "../static/menu-right.png", :right => 0, :top => 50, :width => 55
  image "../static/menu-corner1.png", :top => 0, :left => 0
  image "../static/menu-corner2.png", :right => 0, :top => 0
 
  stack :margin => 40 do
    stack :margin => 10 do
      para "Name"
      @name = list_box :items => ["Phyllis", "Ronald", "Wyatt"]
    end
    stack :margin => 10 do
      para "Address"
      @address = edit_line
    end
    stack :margin => 10 do
      para "Phone"
      @phone = edit_line
    end
    stack :margin => 10 do
      button "Save" do
        Shoes.p [@name.text, @address.text, @phone.text]
      end
    end
  end
end