<*PRAGMA LL*>A
BorderedVBT.T
is a filter whose parent's screen consists of the
child's screen surrounded by a border. The parent's shape is determined
from the child's shape by adding the border size.
INTERFACEThe callBorderedVBT ; IMPORT VBT, Filter, PaintOp, Pixmap; TYPE T <: Public; Public = Filter.T OBJECT METHODS <* LL.sup <= VBT.mu *> init(ch: VBT.T; size: REAL := Default; op: PaintOp.T := PaintOp.BgFg; txt: Pixmap.T := Pixmap.Solid): T END;
v.init(...)
initializes v
as a BorderedVBT
with
child ch
and marks v
for redisplay.
The border size is given in millimeters. The border will be painted
in the untranslated texture txt
using the paint op op
.
CONST Default = 0.5; PROCEDURE New( ch: VBT.T; size: REAL := Default; op: PaintOp.T := PaintOp.BgFg; txt: Pixmap.T := Pixmap.Solid) : T; <* LL.sup <= VBT.mu *>
New(...)
is equivalent toNEW(T).init(...)
.
PROCEDURE SetSize(v: T; newSize: REAL); <* LL.sup = VBT.mu *>
Change the size of the border ofv
tonewSize
millimeters and markv
for redisplay.
PROCEDURE SetColor( v: T; op: PaintOp.T; txt := Pixmap.Solid); <* LL.sup = VBT.mu *>
Change theop
andtexture
ofv
and markv
for redisplay.
PROCEDURE Get( v: T; VAR size: REAL; VAR op: PaintOp.T; VAR txt: Pixmap.T); <* LL.sup = VBT.mu *>
Fetch v
's parameters.
END BorderedVBT.