Shoes is a very cool way to write multiplatform windowing apps. [Original] by cuberick.

When laying out the widgets in your window, you must understand Stacks and Flows.

background - takes a filename or a color created by rgb(r,g,b) followed by an array of :top, :right, :left, :height, :width

rgb - takes 3 parameters 0-254 and returns a color

width - gives you the width of an element

button - takes a String label and a block and draws a button to the screen

show - make an element that is not visible, visible.

alert - takes a String message and pops up an alert box.

title - takes a String and prints out some big text

contents - returns an array of the elements in this Shoes Object.

ask_color - takes a String which is the title of the color selection dialog that pops up

width= - looks like it lets you set width (but it doesn't resize the base window)

rect - Takes a hash :left, :top, :width, :height and draw a rectangle. OPTIONAL: :radius => ??, :center => true (if true center rect over point, if false put top-left of rect over point)

quit - close the application window

click - I think it takes a block like keypress, but i just get segfaults.

incident - causes your app to segfault

rotate - takes a number of degrees. and rotates things you have drawn.

height - gives you the height of the element.

flow - A style element that takes an array with :margin and a block consisting of other elements to display. Flows fill left to right. When they hit max width they go down to the next row.

gray - takes an integer, but nothing happens.

border - takes a rgb() color and an array of :strokewidth

display - not sure, think it has something to do with debugging messages you see.

list_box - a selection element that takes a hash of :items where items is a list of options.

height= - set the height of the element.

clear - can take a block. clears what was drawn in the block or without a block clears the whole window. See follow.rb for an example.

ask_open_file - takes a string which is the title of the file open dialog box.

goto - takes a url string and redirects you to some url.

text - take a string and display it on the screen. Understands html markup.

subtitle - takes a string and displays some larger than normal text.

stack - A style element that takes an array with :margin and a block consisting of other

image - Takes a filename and displays that image.

edit_line - An element that takes text input

nostroke - the things you draw won't have a stroke line. release

smalltitle - takes a string and displays some largeish, but not too large text.

stroke - i don't know what parameters it takes, i think maybe a stack or flow, but it sets the stroke width on things you draw.

strokewidth - takes a number that becomes the width of the strokes you make

hide - make an element invisible

animate - takes a number representing frames per second and a block that happens that many times per sec.

confirm - takes a string that is the confirmation message for the confirmation dialog that pops up.

progress - show a progress bar. I have no idea how to fill it up.

keypress - takes a block that gets the value from the keypress. pretty much segfaults every time.

oval - draws an oval. :left => x, :top => y, :radius => i, OPTIONAL: :width => wid, :height => ht, :center => true (if true, centers oval over :left,:top, if false, puts top-left of oval's bounding box at :left,:top)

nofill - everything you draw is transparent.

fill - specifies the color that should be used to fill the stuff that you draw.

line - draws a line from x1,y1 to x2,y2. Takes 4 arguments, x1, y1, x2, y2.

arrow - Takes 3 arguments: x, y, w