Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: New to list

From: antonr:iinet:au at: 10-Jun-2003 11:39

1) This is kind of hard coded: show system/view/screen-face/pane/1 The widget doesn't know that it's parent window is the first window that has been opened. At least, it's brittle code. I recommend: show face/parent-face Or you could name your window: view lay: layout [... then just: show lay 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 one. 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 [ origin 0 space 0 box 6x40 font-size 11 feel [...] ; inpoint (pane/1) box 6x40 font-size 11 feel [...] ; outpoint (pane/2) ] 'pane ] 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. ie. convert mp1/size/x -> face/parent-face op1/offset/x -> face/parent-face/pane/2 Anton.