Shoes.app do #para "Text ", link(''), "without crashing!" para "Text ", span('', underline: true), "without crashing!" end #Shoes.app do #arc 210, 210, 200, 200, -0.0, 4.71238898038469 #10.times do |x| #line 100 * x, 0, 100 * x, 1000 #line 0, 100 * x, 1000, 100 * x #end ##@p = para "Text", link("Boo") { alert("Yo") }, "More Text" ##button "ok" do ##@p.hide ##end #end #Shoes.app do #@main = stack do #@i = image File.expand_path("~/.hacketyhack/pics/flower.jpg"), width: 100 #@i.click do #@i.hide #alert "BOO" #end #@p = rect 100, 100, 100, 100 #@p.click do #@main.clear #end #end #end # #Shoes.app(resizable: false) do #@what = "Boo" #alert @what #shape do #background green #stroke blue #rect 10, 10, 10, 10 #@what = "Foo" #end #shape #alert @what #end #class W1 < Shoes::Widget #def initialize #para 'Hello' #end #end #class W2 < Shoes::Widget #def initialize ##w1 #para "There" #edit_line #secret: true #end #end #Shoes.app do #w2 #end #Shoes.app do #@main = stack do #@i = image File.expand_path("~/.hacketyhack/pics/flower.jpg"), width: 100 #@i.click do #@main.clear #end #end #end #Shoes.app do #@page1 = button "home", left: 20 #@page1.click do #homepage() #end #@page2 = button "logout", left: 200 #@page2.click do #specialpage() #end ## build the interface #@main_panel = stack do #title("I AM JUST A TITLE...", #top: 100, #font: "Trebuchet MS 20px", #align: "center", #stroke: black) #end #def homepage() ## clear the panel #@main_panel.clear ## add function buttons #@main_panel.append do #title("FLO Rollover Job:", #top: 100, #font: "Trebuchet MS 20px", #align: "center", #stroke: black) #flow(top: 150) do #stack(width: 150, left: 20) do #@add_user = image File.expand_path("~/.hacketyhack/pics/flower.jpg") #@add_user.click do #alert("a") #end ##hover do ##@add_user.displace(-5, -5) ##end ##leave do ##@add_user.displace(0, 0) ##end #end #stack(width: 150, left: 190) do #@add_item = image File.expand_path("~/.hacketyhack/pics/flower.jpg") #@add_item.click do #alert("b") #end ##hover do ##@add_item.displace(-5, -5) ##end ##leave do ##@add_item.displace(0, 0) ##end #end #stack(width: 150, left: 360) do #@add_question = image File.expand_path("~/.hacketyhack/pics/flower.jpg") #@add_question.click do #alert("c") #end ##hover do ##@add_question.displace(-5, -5) ##end ##leave do ##@add_question.displace(0, 0) ##end #end #end# end of flow #end #end #def specialpage() ## clear the panel #@main_panel.clear ## add function buttons #@main_panel.append do #title("I AM JUST A TITLE...", #top: 100, #font: "Trebuchet MS 20px", #align: "center", #stroke: black) #end #end #end # end of file ## #Shoes.app do #l = line(10, 10, 100, 100) #@p = para l.style[:point_a] #button "change the line!" do #l.point_a = Shoes::Point.new(50,50) #@p.replace l.style[:point_a] #end #end # #Shoes.app do #para "Text", @l = link("Ha") { alert "Hahaha" } #@e = edit_line text: "Boo" #button "Count" do #@l.click do #alert "Booo" #end #end ##click do ##alert @e.text ##end ##button("Ok").hide #end #Shoes.app width: 150 do ##para "text goes here " * 3, size:16, fill: lightblue ##para "text goes here " * 3, size:16, fill: lightgreen ##para "text goes here " * 3, size:16, fill: lightgray #@p = para "text goes here " * 3, size:16, fill: purple ###line 0, 0, 100, 100, click: Proc.new { alert "opt" } do #arc 0, 0, 100, 100, Shoes::TWO_PI, Shoes::PI, click: Proc.new { alert "opt" } do #alert "boo" #end #keypress do #@p.left += 10 #end #click do |*args| ##Shoes.app do ##para "Another!" ##click do |*_| ##quit ##end ##end #end #end #Shoes.app do ##oval 100, 100, 100, click: Proc.new { alert "opt" } do ##rect 100, 100, 100, 100, click: Proc.new { alert "opt" } do ###line 0, 0, 100, 100, click: Proc.new { alert "opt" } do ##star 100, 100, click: Proc.new { alert "opt" } do ##arc 0, 0, 100, 100, Shoes::TWO_PI, Shoes::PI, click: Proc.new { alert "opt" } do #image File.expand_path("/Users/jclark/.hacketyhack/pics/cora.jpg"), width: 100, click: Proc.new { alert "opt" } do #alert "boo" #end ##b = check do ##alert "boo" ##end ##b.click do ##alert "clicky" ##end #end