callback
The command procedure to be executed when window changes size. This may happen as a result of a wsize command or via an interactive user operation.
When a resize procedure is defined for a window and is invoked, the window identifier is passed to the procedure as its first parameter. To assist in handling the size changes, two arrays are also passed providing the old and the new internal dimensions of the window. Both are two-element numeric arrays. Note that these are the dimensions of the inner rectangle (window.inrect), and not those of the window frame surround.
The procedure is executed before the contents of the window are repainted. Resize procedures should not include any commands which draw into the window.
New windows have a resize procedure of null.
window.resize (<window>,<oldsize>,<newsize>)
win1.resize = {
args w=window, old=numeric[2], new=numeric[2]
tell <'Window',w,'has been re-sized'>; bell
tell <'Difference in width is',new[1]-old[1],'pixels'>
tell <'Difference in height is',new[2]-old[2],'pixels'>
}
|
Commands: |
|
|
Structures: |