tool-bar: make rebface [ tip: { USAGE: tool-bar silver data ["Open" %images/document-open.png [request-file] pad 2 none "Save" %images/document-save.png []] DESCRIPTION: An iconic toolbar. Height is set to 30 pixels. [pad n none] sequence works as per 'pad in the display function. } size: 100x-1 pane: [] color: colors/outline-light rebind: make function! [] [color: colors/outline-light] init: make function! [/local icon-offset] [ size/y: 30 icon-offset: 2x2 foreach [txt icon spec] data [ either string? txt [ insert tail pane make subface [ ;type: 'icon offset: icon-offset size: 22x22 text: "" image: any [ if word? icon [get icon] if file? icon [load icon] icon ] tip: txt feel: make default-feel [ over: make function! [face act pos] [ face/color: either act [colors/state-light] [none] show face ] engage: make function! [face act event] [ do select [ down [face/action face] up [face/feel/over face false none] away [face/feel/over face false none] ] act ] ] action: make function! [face /local var] spec ] icon-offset: icon-offset + 24x0 ][ icon-offset/x: icon * sizes/cell + icon-offset/x ; pad n none ] ] data: none ] ]