include "draw.m"; include "prefab.m"; prefab := load Prefab Prefab->PATH; Compound: adt { image: ref Draw->Image; environ: ref Environ; r: Draw->Rect; title: ref Element; contents: ref Element; iconbox: fn(env: ref Environ, p: Draw->Point, title: string, icon, mask: ref Draw->Image): ref Compound; textbox: fn(env: ref Environ, r: Draw->Rect, title, text: string): ref Compound; layoutbox: fn(env: ref Environ, r: Draw->Rect, title: string, lay: list of Layout): ref Compound; box: fn(env: ref Environ, p: Draw->Point, title, elist: ref Element): ref Compound; draw: fn(comp: self ref Compound); redraw: fn(comp: self ref Compound, r: Draw->Rect); scroll: fn(comp: self ref Compound, elem: ref Element, d: Draw->Point); show: fn(comp: self ref Compound, elem: ref Element): int; select: fn(comp: self ref Compound, elem: ref Element, i: int, c: chan of int): (int, int, ref Element); tagselect: fn(comp: self ref Compound, elem: ref Element, i: int, c: chan of int): (int, int, ref Element); highlight: fn(comp: self ref Compound, elem: ref Element, on: int); };
However a Compound is built, its size computation makes allowance for the border and title. Moreover, if the requested size and placement makes part appear offscreen, the result may be moved to display it better.
PREFAB-COMPOUND(2 ) | Rev: Tue Mar 31 02:42:39 GMT 2015 |