require 'rouge/builder'

@tk = Rouge::Builder.new

def buildtbox num
	@tk.box( :horizontal ) {
		@tk.text( "Foo Label #{num}:" )
		@nerp = @tk.textbox
		@tk.button( "Test Property APIs" ) {
			testProperty( nerp )
		}
	}
end
def buildmbox num
	@tk.box( :horizontal ) {
		@tk.text( "Foo Label #{num}:" )
		@tk.menubutton( "regular menubutton" ) {
			@tk.menupopup {
				@tk.menuitem( "foo 1" )
				@tk.menuitem( "foo 2" )
				@tk.menuitem( "foo 3" )
			}
		}
		@tk.menubutton( "disabled menubutton" ) {
			@tk.menupopup {
				@tk.menuitem( "foo 1" )
				@tk.menuitem( "foo 2" )
				@tk.menuitem( "foo 3" )
			}
		}
	}
end

@tk.window( "Rouge Demo" ) {
	buildtbox( 1 )
	buildtbox( 2 )
	buildtbox( 3 )
	buildmbox( 4 )
	buildmbox( 5 )
}

@tk.start
