[clean-list] Clean unimplement code
todoroki
th003751 at tigers-net.com
Fri Apr 7 19:21:53 MEST 2006
Hello, I'm uzm. I live in Tokyo Japan.
I'm a big fan of the Concurrent Clean language and enjoy it.
The other day, I found the unimplement code and I fixed it.
I hesitate whether to make the uniformity of the behavior of
Right and Center and Left or to make convenience.
I put the code here and please use it if you like it.
Thank you.
// windowvalidate.icl
>getItemPosPosition _ _ _ _ windows tb
> = (zero,windows,tb)
<getItemPosPosition _ _ size itemPos windows tb
< # (rect,tb) = osScreenrect tb
< screenDomain = rectToRectangle rect
< screenOrigin = {x=rect.rleft,y=rect.rtop}
< (exactW,exactH) = toTuple size
< {vx,vy} = case itemPosOffset (snd itemPos)
[(screenDomain,screenOrigin)] of
< Alt1Of2 v = v
< _ = windowvalidateFatalError
"getItemPosPosition _ _ (pos,center|right|left )" "pos in
{Left,Right,Center}, but offset is illegal: OffsetAlign"
< pos = case (fst itemPos) of
< Center -> {x = (rect.rright -
exactW)>>1 + vx, y = (rect.rbottom - exactH)>>1 + vy}
< Right -> {x = rect.rright -
exactW + vx, y = vy}
< Left -> {x = vx, y = vy}
< _ -> zero
< = (pos,windows,tb)
uzm
More information about the clean-list
mailing list