[REBOL] Re: New to list
From: antonr:iinet:au at: 10-Jun-2003 11:39
1) This is kind of hard coded:
The widget doesn't know that it's parent window is the
first window that has been opened. At least, it's brittle code.
Or you could name your window:
view lay: layout [...
2) ;at 60x20 ;<------------How to avoid hard coding this?
at ip1/offset + (mp1/size * 1x0)
3) To be totally self contained, your widget should create the two endpoints
(as faces) and put them in its pane block. That way, they are all treated as
Or you could use the draw dialect to draw your endpoints, but that's
probably more complicated.
A way for the midpoint to suck in the in/outpoints, still using the existing
layout code is to do this:
style midpoint box ... with [
pane: get in layout [
box 6x40 font-size 11 feel [...] ; inpoint (pane/1)
box 6x40 font-size 11 feel [...] ; outpoint (pane/2)
That steals the pane block from a new layout face (which is then forgotten).
The midpoint widget then takes that pane for itself.
You will have to modify the feel code to be relative.
mp1/size/x -> face/parent-face
op1/offset/x -> face/parent-face/pane/2