require 'rouge/builder'

tk = Rouge::Builder.new
tk.window( "Rouge Demo" ) {
	tk.box( :horizontal ) {
		tk.button( "The Tick" ) {
			puts "Spoon!"
		}
		tk.button( "Neo" ) { 
			puts "There is no spoon."
		}
	}

	count = tk.textbox() 
	count['value'] = '0'

	x = 0

	tk.box( :vertical ) {
		tk.button( "Add 1 to x" ) { x += 1 }
		tk.button( "Print x" ) { puts "X = #{x}" }
		tk.button( "Increment count" ) { 
			count['value'] = (count['value'].to_i + 1).to_s
		}
	}
}
tk.start
