group-box: make rebface [ tip: { USAGE: group-box "Title" data [field field] DESCRIPTION: A static widget used to group widgets within a bounded container. } size: -1x-1 text: "Untitled" effect: [draw [pen colors/outline-dark line-width sizes/edge fill-pen none box 0x0 0x0 effects/radius pen colors/page line 0x0 0x0]] font: make default-font-top [color: colors/outline-dark] para: make default-para [origin: as-pair sizes/cell * 4 0] feel: make default-feel [ redraw: make function! [face act pos] [ if act = 'show [ all [ ; handle color change face/color face/effect/draw/fill-pen: face/color poke face/effect/draw 12 colors/page face/color: none ] face/effect/draw/15/x: sizes/cell * 5 + first size-text face ] ] ] action: make default-action [ on-resize: make function! [face] [poke face/effect/draw 9 face/size - 1x1] ] rebind: make function! [] [ font/name: effects/font font/size: sizes/font font/color: colors/outline-dark para/origin/x: sizes/cell * 4 ] init: make function! [] [ data: layout/only data pane: data/pane foreach face pane [face/offset: face/offset + as-pair 0 sizes/cell * sizes/gap] all [negative? size/x size/x: max 16 + first size-text self data/size/x] all [negative? size/y size/y: sizes/cell * sizes/gap + data/size/y] effect/draw/box/y: effect/draw/14/y: effect/draw/15/y: sizes/cell * 2 effect/draw/14/x: sizes/cell * 3 data: none action/on-resize self ] ]